diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/buildoptions.py')
-rw-r--r-- | meta/lib/oeqa/selftest/buildoptions.py | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py index d40eb007de..28734fd1f0 100644 --- a/meta/lib/oeqa/selftest/buildoptions.py +++ b/meta/lib/oeqa/selftest/buildoptions.py | |||
@@ -36,9 +36,8 @@ class ImageOptionsTests(oeSelfTest): | |||
36 | p = get_bb_var('SYSROOT_DESTDIR', 'ccache-native') + get_bb_var('bindir', 'ccache-native') + "/" + "ccache" | 36 | p = get_bb_var('SYSROOT_DESTDIR', 'ccache-native') + get_bb_var('bindir', 'ccache-native') + "/" + "ccache" |
37 | self.assertTrue(os.path.isfile(p), msg = "No ccache found (%s)" % p) | 37 | self.assertTrue(os.path.isfile(p), msg = "No ccache found (%s)" % p) |
38 | self.write_config('INHERIT += "ccache"') | 38 | self.write_config('INHERIT += "ccache"') |
39 | bitbake("m4 -c cleansstate") | 39 | self.add_command_to_tearDown('bitbake -c clean m4') |
40 | bitbake("m4 -c compile") | 40 | bitbake("m4 -f -c compile") |
41 | self.addCleanup(bitbake, 'ccache-native -ccleansstate') | ||
42 | res = runCmd("grep ccache %s" % (os.path.join(get_bb_var("WORKDIR","m4"),"temp/log.do_compile")), ignore_status=True) | 41 | res = runCmd("grep ccache %s" % (os.path.join(get_bb_var("WORKDIR","m4"),"temp/log.do_compile")), ignore_status=True) |
43 | 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")) | 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")) |
44 | 43 | ||
@@ -75,14 +74,14 @@ class SanityOptionsTest(oeSelfTest): | |||
75 | 74 | ||
76 | @testcase(927) | 75 | @testcase(927) |
77 | def test_options_warnqa_errorqa_switch(self): | 76 | def test_options_warnqa_errorqa_switch(self): |
78 | bitbake("xcursor-transparent-theme -ccleansstate") | ||
79 | 77 | ||
80 | self.write_config("INHERIT_remove = \"report-error\"") | 78 | self.write_config("INHERIT_remove = \"report-error\"") |
81 | if "packages-list" not in get_bb_var("ERROR_QA"): | 79 | if "packages-list" not in get_bb_var("ERROR_QA"): |
82 | self.append_config("ERROR_QA_append = \" packages-list\"") | 80 | self.append_config("ERROR_QA_append = \" packages-list\"") |
83 | 81 | ||
84 | self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"') | 82 | self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"') |
85 | res = bitbake("xcursor-transparent-theme", ignore_status=True) | 83 | self.add_command_to_tearDown('bitbake -c clean xcursor-transparent-theme') |
84 | res = bitbake("xcursor-transparent-theme -f -c package", ignore_status=True) | ||
86 | self.delete_recipeinc('xcursor-transparent-theme') | 85 | self.delete_recipeinc('xcursor-transparent-theme') |
87 | line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.") | 86 | line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.") |
88 | self.assertTrue(line and line.startswith("ERROR:"), msg=res.output) | 87 | self.assertTrue(line and line.startswith("ERROR:"), msg=res.output) |
@@ -90,8 +89,7 @@ class SanityOptionsTest(oeSelfTest): | |||
90 | self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"') | 89 | self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"') |
91 | self.append_config('ERROR_QA_remove = "packages-list"') | 90 | self.append_config('ERROR_QA_remove = "packages-list"') |
92 | self.append_config('WARN_QA_append = " packages-list"') | 91 | self.append_config('WARN_QA_append = " packages-list"') |
93 | bitbake("xcursor-transparent-theme -ccleansstate") | 92 | res = bitbake("xcursor-transparent-theme -f -c package") |
94 | res = bitbake("xcursor-transparent-theme") | ||
95 | self.delete_recipeinc('xcursor-transparent-theme') | 93 | self.delete_recipeinc('xcursor-transparent-theme') |
96 | line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.") | 94 | line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.") |
97 | self.assertTrue(line and line.startswith("WARNING:"), msg=res.output) | 95 | self.assertTrue(line and line.startswith("WARNING:"), msg=res.output) |
@@ -100,8 +98,8 @@ class SanityOptionsTest(oeSelfTest): | |||
100 | def test_sanity_unsafe_script_references(self): | 98 | def test_sanity_unsafe_script_references(self): |
101 | self.write_config('WARN_QA_append = " unsafe-references-in-scripts"') | 99 | self.write_config('WARN_QA_append = " unsafe-references-in-scripts"') |
102 | 100 | ||
103 | bitbake("-ccleansstate gzip") | 101 | self.add_command_to_tearDown('bitbake -c clean gzip') |
104 | res = bitbake("gzip") | 102 | res = bitbake("gzip -f -c package_qa") |
105 | line = self.getline(res, "QA Issue: gzip") | 103 | line = self.getline(res, "QA Issue: gzip") |
106 | self.assertFalse(line, "WARNING: QA Issue: gzip message is present in bitbake's output and shouldn't be: %s" % res.output) | 104 | self.assertFalse(line, "WARNING: QA Issue: gzip message is present in bitbake's output and shouldn't be: %s" % res.output) |
107 | 105 | ||
@@ -110,7 +108,7 @@ do_install_append_pn-gzip () { | |||
110 | echo "\n${bindir}/test" >> ${D}${bindir}/zcat | 108 | echo "\n${bindir}/test" >> ${D}${bindir}/zcat |
111 | } | 109 | } |
112 | """) | 110 | """) |
113 | res = bitbake("gzip") | 111 | res = bitbake("gzip -f -c package_qa") |
114 | line = self.getline(res, "QA Issue: gzip") | 112 | line = self.getline(res, "QA Issue: gzip") |
115 | self.assertTrue(line and line.startswith("WARNING:"), "WARNING: QA Issue: gzip message is not present in bitbake's output: %s" % res.output) | 113 | self.assertTrue(line and line.startswith("WARNING:"), "WARNING: QA Issue: gzip message is not present in bitbake's output: %s" % res.output) |
116 | 114 | ||
@@ -118,7 +116,6 @@ do_install_append_pn-gzip () { | |||
118 | def test_sanity_unsafe_binary_references(self): | 116 | def test_sanity_unsafe_binary_references(self): |
119 | self.write_config('WARN_QA_append = " unsafe-references-in-binaries"') | 117 | self.write_config('WARN_QA_append = " unsafe-references-in-binaries"') |
120 | 118 | ||
121 | bitbake("-ccleansstate nfs-utils") | ||
122 | #res = bitbake("nfs-utils") | 119 | #res = bitbake("nfs-utils") |
123 | # FIXME when nfs-utils passes this test | 120 | # FIXME when nfs-utils passes this test |
124 | #line = self.getline(res, "QA Issue: nfs-utils") | 121 | #line = self.getline(res, "QA Issue: nfs-utils") |
@@ -129,7 +126,8 @@ do_install_append_pn-gzip () { | |||
129 | # echo "\n${bindir}/test" >> ${D}${base_sbindir}/osd_login | 126 | # echo "\n${bindir}/test" >> ${D}${base_sbindir}/osd_login |
130 | #} | 127 | #} |
131 | #""") | 128 | #""") |
132 | res = bitbake("nfs-utils") | 129 | self.add_command_to_tearDown('bitbake -c clean nfs-utils') |
130 | res = bitbake("nfs-utils -f -c package_qa") | ||
133 | line = self.getline(res, "QA Issue: nfs-utils") | 131 | line = self.getline(res, "QA Issue: nfs-utils") |
134 | self.assertTrue(line and line.startswith("WARNING:"), "WARNING: QA Issue: nfs-utils message is not present in bitbake's output: %s" % res.output) | 132 | self.assertTrue(line and line.startswith("WARNING:"), "WARNING: QA Issue: nfs-utils message is not present in bitbake's output: %s" % res.output) |
135 | 133 | ||