diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-06-26 17:24:19 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-06-27 12:20:36 +0100 |
commit | 897639d7dc28e38596e75a012c26780dd22cae5f (patch) | |
tree | 5fe053ccc0bc721c0e4206f773ffd2c7996ae0d4 | |
parent | 2e91163d5947764c1b43655e90bde5e1d3b2c1b7 (diff) | |
download | poky-897639d7dc28e38596e75a012c26780dd22cae5f.tar.gz |
oeqa/runtime/syslog: Add delay to test to avoid failures
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.
(From OE-Core rev: 66322b689e46520647e2d94d5e3f3ce282a41247)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/runtime/cases/oe_syslog.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/cases/oe_syslog.py b/meta/lib/oeqa/runtime/cases/oe_syslog.py index 449df233d1..3a8271a53a 100644 --- a/meta/lib/oeqa/runtime/cases/oe_syslog.py +++ b/meta/lib/oeqa/runtime/cases/oe_syslog.py | |||
@@ -85,6 +85,9 @@ class SyslogTestConfig(OERuntimeTestCase): | |||
85 | msg = "Can't log into syslog. Output: %s " % output | 85 | msg = "Can't log into syslog. Output: %s " % output |
86 | self.assertEqual(status, 0, msg=msg) | 86 | self.assertEqual(status, 0, msg=msg) |
87 | 87 | ||
88 | # There is no way to flush the logger to disk in all cases | ||
89 | time.sleep(1) | ||
90 | |||
88 | status, output = self.target.run('grep foobar /var/log/messages') | 91 | status, output = self.target.run('grep foobar /var/log/messages') |
89 | if status != 0: | 92 | if status != 0: |
90 | if self.tc.td.get("VIRTUAL-RUNTIME_init_manager") == "systemd": | 93 | if self.tc.td.get("VIRTUAL-RUNTIME_init_manager") == "systemd": |