summaryrefslogtreecommitdiffstats
path: root/meta
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:38:35 +0100
commitd8364371b2987d1396cfb85658565096ff72a2cd (patch)
tree3b4d13b34f9486fde32e42bdf7ce20d4066f4a4d /meta
parent79dae067d99393967c1d565dc7ca2081c966a558 (diff)
downloadpoky-d8364371b2987d1396cfb85658565096ff72a2cd.tar.gz
oeqs/selftest: Added test case decorators for the rest of selftest testcases except toaster
(From OE-Core rev: 3c820db4624a062644a26de1866123a10a78a006) Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/selftest/bbtests.py22
-rw-r--r--meta/lib/oeqa/selftest/oescripts.py12
-rw-r--r--meta/lib/oeqa/selftest/prservice.py10
-rw-r--r--meta/lib/oeqa/selftest/sstatetests.py25
4 files changed, 49 insertions, 20 deletions
diff --git a/meta/lib/oeqa/selftest/bbtests.py b/meta/lib/oeqa/selftest/bbtests.py
index d730bfd755..e765e366c1 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -7,19 +7,23 @@ import shutil
7import oeqa.utils.ftools as ftools 7import oeqa.utils.ftools as ftools
8from oeqa.selftest.base import oeSelfTest 8from oeqa.selftest.base import oeSelfTest
9from oeqa.utils.commands import runCmd, bitbake, get_bb_var 9from oeqa.utils.commands import runCmd, bitbake, get_bb_var
10from oeqa.utils.decorators import testcase
10 11
11class BitbakeTests(oeSelfTest): 12class BitbakeTests(oeSelfTest):
12 13
14 @testcase(789)
13 def test_run_bitbake_from_dir_1(self): 15 def test_run_bitbake_from_dir_1(self):
14 os.chdir(os.path.join(self.builddir, 'conf')) 16 os.chdir(os.path.join(self.builddir, 'conf'))
15 bitbake('-e') 17 bitbake('-e')
16 18
19 @testcase(790)
17 def test_run_bitbake_from_dir_2(self): 20 def test_run_bitbake_from_dir_2(self):
18 my_env = os.environ.copy() 21 my_env = os.environ.copy()
19 my_env['BBPATH'] = my_env['BUILDDIR'] 22 my_env['BBPATH'] = my_env['BUILDDIR']
20 os.chdir(os.path.dirname(os.environ['BUILDDIR'])) 23 os.chdir(os.path.dirname(os.environ['BUILDDIR']))
21 bitbake('-e', env=my_env) 24 bitbake('-e', env=my_env)
22 25
26 @testcase(806)
23 def test_event_handler(self): 27 def test_event_handler(self):
24 self.write_config("INHERIT += \"test_events\"") 28 self.write_config("INHERIT += \"test_events\"")
25 result = bitbake('m4-native') 29 result = bitbake('m4-native')
@@ -29,6 +33,7 @@ class BitbakeTests(oeSelfTest):
29 self.assertTrue(find_build_completed, msg = "Match failed in:\n%s" % result.output) 33 self.assertTrue(find_build_completed, msg = "Match failed in:\n%s" % result.output)
30 self.assertFalse('Test for bb.event.InvalidEvent' in result.output) 34 self.assertFalse('Test for bb.event.InvalidEvent' in result.output)
31 35
36 @testcase(103)
32 def test_local_sstate(self): 37 def test_local_sstate(self):
33 bitbake('m4-native -ccleansstate') 38 bitbake('m4-native -ccleansstate')
34 bitbake('m4-native') 39 bitbake('m4-native')
@@ -37,14 +42,17 @@ class BitbakeTests(oeSelfTest):
37 find_setscene = re.search("m4-native.*do_.*_setscene", result.output) 42 find_setscene = re.search("m4-native.*do_.*_setscene", result.output)
38 self.assertTrue(find_setscene) 43 self.assertTrue(find_setscene)
39 44
45 @testcase(105)
40 def test_bitbake_invalid_recipe(self): 46 def test_bitbake_invalid_recipe(self):
41 result = bitbake('-b asdf', ignore_status=True) 47 result = bitbake('-b asdf', ignore_status=True)
42 self.assertTrue("ERROR: Unable to find any recipe file matching 'asdf'" in result.output) 48 self.assertTrue("ERROR: Unable to find any recipe file matching 'asdf'" in result.output)
43 49
50 @testcase(107)
44 def test_bitbake_invalid_target(self): 51 def test_bitbake_invalid_target(self):
45 result = bitbake('asdf', ignore_status=True) 52 result = bitbake('asdf', ignore_status=True)
46 self.assertTrue("ERROR: Nothing PROVIDES 'asdf'" in result.output) 53 self.assertTrue("ERROR: Nothing PROVIDES 'asdf'" in result.output)
47 54
55 @testcase(106)
48 def test_warnings_errors(self): 56 def test_warnings_errors(self):
49 result = bitbake('-b asdf', ignore_status=True) 57 result = bitbake('-b asdf', ignore_status=True)
50 find_warnings = re.search("Summary: There w.{2,3}? [1-9][0-9]* WARNING messages* shown", result.output) 58 find_warnings = re.search("Summary: There w.{2,3}? [1-9][0-9]* WARNING messages* shown", result.output)
@@ -52,6 +60,7 @@ class BitbakeTests(oeSelfTest):
52 self.assertTrue(find_warnings, msg="Did not find the mumber of warnings at the end of the build:\n" + result.output) 60 self.assertTrue(find_warnings, msg="Did not find the mumber of warnings at the end of the build:\n" + result.output)
53 self.assertTrue(find_errors, msg="Did not find the mumber of errors at the end of the build:\n" + result.output) 61 self.assertTrue(find_errors, msg="Did not find the mumber of errors at the end of the build:\n" + result.output)
54 62
63 @testcase(108)
55 def test_invalid_patch(self): 64 def test_invalid_patch(self):
56 self.write_recipeinc('man', 'SRC_URI += "file://man-1.5h1-make.patch"') 65 self.write_recipeinc('man', 'SRC_URI += "file://man-1.5h1-make.patch"')
57 result = bitbake('man -c patch', ignore_status=True) 66 result = bitbake('man -c patch', ignore_status=True)
@@ -59,6 +68,7 @@ class BitbakeTests(oeSelfTest):
59 bitbake('-cclean man') 68 bitbake('-cclean man')
60 self.assertTrue("ERROR: Function failed: patch_do_patch" in result.output) 69 self.assertTrue("ERROR: Function failed: patch_do_patch" in result.output)
61 70
71 @testcase(163)
62 def test_force_task(self): 72 def test_force_task(self):
63 bitbake('m4-native') 73 bitbake('m4-native')
64 result = bitbake('-C compile m4-native') 74 result = bitbake('-C compile m4-native')
@@ -67,6 +77,7 @@ class BitbakeTests(oeSelfTest):
67 find_task = re.search("m4-native.*%s" % task, result.output) 77 find_task = re.search("m4-native.*%s" % task, result.output)
68 self.assertTrue(find_task) 78 self.assertTrue(find_task)
69 79
80 @testcase(167)
70 def test_bitbake_g(self): 81 def test_bitbake_g(self):
71 result = bitbake('-g core-image-full-cmdline') 82 result = bitbake('-g core-image-full-cmdline')
72 self.assertTrue('NOTE: PN build list saved to \'pn-buildlist\'' in result.output) 83 self.assertTrue('NOTE: PN build list saved to \'pn-buildlist\'' in result.output)
@@ -74,6 +85,7 @@ class BitbakeTests(oeSelfTest):
74 for f in ['pn-buildlist', 'pn-depends.dot', 'package-depends.dot', 'task-depends.dot']: 85 for f in ['pn-buildlist', 'pn-depends.dot', 'package-depends.dot', 'task-depends.dot']:
75 os.remove(f) 86 os.remove(f)
76 87
88 @testcase(899)
77 def test_image_manifest(self): 89 def test_image_manifest(self):
78 bitbake('core-image-minimal') 90 bitbake('core-image-minimal')
79 deploydir = get_bb_var("DEPLOY_DIR_IMAGE", target="core-image-minimal") 91 deploydir = get_bb_var("DEPLOY_DIR_IMAGE", target="core-image-minimal")
@@ -81,6 +93,7 @@ class BitbakeTests(oeSelfTest):
81 manifest = os.path.join(deploydir, imagename + ".manifest") 93 manifest = os.path.join(deploydir, imagename + ".manifest")
82 self.assertTrue(os.path.islink(manifest), msg="No manifest file created for image") 94 self.assertTrue(os.path.islink(manifest), msg="No manifest file created for image")
83 95
96 @testcase(168)
84 def test_invalid_recipe_src_uri(self): 97 def test_invalid_recipe_src_uri(self):
85 data = 'SRC_URI = "file://invalid"' 98 data = 'SRC_URI = "file://invalid"'
86 self.write_recipeinc('man', data) 99 self.write_recipeinc('man', data)
@@ -92,6 +105,7 @@ class BitbakeTests(oeSelfTest):
92 self.assertTrue('ERROR: Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output) 105 self.assertTrue('ERROR: Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output)
93 self.assertTrue('ERROR: Function failed: Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.' in result.output) 106 self.assertTrue('ERROR: Function failed: Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.' in result.output)
94 107
108 @testcase(171)
95 def test_rename_downloaded_file(self): 109 def test_rename_downloaded_file(self):
96 data = 'SRC_URI_append = ";downloadfilename=test-aspell.tar.gz"' 110 data = 'SRC_URI_append = ";downloadfilename=test-aspell.tar.gz"'
97 self.write_recipeinc('aspell', data) 111 self.write_recipeinc('aspell', data)
@@ -103,25 +117,30 @@ class BitbakeTests(oeSelfTest):
103 self.assertTrue(os.path.isfile(os.path.join(get_bb_var("DL_DIR"), 'test-aspell.tar.gz.done'))) 117 self.assertTrue(os.path.isfile(os.path.join(get_bb_var("DL_DIR"), 'test-aspell.tar.gz.done')))
104 bitbake('-ccleanall aspell') 118 bitbake('-ccleanall aspell')
105 119
120 @testcase(1028)
106 def test_environment(self): 121 def test_environment(self):
107 self.append_config("TEST_ENV=\"localconf\"") 122 self.append_config("TEST_ENV=\"localconf\"")
108 result = runCmd('bitbake -e | grep TEST_ENV=') 123 result = runCmd('bitbake -e | grep TEST_ENV=')
109 self.assertTrue('localconf' in result.output) 124 self.assertTrue('localconf' in result.output)
110 self.remove_config("TEST_ENV=\"localconf\"") 125 self.remove_config("TEST_ENV=\"localconf\"")
111 126
127 @testcase(1029)
112 def test_dry_run(self): 128 def test_dry_run(self):
113 result = runCmd('bitbake -n m4-native') 129 result = runCmd('bitbake -n m4-native')
114 self.assertEqual(0, result.status) 130 self.assertEqual(0, result.status)
115 131
132 @testcase(1030)
116 def test_just_parse(self): 133 def test_just_parse(self):
117 result = runCmd('bitbake -p') 134 result = runCmd('bitbake -p')
118 self.assertEqual(0, result.status) 135 self.assertEqual(0, result.status)
119 136
137 @testcase(1031)
120 def test_version(self): 138 def test_version(self):
121 result = runCmd('bitbake -s | grep wget') 139 result = runCmd('bitbake -s | grep wget')
122 find = re.search("wget *:([0-9a-zA-Z\.\-]+)", result.output) 140 find = re.search("wget *:([0-9a-zA-Z\.\-]+)", result.output)
123 self.assertTrue(find) 141 self.assertTrue(find)
124 142
143 @testcase(1032)
125 def test_prefile(self): 144 def test_prefile(self):
126 preconf = os.path.join(self.builddir, 'conf/prefile.conf') 145 preconf = os.path.join(self.builddir, 'conf/prefile.conf')
127 self.track_for_cleanup(preconf) 146 self.track_for_cleanup(preconf)
@@ -133,6 +152,7 @@ class BitbakeTests(oeSelfTest):
133 self.assertTrue('localconf' in result.output) 152 self.assertTrue('localconf' in result.output)
134 self.remove_config("TEST_PREFILE=\"localconf\"") 153 self.remove_config("TEST_PREFILE=\"localconf\"")
135 154
155 @testcase(1033)
136 def test_postfile(self): 156 def test_postfile(self):
137 postconf = os.path.join(self.builddir, 'conf/postfile.conf') 157 postconf = os.path.join(self.builddir, 'conf/postfile.conf')
138 self.track_for_cleanup(postconf) 158 self.track_for_cleanup(postconf)
@@ -142,10 +162,12 @@ class BitbakeTests(oeSelfTest):
142 self.assertTrue('postfile' in result.output) 162 self.assertTrue('postfile' in result.output)
143 self.remove_config("TEST_POSTFILE=\"localconf\"") 163 self.remove_config("TEST_POSTFILE=\"localconf\"")
144 164
165 @testcase(1034)
145 def test_checkuri(self): 166 def test_checkuri(self):
146 result = runCmd('bitbake -c checkuri m4') 167 result = runCmd('bitbake -c checkuri m4')
147 self.assertEqual(0, result.status) 168 self.assertEqual(0, result.status)
148 169
170 @testcase(1035)
149 def test_continue(self): 171 def test_continue(self):
150 self.write_recipeinc('man',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" ) 172 self.write_recipeinc('man',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" )
151 runCmd('bitbake -c cleanall man xcursor-transparent-theme') 173 runCmd('bitbake -c cleanall man xcursor-transparent-theme')
diff --git a/meta/lib/oeqa/selftest/oescripts.py b/meta/lib/oeqa/selftest/oescripts.py
index 4aab2ed095..31cd50809c 100644
--- a/meta/lib/oeqa/selftest/oescripts.py
+++ b/meta/lib/oeqa/selftest/oescripts.py
@@ -8,9 +8,11 @@ import oeqa.utils.ftools as ftools
8from oeqa.selftest.base import oeSelfTest 8from oeqa.selftest.base import oeSelfTest
9from oeqa.selftest.buildhistory import BuildhistoryBase 9from oeqa.selftest.buildhistory import BuildhistoryBase
10from oeqa.utils.commands import Command, runCmd, bitbake, get_bb_var, get_test_layer 10from oeqa.utils.commands import Command, runCmd, bitbake, get_bb_var, get_test_layer
11from oeqa.utils.decorators import testcase
11 12
12class TestScripts(oeSelfTest): 13class TestScripts(oeSelfTest):
13 14
15 @testcase(300)
14 def test_cleanup_workdir(self): 16 def test_cleanup_workdir(self):
15 path = os.path.dirname(get_bb_var('WORKDIR', 'gzip')) 17 path = os.path.dirname(get_bb_var('WORKDIR', 'gzip'))
16 old_version_recipe = os.path.join(get_bb_var('COREBASE'), 'meta/recipes-extended/gzip/gzip_1.3.12.bb') 18 old_version_recipe = os.path.join(get_bb_var('COREBASE'), 'meta/recipes-extended/gzip/gzip_1.3.12.bb')
@@ -41,6 +43,7 @@ class TestScripts(oeSelfTest):
41 43
42class BuildhistoryDiffTests(BuildhistoryBase): 44class BuildhistoryDiffTests(BuildhistoryBase):
43 45
46 @testcase(295)
44 def test_buildhistory_diff(self): 47 def test_buildhistory_diff(self):
45 self.add_command_to_tearDown('cleanup-workdir') 48 self.add_command_to_tearDown('cleanup-workdir')
46 target = 'xcursor-transparent-theme' 49 target = 'xcursor-transparent-theme'
@@ -49,12 +52,3 @@ class BuildhistoryDiffTests(BuildhistoryBase):
49 result = runCmd("buildhistory-diff -p %s" % get_bb_var('BUILDHISTORY_DIR')) 52 result = runCmd("buildhistory-diff -p %s" % get_bb_var('BUILDHISTORY_DIR'))
50 expected_output = 'PR changed from "r1" to "r0"' 53 expected_output = 'PR changed from "r1" to "r0"'
51 self.assertTrue(expected_output in result.output, msg="Did not find expected output: %s" % result.output) 54 self.assertTrue(expected_output in result.output, msg="Did not find expected output: %s" % result.output)
52
53
54
55
56
57
58
59
60
diff --git a/meta/lib/oeqa/selftest/prservice.py b/meta/lib/oeqa/selftest/prservice.py
index 789c05f1e5..fb6d68d3bf 100644
--- a/meta/lib/oeqa/selftest/prservice.py
+++ b/meta/lib/oeqa/selftest/prservice.py
@@ -8,6 +8,7 @@ import datetime
8import oeqa.utils.ftools as ftools 8import oeqa.utils.ftools as ftools
9from oeqa.selftest.base import oeSelfTest 9from oeqa.selftest.base import oeSelfTest
10from oeqa.utils.commands import runCmd, bitbake, get_bb_var 10from oeqa.utils.commands import runCmd, bitbake, get_bb_var
11from oeqa.utils.decorators import testcase
11 12
12class BitbakePrTests(oeSelfTest): 13class BitbakePrTests(oeSelfTest):
13 14
@@ -87,27 +88,34 @@ class BitbakePrTests(oeSelfTest):
87 bitbake("-ccleansstate %s" % package_name) 88 bitbake("-ccleansstate %s" % package_name)
88 self.assertTrue(pr_2 - pr_1 == 1) 89 self.assertTrue(pr_2 - pr_1 == 1)
89 90
90 91 @testcase(930)
91 def test_import_export_replace_db(self): 92 def test_import_export_replace_db(self):
92 self.run_test_pr_export_import('m4') 93 self.run_test_pr_export_import('m4')
93 94
95 @testcase(931)
94 def test_import_export_override_db(self): 96 def test_import_export_override_db(self):
95 self.run_test_pr_export_import('m4', replace_current_db=False) 97 self.run_test_pr_export_import('m4', replace_current_db=False)
96 98
99 @testcase(932)
97 def test_pr_service_rpm_arch_dep(self): 100 def test_pr_service_rpm_arch_dep(self):
98 self.run_test_pr_service('m4', 'rpm', 'do_package') 101 self.run_test_pr_service('m4', 'rpm', 'do_package')
99 102
103 @testcase(934)
100 def test_pr_service_deb_arch_dep(self): 104 def test_pr_service_deb_arch_dep(self):
101 self.run_test_pr_service('m4', 'deb', 'do_package') 105 self.run_test_pr_service('m4', 'deb', 'do_package')
102 106
107 @testcase(933)
103 def test_pr_service_ipk_arch_dep(self): 108 def test_pr_service_ipk_arch_dep(self):
104 self.run_test_pr_service('m4', 'ipk', 'do_package') 109 self.run_test_pr_service('m4', 'ipk', 'do_package')
105 110
111 @testcase(935)
106 def test_pr_service_rpm_arch_indep(self): 112 def test_pr_service_rpm_arch_indep(self):
107 self.run_test_pr_service('xcursor-transparent-theme', 'rpm', 'do_package') 113 self.run_test_pr_service('xcursor-transparent-theme', 'rpm', 'do_package')
108 114
115 @testcase(937)
109 def test_pr_service_deb_arch_indep(self): 116 def test_pr_service_deb_arch_indep(self):
110 self.run_test_pr_service('xcursor-transparent-theme', 'deb', 'do_package') 117 self.run_test_pr_service('xcursor-transparent-theme', 'deb', 'do_package')
111 118
119 @testcase(936)
112 def test_pr_service_ipk_arch_indep(self): 120 def test_pr_service_ipk_arch_indep(self):
113 self.run_test_pr_service('xcursor-transparent-theme', 'ipk', 'do_package') 121 self.run_test_pr_service('xcursor-transparent-theme', 'ipk', 'do_package')
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
8from oeqa.selftest.base import oeSelfTest 8from oeqa.selftest.base import oeSelfTest
9from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer 9from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
10from oeqa.selftest.sstate import SStateBase 10from oeqa.selftest.sstate import SStateBase
11 11from oeqa.utils.decorators import testcase
12 12
13class SStateTests(SStateBase): 13class SStateTests(SStateBase):
14 14
@@ -28,17 +28,21 @@ class SStateTests(SStateBase):
28 else: 28 else:
29 self.assertTrue(not file_tracker , msg="Found sstate files in the wrong place for: %s" % ', '.join(map(str, targets))) 29 self.assertTrue(not file_tracker , msg="Found sstate files in the wrong place for: %s" % ', '.join(map(str, targets)))
30 30
31 @testcase(975)
31 def test_sstate_creation_distro_specific_pass(self): 32 def test_sstate_creation_distro_specific_pass(self):
32 targetarch = get_bb_var('TUNE_ARCH') 33 targetarch = get_bb_var('TUNE_ARCH')
33 self.run_test_sstate_creation(['binutils-cross-'+ targetarch, 'binutils-native'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True) 34 self.run_test_sstate_creation(['binutils-cross-'+ targetarch, 'binutils-native'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
34 35
36 @testcase(975)
35 def test_sstate_creation_distro_specific_fail(self): 37 def test_sstate_creation_distro_specific_fail(self):
36 targetarch = get_bb_var('TUNE_ARCH') 38 targetarch = get_bb_var('TUNE_ARCH')
37 self.run_test_sstate_creation(['binutils-cross-'+ targetarch, 'binutils-native'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True, should_pass=False) 39 self.run_test_sstate_creation(['binutils-cross-'+ targetarch, 'binutils-native'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True, should_pass=False)
38 40
41 @testcase(976)
39 def test_sstate_creation_distro_nonspecific_pass(self): 42 def test_sstate_creation_distro_nonspecific_pass(self):
40 self.run_test_sstate_creation(['eglibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True) 43 self.run_test_sstate_creation(['eglibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
41 44
45 @testcase(976)
42 def test_sstate_creation_distro_nonspecific_fail(self): 46 def test_sstate_creation_distro_nonspecific_fail(self):
43 self.run_test_sstate_creation(['eglibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True, should_pass=False) 47 self.run_test_sstate_creation(['eglibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True, should_pass=False)
44 48
@@ -60,13 +64,16 @@ class SStateTests(SStateBase):
60 tgz_removed = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific) 64 tgz_removed = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific)
61 self.assertTrue(not tgz_removed, msg="do_cleansstate didn't remove .tgz sstate files for: %s" % ', '.join(map(str, targets))) 65 self.assertTrue(not tgz_removed, msg="do_cleansstate didn't remove .tgz sstate files for: %s" % ', '.join(map(str, targets)))
62 66
67 @testcase(977)
63 def test_cleansstate_task_distro_specific_nonspecific(self): 68 def test_cleansstate_task_distro_specific_nonspecific(self):
64 targetarch = get_bb_var('TUNE_ARCH') 69 targetarch = get_bb_var('TUNE_ARCH')
65 self.run_test_cleansstate_task(['binutils-cross-' + targetarch, 'binutils-native', 'eglibc-initial'], distro_specific=True, distro_nonspecific=True, temp_sstate_location=True) 70 self.run_test_cleansstate_task(['binutils-cross-' + targetarch, 'binutils-native', 'eglibc-initial'], distro_specific=True, distro_nonspecific=True, temp_sstate_location=True)
66 71
72 @testcase(977)
67 def test_cleansstate_task_distro_nonspecific(self): 73 def test_cleansstate_task_distro_nonspecific(self):
68 self.run_test_cleansstate_task(['eglibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True) 74 self.run_test_cleansstate_task(['eglibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
69 75
76 @testcase(977)
70 def test_cleansstate_task_distro_specific(self): 77 def test_cleansstate_task_distro_specific(self):
71 targetarch = get_bb_var('TUNE_ARCH') 78 targetarch = get_bb_var('TUNE_ARCH')
72 self.run_test_cleansstate_task(['binutils-cross-'+ targetarch, 'binutils-native', 'eglibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True) 79 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):
98 created_once = [x for x in file_tracker_2 if x not in file_tracker_1] 105 created_once = [x for x in file_tracker_2 if x not in file_tracker_1]
99 self.assertTrue(created_once == [], msg="The following sstate files ware created only in the second run: %s" % ', '.join(map(str, created_once))) 106 self.assertTrue(created_once == [], msg="The following sstate files ware created only in the second run: %s" % ', '.join(map(str, created_once)))
100 107
108 @testcase(175)
101 def test_rebuild_distro_specific_sstate_cross_native_targets(self): 109 def test_rebuild_distro_specific_sstate_cross_native_targets(self):
102 targetarch = get_bb_var('TUNE_ARCH') 110 targetarch = get_bb_var('TUNE_ARCH')
103 self.run_test_rebuild_distro_specific_sstate(['binutils-cross-' + targetarch, 'binutils-native'], temp_sstate_location=True) 111 self.run_test_rebuild_distro_specific_sstate(['binutils-cross-' + targetarch, 'binutils-native'], temp_sstate_location=True)
104 112
113 @testcase(175)
105 def test_rebuild_distro_specific_sstate_cross_target(self): 114 def test_rebuild_distro_specific_sstate_cross_target(self):
106 targetarch = get_bb_var('TUNE_ARCH') 115 targetarch = get_bb_var('TUNE_ARCH')
107 self.run_test_rebuild_distro_specific_sstate(['binutils-cross-' + targetarch], temp_sstate_location=True) 116 self.run_test_rebuild_distro_specific_sstate(['binutils-cross-' + targetarch], temp_sstate_location=True)
108 117
118 @testcase(175)
109 def test_rebuild_distro_specific_sstate_native_target(self): 119 def test_rebuild_distro_specific_sstate_native_target(self):
110 self.run_test_rebuild_distro_specific_sstate(['binutils-native'], temp_sstate_location=True) 120 self.run_test_rebuild_distro_specific_sstate(['binutils-native'], temp_sstate_location=True)
111 121
@@ -153,7 +163,7 @@ class SStateTests(SStateBase):
153 expected_not_actual = [x for x in expected_remaining_sstate if x not in actual_remaining_sstate] 163 expected_not_actual = [x for x in expected_remaining_sstate if x not in actual_remaining_sstate]
154 self.assertFalse(expected_not_actual, msg="Extra files ware removed: %s" ', '.join(map(str, expected_not_actual))) 164 self.assertFalse(expected_not_actual, msg="Extra files ware removed: %s" ', '.join(map(str, expected_not_actual)))
155 165
156 166 @testcase(973)
157 def test_sstate_cache_management_script_using_pr_1(self): 167 def test_sstate_cache_management_script_using_pr_1(self):
158 global_config = [] 168 global_config = []
159 target_config = [] 169 target_config = []
@@ -161,6 +171,7 @@ class SStateTests(SStateBase):
161 target_config.append('PR = "0"') 171 target_config.append('PR = "0"')
162 self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic']) 172 self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
163 173
174 @testcase(978)
164 def test_sstate_cache_management_script_using_pr_2(self): 175 def test_sstate_cache_management_script_using_pr_2(self):
165 global_config = [] 176 global_config = []
166 target_config = [] 177 target_config = []
@@ -170,6 +181,7 @@ class SStateTests(SStateBase):
170 target_config.append('PR = "1"') 181 target_config.append('PR = "1"')
171 self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic']) 182 self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
172 183
184 @testcase(979)
173 def test_sstate_cache_management_script_using_pr_3(self): 185 def test_sstate_cache_management_script_using_pr_3(self):
174 global_config = [] 186 global_config = []
175 target_config = [] 187 target_config = []
@@ -181,6 +193,7 @@ class SStateTests(SStateBase):
181 target_config.append('PR = "1"') 193 target_config.append('PR = "1"')
182 self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic']) 194 self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
183 195
196 @testcase(974)
184 def test_sstate_cache_management_script_using_machine(self): 197 def test_sstate_cache_management_script_using_machine(self):
185 global_config = [] 198 global_config = []
186 target_config = [] 199 target_config = []
@@ -189,11 +202,3 @@ class SStateTests(SStateBase):
189 global_config.append('MACHINE = "qemux86"') 202 global_config.append('MACHINE = "qemux86"')
190 target_config.append('') 203 target_config.append('')
191 self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic']) 204 self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
192
193
194
195
196
197
198
199