]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/runtime: Fix setUp and tearDown methods
authorMariano Lopez <mariano.lopez@linux.intel.com>
Thu, 15 Oct 2015 06:29:38 +0000 (06:29 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 19 Oct 2015 16:55:40 +0000 (17:55 +0100)
Currently some of the runtime test overwrites
the setUp and tearDown methods provided by
oeRuntimeTest, this will avoid some checks
required when running the test suit.

This patch changes the setUp and tearDown methods
for their local counterparts, so when these
tests are called, it will run the parent setUp
and tearDown and also the local ones.

[YOCTO #8465]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/runtime/_ptest.py
meta/lib/oeqa/runtime/date.py
meta/lib/oeqa/runtime/kernelmodule.py
meta/lib/oeqa/runtime/scanelf.py

index 81c9c43862799c355ee8388a59a7c28c3cedd97c..0621028b86c983414e85a6e3afb9e203418f1323 100644 (file)
@@ -98,7 +98,7 @@ class PtestRunnerTest(oeRuntimeTest):
 
         return complementary_pkgs.split()
 
-    def setUp(self):
+    def setUpLocal(self):
         self.ptest_log = os.path.join(oeRuntimeTest.tc.d.getVar("TEST_LOG_DIR",True), "ptest-%s.log" % oeRuntimeTest.tc.d.getVar('DATETIME', True))
 
     @skipUnlessPassed('test_ssh')
index 3a8fe84817ffcbb12ee90e5e6202c110ade9808f..447987e0758c789c00dfe02684dd30e06fb6862b 100644 (file)
@@ -4,11 +4,11 @@ import re
 
 class DateTest(oeRuntimeTest):
 
-    def setUp(self):
+    def setUpLocal(self):
         if oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", True) == "systemd":
             self.target.run('systemctl stop systemd-timesyncd')
 
-    def tearDown(self):
+    def tearDownLocal(self):
         if oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", True) == "systemd":
             self.target.run('systemctl start systemd-timesyncd')
 
index 2e81720327eb7692ed58094d8d70335f05342918..38ca184540cfe26a878d56b0b265467ee4c8274b 100644 (file)
@@ -10,7 +10,7 @@ def setUpModule():
 
 class KernelModuleTest(oeRuntimeTest):
 
-    def setUp(self):
+    def setUpLocal(self):
         self.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "hellomod.c"), "/tmp/hellomod.c")
         self.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "hellomod_makefile"), "/tmp/Makefile")
 
@@ -30,5 +30,5 @@ class KernelModuleTest(oeRuntimeTest):
             (status, output) = self.target.run(cmd, 900)
             self.assertEqual(status, 0, msg="\n".join([cmd, output]))
 
-    def tearDown(self):
+    def tearDownLocal(self):
         self.target.run('rm -f /tmp/Makefile /tmp/hellomod.c')
index 43a024ab9a3471b7e49a73b0cf43bc89d65ad121..67e02ff4555b75201305df51693e0f14e1d5ddec 100644 (file)
@@ -8,7 +8,7 @@ def setUpModule():
 
 class ScanelfTest(oeRuntimeTest):
 
-    def setUp(self):
+    def setUpLocal(self):
         self.scancmd = 'scanelf --quiet --recursive --mount --ldpath --path'
 
     @testcase(966)