summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/buildoptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/buildoptions.py')
-rw-r--r--meta/lib/oeqa/selftest/buildoptions.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py
index 09657ec189..47549550c7 100644
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ b/meta/lib/oeqa/selftest/buildoptions.py
@@ -35,9 +35,8 @@ class ImageOptionsTests(oeSelfTest):
35 bitbake("ccache-native") 35 bitbake("ccache-native")
36 self.assertTrue(os.path.isfile(os.path.join(get_bb_var('STAGING_BINDIR_NATIVE', 'ccache-native'), "ccache")), msg = "No ccache found under %s" % str(get_bb_var('STAGING_BINDIR_NATIVE', 'ccache-native'))) 36 self.assertTrue(os.path.isfile(os.path.join(get_bb_var('STAGING_BINDIR_NATIVE', 'ccache-native'), "ccache")), msg = "No ccache found under %s" % str(get_bb_var('STAGING_BINDIR_NATIVE', 'ccache-native')))
37 self.write_config('INHERIT += "ccache"') 37 self.write_config('INHERIT += "ccache"')
38 bitbake("m4 -c cleansstate") 38 self.add_command_to_tearDown('bitbake -c clean m4')
39 bitbake("m4 -c compile") 39 bitbake("m4 -f -c compile")
40 self.addCleanup(bitbake, 'ccache-native -ccleansstate')
41 res = runCmd("grep ccache %s" % (os.path.join(get_bb_var("WORKDIR","m4"),"temp/log.do_compile")), ignore_status=True) 40 res = runCmd("grep ccache %s" % (os.path.join(get_bb_var("WORKDIR","m4"),"temp/log.do_compile")), ignore_status=True)
42 self.assertEqual(0, res.status, msg="No match for ccache in m4 log.do_compile. For further details: %s" % os.path.join(get_bb_var("WORKDIR","m4"),"temp/log.do_compile")) 41 self.assertEqual(0, res.status, msg="No match for ccache in m4 log.do_compile. For further details: %s" % os.path.join(get_bb_var("WORKDIR","m4"),"temp/log.do_compile"))
43 42
@@ -71,14 +70,14 @@ class SanityOptionsTest(oeSelfTest):
71 70
72 @testcase(927) 71 @testcase(927)
73 def test_options_warnqa_errorqa_switch(self): 72 def test_options_warnqa_errorqa_switch(self):
74 bitbake("xcursor-transparent-theme -ccleansstate")
75 73
76 self.write_config("INHERIT_remove = \"report-error\"") 74 self.write_config("INHERIT_remove = \"report-error\"")
77 if "packages-list" not in get_bb_var("ERROR_QA"): 75 if "packages-list" not in get_bb_var("ERROR_QA"):
78 self.append_config("ERROR_QA_append = \" packages-list\"") 76 self.append_config("ERROR_QA_append = \" packages-list\"")
79 77
80 self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"') 78 self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
81 res = bitbake("xcursor-transparent-theme", ignore_status=True) 79 self.add_command_to_tearDown('bitbake -c clean xcursor-transparent-theme')
80 res = bitbake("xcursor-transparent-theme -f -c package", ignore_status=True)
82 self.delete_recipeinc('xcursor-transparent-theme') 81 self.delete_recipeinc('xcursor-transparent-theme')
83 line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.") 82 line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.")
84 self.assertTrue(line and line.startswith("ERROR:"), msg=res.output) 83 self.assertTrue(line and line.startswith("ERROR:"), msg=res.output)
@@ -86,8 +85,7 @@ class SanityOptionsTest(oeSelfTest):
86 self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"') 85 self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
87 self.append_config('ERROR_QA_remove = "packages-list"') 86 self.append_config('ERROR_QA_remove = "packages-list"')
88 self.append_config('WARN_QA_append = " packages-list"') 87 self.append_config('WARN_QA_append = " packages-list"')
89 bitbake("xcursor-transparent-theme -ccleansstate") 88 res = bitbake("xcursor-transparent-theme -f -c package")
90 res = bitbake("xcursor-transparent-theme")
91 self.delete_recipeinc('xcursor-transparent-theme') 89 self.delete_recipeinc('xcursor-transparent-theme')
92 line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.") 90 line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.")
93 self.assertTrue(line and line.startswith("WARNING:"), msg=res.output) 91 self.assertTrue(line and line.startswith("WARNING:"), msg=res.output)
@@ -96,8 +94,8 @@ class SanityOptionsTest(oeSelfTest):
96 def test_sanity_unsafe_script_references(self): 94 def test_sanity_unsafe_script_references(self):
97 self.write_config('WARN_QA_append = " unsafe-references-in-scripts"') 95 self.write_config('WARN_QA_append = " unsafe-references-in-scripts"')
98 96
99 bitbake("-ccleansstate gzip") 97 self.add_command_to_tearDown('bitbake -c clean gzip')
100 res = bitbake("gzip") 98 res = bitbake("gzip -f -c package_qa")
101 line = self.getline(res, "QA Issue: gzip") 99 line = self.getline(res, "QA Issue: gzip")
102 self.assertFalse(line, "WARNING: QA Issue: gzip message is present in bitbake's output and shouldn't be: %s" % res.output) 100 self.assertFalse(line, "WARNING: QA Issue: gzip message is present in bitbake's output and shouldn't be: %s" % res.output)
103 101
@@ -106,7 +104,7 @@ do_install_append_pn-gzip () {
106 echo "\n${bindir}/test" >> ${D}${bindir}/zcat 104 echo "\n${bindir}/test" >> ${D}${bindir}/zcat
107} 105}
108""") 106""")
109 res = bitbake("gzip") 107 res = bitbake("gzip -f -c package_qa")
110 line = self.getline(res, "QA Issue: gzip") 108 line = self.getline(res, "QA Issue: gzip")
111 self.assertTrue(line and line.startswith("WARNING:"), "WARNING: QA Issue: gzip message is not present in bitbake's output: %s" % res.output) 109 self.assertTrue(line and line.startswith("WARNING:"), "WARNING: QA Issue: gzip message is not present in bitbake's output: %s" % res.output)
112 110