1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 05:09:24 +00:00

oeqa/runtime: Fix setUp and tearDown methods

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]

(From OE-Core rev: 13282223b07787a92c251f89251e8a49a0e4e3eb)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Mariano Lopez
2015-10-15 06:29:38 +00:00
committed by Richard Purdie
parent 3327401264
commit b8f704285f
4 changed files with 6 additions and 6 deletions
+1 -1
View 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')
+2 -2
View 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')
+2 -2
View 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')
+1 -1
View 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)