summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorLucian Musat <georgex.l.musat@intel.com>2014-09-22 13:45:05 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-22 13:04:23 +0100
commit05fabfca18299058d985fd4c8b1e11bbee3c5968 (patch)
tree4b01b2ba040873286fe2e14e815c1b23ba11f8e4 /meta/lib
parent5ceb02d6946a3c5da4f7d8e685e0e302fe7ac0c4 (diff)
downloadpoky-05fabfca18299058d985fd4c8b1e11bbee3c5968.tar.gz
oeqa/selftest: Added decorators to buildoptions.py
(From OE-Core rev: ea393e90055ea13b0c5a6950dbd388e826a66623) Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/buildoptions.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py
index ec541e5be6..a250cae0e1 100644
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ b/meta/lib/oeqa/selftest/buildoptions.py
@@ -7,9 +7,11 @@ from oeqa.selftest.base import oeSelfTest
7from oeqa.selftest.buildhistory import BuildhistoryBase 7from oeqa.selftest.buildhistory import BuildhistoryBase
8from oeqa.utils.commands import runCmd, bitbake, get_bb_var 8from oeqa.utils.commands import runCmd, bitbake, get_bb_var
9import oeqa.utils.ftools as ftools 9import oeqa.utils.ftools as ftools
10from oeqa.utils.decorators import testcase
10 11
11class ImageOptionsTests(oeSelfTest): 12class ImageOptionsTests(oeSelfTest):
12 13
14 @testcase(761)
13 def test_incremental_image_generation(self): 15 def test_incremental_image_generation(self):
14 bitbake("-c cleanall core-image-minimal") 16 bitbake("-c cleanall core-image-minimal")
15 self.write_config('INC_RPM_IMAGE_GEN = "1"') 17 self.write_config('INC_RPM_IMAGE_GEN = "1"')
@@ -22,6 +24,7 @@ class ImageOptionsTests(oeSelfTest):
22 res = runCmd("grep 'Removing openssh-sshd' %s" %(os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")),ignore_status=True) 24 res = runCmd("grep 'Removing openssh-sshd' %s" %(os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")),ignore_status=True)
23 self.assertEqual(0, res.status, msg="openssh-sshd was not removed from image") 25 self.assertEqual(0, res.status, msg="openssh-sshd was not removed from image")
24 26
27 @testcase(925)
25 def test_rm_old_image(self): 28 def test_rm_old_image(self):
26 bitbake("core-image-minimal") 29 bitbake("core-image-minimal")
27 deploydir = get_bb_var("DEPLOY_DIR_IMAGE", target="core-image-minimal") 30 deploydir = get_bb_var("DEPLOY_DIR_IMAGE", target="core-image-minimal")
@@ -37,6 +40,7 @@ class ImageOptionsTests(oeSelfTest):
37 remaining_not_expected = [path for path in track_original_files if os.path.basename(path) in deploydir_files] 40 remaining_not_expected = [path for path in track_original_files if os.path.basename(path) in deploydir_files]
38 self.assertFalse(remaining_not_expected, msg="\nThe following image files ware not removed: %s" % ', '.join(map(str, remaining_not_expected))) 41 self.assertFalse(remaining_not_expected, msg="\nThe following image files ware not removed: %s" % ', '.join(map(str, remaining_not_expected)))
39 42
43 @testcase(286)
40 def test_ccache_tool(self): 44 def test_ccache_tool(self):
41 bitbake("ccache-native") 45 bitbake("ccache-native")
42 self.assertTrue(os.path.isfile(os.path.join(get_bb_var('STAGING_BINDIR_NATIVE', 'ccache-native'), "ccache"))) 46 self.assertTrue(os.path.isfile(os.path.join(get_bb_var('STAGING_BINDIR_NATIVE', 'ccache-native'), "ccache")))
@@ -50,6 +54,7 @@ class ImageOptionsTests(oeSelfTest):
50 54
51class DiskMonTest(oeSelfTest): 55class DiskMonTest(oeSelfTest):
52 56
57 @testcase(277)
53 def test_stoptask_behavior(self): 58 def test_stoptask_behavior(self):
54 self.write_config('BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},100000G,100K"') 59 self.write_config('BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},100000G,100K"')
55 res = bitbake("m4", ignore_status = True) 60 res = bitbake("m4", ignore_status = True)
@@ -65,6 +70,7 @@ class DiskMonTest(oeSelfTest):
65 70
66class SanityOptionsTest(oeSelfTest): 71class SanityOptionsTest(oeSelfTest):
67 72
73 @testcase(927)
68 def test_options_warnqa_errorqa_switch(self): 74 def test_options_warnqa_errorqa_switch(self):
69 bitbake("xcursor-transparent-theme -ccleansstate") 75 bitbake("xcursor-transparent-theme -ccleansstate")
70 76
@@ -84,6 +90,7 @@ class SanityOptionsTest(oeSelfTest):
84 self.delete_recipeinc('xcursor-transparent-theme') 90 self.delete_recipeinc('xcursor-transparent-theme')
85 self.assertTrue("WARNING: QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors." in res.output, msg=res.output) 91 self.assertTrue("WARNING: QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors." in res.output, msg=res.output)
86 92
93 @testcase(278)
87 def test_sanity_userspace_dependency(self): 94 def test_sanity_userspace_dependency(self):
88 self.append_config('WARN_QA_append = " unsafe-references-in-binaries unsafe-references-in-scripts"') 95 self.append_config('WARN_QA_append = " unsafe-references-in-binaries unsafe-references-in-scripts"')
89 bitbake("-ccleansstate gzip nfs-utils") 96 bitbake("-ccleansstate gzip nfs-utils")
@@ -93,10 +100,12 @@ class SanityOptionsTest(oeSelfTest):
93 100
94class BuildhistoryTests(BuildhistoryBase): 101class BuildhistoryTests(BuildhistoryBase):
95 102
103 @testcase(293)
96 def test_buildhistory_basic(self): 104 def test_buildhistory_basic(self):
97 self.run_buildhistory_operation('xcursor-transparent-theme') 105 self.run_buildhistory_operation('xcursor-transparent-theme')
98 self.assertTrue(os.path.isdir(get_bb_var('BUILDHISTORY_DIR'))) 106 self.assertTrue(os.path.isdir(get_bb_var('BUILDHISTORY_DIR')))
99 107
108 @testcase(294)
100 def test_buildhistory_buildtime_pr_backwards(self): 109 def test_buildhistory_buildtime_pr_backwards(self):
101 self.add_command_to_tearDown('cleanup-workdir') 110 self.add_command_to_tearDown('cleanup-workdir')
102 target = 'xcursor-transparent-theme' 111 target = 'xcursor-transparent-theme'