]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/runtime/syslog: Add delay to test to avoid failures
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 26 Jun 2019 16:24:19 +0000 (17:24 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 27 Jun 2019 11:20:24 +0000 (12:20 +0100)
On a loaded builder we've seen the log message not make it to the log file
before the ssh command completes. Add a short delay to try and ensure
this does happen. There is unforunately no way to flush syslog in all
cases we test.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runtime/cases/oe_syslog.py

index 449df233d1316120b29e9b30483200c3de171ba5..3a8271a53a80989af3a33d626ad58ae61df52dd3 100644 (file)
@@ -85,6 +85,9 @@ class SyslogTestConfig(OERuntimeTestCase):
         msg = "Can't log into syslog. Output: %s " % output
         self.assertEqual(status, 0, msg=msg)
 
+        # There is no way to flush the logger to disk in all cases
+        time.sleep(1)
+
         status, output = self.target.run('grep foobar /var/log/messages')
         if status != 0:
             if self.tc.td.get("VIRTUAL-RUNTIME_init_manager") == "systemd":