summaryrefslogtreecommitdiff
path: root/import-layers/yocto-poky/meta/lib/oeqa/selftest/buildoptions.py
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2017-12-04 09:01:44 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-12-14 20:17:23 +0300
commit37a0e4ddff58c0120cc5cfef104b60d0e180638c (patch)
tree1628857a2eb33ab517ba93d6a3ca25e55bd3e628 /import-layers/yocto-poky/meta/lib/oeqa/selftest/buildoptions.py
parent3c4c45d1e9a2324191a8640b22df1b71f15f3037 (diff)
downloadopenbmc-37a0e4ddff58c0120cc5cfef104b60d0e180638c.tar.xz
Squashed 'import-layers/yocto-poky/' changes from dc8508f6099..67491b0c104
Yocto 2.2.2 (Morty) Change-Id: Id9a452e28940d9f166957de243d9cb1d8818704e git-subtree-dir: import-layers/yocto-poky git-subtree-split: 67491b0c104101bb9f366d697edd23c895be4302 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'import-layers/yocto-poky/meta/lib/oeqa/selftest/buildoptions.py')
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/selftest/buildoptions.py37
1 files changed, 8 insertions, 29 deletions
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/buildoptions.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/buildoptions.py
index 9487898b0..47549550c 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/buildoptions.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/buildoptions.py
@@ -35,9 +35,8 @@ class ImageOptionsTests(oeSelfTest):
bitbake("ccache-native")
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')))
self.write_config('INHERIT += "ccache"')
- bitbake("m4 -c cleansstate")
- bitbake("m4 -c compile")
- self.addCleanup(bitbake, 'ccache-native -ccleansstate')
+ self.add_command_to_tearDown('bitbake -c clean m4')
+ bitbake("m4 -f -c compile")
res = runCmd("grep ccache %s" % (os.path.join(get_bb_var("WORKDIR","m4"),"temp/log.do_compile")), ignore_status=True)
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"))
@@ -71,14 +70,14 @@ class SanityOptionsTest(oeSelfTest):
@testcase(927)
def test_options_warnqa_errorqa_switch(self):
- bitbake("xcursor-transparent-theme -ccleansstate")
self.write_config("INHERIT_remove = \"report-error\"")
if "packages-list" not in get_bb_var("ERROR_QA"):
self.append_config("ERROR_QA_append = \" packages-list\"")
self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
- res = bitbake("xcursor-transparent-theme", ignore_status=True)
+ self.add_command_to_tearDown('bitbake -c clean xcursor-transparent-theme')
+ res = bitbake("xcursor-transparent-theme -f -c package", ignore_status=True)
self.delete_recipeinc('xcursor-transparent-theme')
line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.")
self.assertTrue(line and line.startswith("ERROR:"), msg=res.output)
@@ -86,8 +85,7 @@ class SanityOptionsTest(oeSelfTest):
self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
self.append_config('ERROR_QA_remove = "packages-list"')
self.append_config('WARN_QA_append = " packages-list"')
- bitbake("xcursor-transparent-theme -ccleansstate")
- res = bitbake("xcursor-transparent-theme")
+ res = bitbake("xcursor-transparent-theme -f -c package")
self.delete_recipeinc('xcursor-transparent-theme')
line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.")
self.assertTrue(line and line.startswith("WARNING:"), msg=res.output)
@@ -96,8 +94,8 @@ class SanityOptionsTest(oeSelfTest):
def test_sanity_unsafe_script_references(self):
self.write_config('WARN_QA_append = " unsafe-references-in-scripts"')
- bitbake("-ccleansstate gzip")
- res = bitbake("gzip")
+ self.add_command_to_tearDown('bitbake -c clean gzip')
+ res = bitbake("gzip -f -c package_qa")
line = self.getline(res, "QA Issue: gzip")
self.assertFalse(line, "WARNING: QA Issue: gzip message is present in bitbake's output and shouldn't be: %s" % res.output)
@@ -106,29 +104,10 @@ do_install_append_pn-gzip () {
echo "\n${bindir}/test" >> ${D}${bindir}/zcat
}
""")
- res = bitbake("gzip")
+ res = bitbake("gzip -f -c package_qa")
line = self.getline(res, "QA Issue: gzip")
self.assertTrue(line and line.startswith("WARNING:"), "WARNING: QA Issue: gzip message is not present in bitbake's output: %s" % res.output)
- @testcase(1434)
- def test_sanity_unsafe_binary_references(self):
- self.write_config('WARN_QA_append = " unsafe-references-in-binaries"')
-
- bitbake("-ccleansstate nfs-utils")
- #res = bitbake("nfs-utils")
- # FIXME when nfs-utils passes this test
- #line = self.getline(res, "QA Issue: nfs-utils")
- #self.assertFalse(line, "WARNING: QA Issue: nfs-utils message is present in bitbake's output and shouldn't be: %s" % res.output)
-
-# self.append_config("""
-#do_install_append_pn-nfs-utils () {
-# echo "\n${bindir}/test" >> ${D}${base_sbindir}/osd_login
-#}
-#""")
- res = bitbake("nfs-utils")
- line = self.getline(res, "QA Issue: nfs-utils")
- self.assertTrue(line and line.startswith("WARNING:"), "WARNING: QA Issue: nfs-utils message is not present in bitbake's output: %s" % res.output)
-
@testcase(1421)
def test_layer_without_git_dir(self):
"""