summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-08-04 17:04:51 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-10 09:36:29 +0100
commit51f74a0d1ce4de9d311becee8e7d7cc7cd703d45 (patch)
tree077f20fbc58ed9e5b0c76324235b530315440702
parent40b89061c1efe8c150c1ac0886616d1b6facc2a0 (diff)
downloadopenembedded-core-contrib-51f74a0d1ce4de9d311becee8e7d7cc7cd703d45.tar.gz
openembedded-core-contrib-51f74a0d1ce4de9d311becee8e7d7cc7cd703d45.tar.bz2
openembedded-core-contrib-51f74a0d1ce4de9d311becee8e7d7cc7cd703d45.zip
oeqa/selftest: disable report-error class when builds are expected to fail
Some invocations of bitbake are expected to fail, so we don't want to report the errors to errors.yoctoproject.org. Also rewrite the messages in test_invalid_patch so they reflect reality. [ YOCTO #10052 ] Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/lib/oeqa/selftest/bbtests.py6
-rw-r--r--meta/lib/oeqa/selftest/buildoptions.py3
2 files changed, 7 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/bbtests.py b/meta/lib/oeqa/selftest/bbtests.py
index 4b423237b0..869840022a 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -64,12 +64,15 @@ class BitbakeTests(oeSelfTest):
@testcase(108)
def test_invalid_patch(self):
+ # This patch already exists in SRC_URI so adding it again will cause the
+ # patch to fail.
self.write_recipeinc('man', 'SRC_URI += "file://man-1.5h1-make.patch"')
+ self.write_config("INHERIT_remove = \"report-error\"")
result = bitbake('man -c patch', ignore_status=True)
self.delete_recipeinc('man')
bitbake('-cclean man')
line = self.getline(result, "Function failed: patch_do_patch")
- self.assertTrue(line and line.startswith("ERROR:"), msg = "Though no man-1.5h1-make.patch file exists, bitbake didn't output any err. message. bitbake output: %s" % result.output)
+ self.assertTrue(line and line.startswith("ERROR:"), msg = "Repeated patch application didn't fail. bitbake output: %s" % result.output)
@testcase(1354)
def test_force_task_1(self):
@@ -212,6 +215,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
def test_continue(self):
self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
SSTATE_DIR = \"${TOPDIR}/download-selftest\"
+INHERIT_remove = \"report-error\"
""")
self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
self.write_recipeinc('man',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" )
diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py
index 4d0192115b..86e4836b83 100644
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ b/meta/lib/oeqa/selftest/buildoptions.py
@@ -89,8 +89,9 @@ class SanityOptionsTest(oeSelfTest):
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.write_config("ERROR_QA_append = \" packages-list\"")
+ 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)