summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-29 15:36:48 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-04 17:11:00 +0000
commit68db200ca5b404d6c0aa0cbf5a587397d0aa65da (patch)
tree462ec4402570a7306cac54eb5264d0bfb5008825
parentf818f7359c1a5db2c5c041c42eecb9f0434d9800 (diff)
downloadopenembedded-core-68db200ca5b404d6c0aa0cbf5a587397d0aa65da.tar.gz
openembedded-core-68db200ca5b404d6c0aa0cbf5a587397d0aa65da.tar.bz2
openembedded-core-68db200ca5b404d6c0aa0cbf5a587397d0aa65da.zip
oeqa/buildoptions: Improve unsafe references tests
Fixing one of the recipes not to contain unsafe references to paths results in this QA test failing. Improve the test so that we test the recipe works, then if we intentionally break the recipe, the issue is detected. Also split out the binaries test from the scripts test. The binaries issue may also get 'fixed' in future and need the same fix. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/selftest/buildoptions.py34
1 files changed, 30 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py
index e2d12c3f11..6f322c5ba7 100644
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ b/meta/lib/oeqa/selftest/buildoptions.py
@@ -102,12 +102,38 @@ class SanityOptionsTest(oeSelfTest):
self.assertTrue(line and line.startswith("WARNING:"), msg=res.output)
@testcase(278)
- def test_sanity_userspace_dependency(self):
- self.write_config('WARN_QA_append = " unsafe-references-in-binaries unsafe-references-in-scripts"')
- bitbake("-ccleansstate gzip nfs-utils")
- res = bitbake("gzip nfs-utils")
+ def test_sanity_unsafe_script_references(self):
+ self.write_config('WARN_QA_append = " unsafe-references-in-scripts"')
+
+ bitbake("-ccleansstate gzip")
+ res = bitbake("gzip")
+ 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)
+
+ self.append_config("""
+do_install_append_pn-gzip () {
+ echo "\n${bindir}/test" >> ${D}${bindir}/zcat
+}
+""")
+ res = bitbake("gzip")
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)
+
+ 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)