summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/sstatetests.py
diff options
context:
space:
mode:
authorLucian Musat <georgex.l.musat@intel.com>2014-07-09 11:36:47 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-10 17:37:41 +0100
commit3c820db4624a062644a26de1866123a10a78a006 (patch)
treeebdeba84076377a283aa4c5766284fe24dc0320f /meta/lib/oeqa/selftest/sstatetests.py
parentc2d8322b3e3d1c2cb1ed7ccff59c7e86ab7af751 (diff)
downloadopenembedded-core-3c820db4624a062644a26de1866123a10a78a006.tar.gz
oeqs/selftest: Added test case decorators for the rest of selftest testcases except toaster
Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/lib/oeqa/selftest/sstatetests.py')
-rw-r--r--meta/lib/oeqa/selftest/sstatetests.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/meta/lib/oeqa/selftest/sstatetests.py b/meta/lib/oeqa/selftest/sstatetests.py
index 44dcea847f..3789426797 100644
--- a/meta/lib/oeqa/selftest/sstatetests.py
+++ b/meta/lib/oeqa/selftest/sstatetests.py
@@ -8,7 +8,7 @@ import oeqa.utils.ftools as ftools
from oeqa.selftest.base import oeSelfTest
from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
from oeqa.selftest.sstate import SStateBase
-
+from oeqa.utils.decorators import testcase
class SStateTests(SStateBase):
@@ -28,17 +28,21 @@ class SStateTests(SStateBase):
else:
self.assertTrue(not file_tracker , msg="Found sstate files in the wrong place for: %s" % ', '.join(map(str, targets)))
+ @testcase(975)
def test_sstate_creation_distro_specific_pass(self):
targetarch = get_bb_var('TUNE_ARCH')
self.run_test_sstate_creation(['binutils-cross-'+ targetarch, 'binutils-native'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
+ @testcase(975)
def test_sstate_creation_distro_specific_fail(self):
targetarch = get_bb_var('TUNE_ARCH')
self.run_test_sstate_creation(['binutils-cross-'+ targetarch, 'binutils-native'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True, should_pass=False)
+ @testcase(976)
def test_sstate_creation_distro_nonspecific_pass(self):
self.run_test_sstate_creation(['eglibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
+ @testcase(976)
def test_sstate_creation_distro_nonspecific_fail(self):
self.run_test_sstate_creation(['eglibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True, should_pass=False)
@@ -60,13 +64,16 @@ class SStateTests(SStateBase):
tgz_removed = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific)
self.assertTrue(not tgz_removed, msg="do_cleansstate didn't remove .tgz sstate files for: %s" % ', '.join(map(str, targets)))
+ @testcase(977)
def test_cleansstate_task_distro_specific_nonspecific(self):
targetarch = get_bb_var('TUNE_ARCH')
self.run_test_cleansstate_task(['binutils-cross-' + targetarch, 'binutils-native', 'eglibc-initial'], distro_specific=True, distro_nonspecific=True, temp_sstate_location=True)
+ @testcase(977)
def test_cleansstate_task_distro_nonspecific(self):
self.run_test_cleansstate_task(['eglibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
+ @testcase(977)
def test_cleansstate_task_distro_specific(self):
targetarch = get_bb_var('TUNE_ARCH')
self.run_test_cleansstate_task(['binutils-cross-'+ targetarch, 'binutils-native', 'eglibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
@@ -98,14 +105,17 @@ class SStateTests(SStateBase):
created_once = [x for x in file_tracker_2 if x not in file_tracker_1]
self.assertTrue(created_once == [], msg="The following sstate files ware created only in the second run: %s" % ', '.join(map(str, created_once)))
+ @testcase(175)
def test_rebuild_distro_specific_sstate_cross_native_targets(self):
targetarch = get_bb_var('TUNE_ARCH')
self.run_test_rebuild_distro_specific_sstate(['binutils-cross-' + targetarch, 'binutils-native'], temp_sstate_location=True)
+ @testcase(175)
def test_rebuild_distro_specific_sstate_cross_target(self):
targetarch = get_bb_var('TUNE_ARCH')
self.run_test_rebuild_distro_specific_sstate(['binutils-cross-' + targetarch], temp_sstate_location=True)
+ @testcase(175)
def test_rebuild_distro_specific_sstate_native_target(self):
self.run_test_rebuild_distro_specific_sstate(['binutils-native'], temp_sstate_location=True)
@@ -153,7 +163,7 @@ class SStateTests(SStateBase):
expected_not_actual = [x for x in expected_remaining_sstate if x not in actual_remaining_sstate]
self.assertFalse(expected_not_actual, msg="Extra files ware removed: %s" ', '.join(map(str, expected_not_actual)))
-
+ @testcase(973)
def test_sstate_cache_management_script_using_pr_1(self):
global_config = []
target_config = []
@@ -161,6 +171,7 @@ class SStateTests(SStateBase):
target_config.append('PR = "0"')
self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
+ @testcase(978)
def test_sstate_cache_management_script_using_pr_2(self):
global_config = []
target_config = []
@@ -170,6 +181,7 @@ class SStateTests(SStateBase):
target_config.append('PR = "1"')
self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
+ @testcase(979)
def test_sstate_cache_management_script_using_pr_3(self):
global_config = []
target_config = []
@@ -181,6 +193,7 @@ class SStateTests(SStateBase):
target_config.append('PR = "1"')
self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
+ @testcase(974)
def test_sstate_cache_management_script_using_machine(self):
global_config = []
target_config = []
@@ -189,11 +202,3 @@ class SStateTests(SStateBase):
global_config.append('MACHINE = "qemux86"')
target_config.append('')
self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
-
-
-
-
-
-
-
-