summaryrefslogtreecommitdiff
path: root/meta/lib/oeqa/runtime
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2015-09-09 21:05:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-11 23:38:02 +0100
commit5334f1b1e9363fa9c128289b51ade55c7ae1a0a3 (patch)
tree459c3fb527be3c85f8b2b37083e1d1a3c8b6c6a6 /meta/lib/oeqa/runtime
parent9d298d1563b3fd5ad569f806cc296e13279e7cf6 (diff)
downloadopenembedded-core-5334f1b1e9363fa9c128289b51ade55c7ae1a0a3.tar.gz
openembedded-core-5334f1b1e9363fa9c128289b51ade55c7ae1a0a3.tar.bz2
openembedded-core-5334f1b1e9363fa9c128289b51ade55c7ae1a0a3.zip
oeqa/runtime/date: stop systemd-timesyncd during test
There's a race between systemd-timesyncd manipulating the system time (with NTP lookups) and the test case's time manipulation. Prevent this by stopping systemd-timesyncd for the duration of the test case. Thanks to Khem Raj for root-causing this. Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib/oeqa/runtime')
-rw-r--r--meta/lib/oeqa/runtime/date.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/date.py b/meta/lib/oeqa/runtime/date.py
index 97e8ee42ad..3a8fe84817 100644
--- a/meta/lib/oeqa/runtime/date.py
+++ b/meta/lib/oeqa/runtime/date.py
@@ -4,6 +4,14 @@ import re
class DateTest(oeRuntimeTest):
+ def setUp(self):
+ if oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", True) == "systemd":
+ self.target.run('systemctl stop systemd-timesyncd')
+
+ def tearDown(self):
+ if oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", True) == "systemd":
+ self.target.run('systemctl start systemd-timesyncd')
+
@testcase(211)
@skipUnlessPassed("test_ssh")
def test_date(self):