aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/bbtests.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-15 15:46:46 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-15 16:28:25 +0000
commit0f2ef4304e6a6f18b4ed13f59000b4a1daa35f6b (patch)
tree7bb44a0d2adfb5f7bb96ed413e202ac3647d5eda /meta/lib/oeqa/selftest/bbtests.py
parentd8e2dc4c26b6ad19421be9b365c24f71262992a9 (diff)
downloadopenembedded-core-contrib-0f2ef4304e6a6f18b4ed13f59000b4a1daa35f6b.tar.gz
oeqa: Update to handle domain specific references in build logs
With the addition of the task name to recipe output, the sanity tests need updates where they are looking for specific messages. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/bbtests.py')
-rw-r--r--meta/lib/oeqa/selftest/bbtests.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/bbtests.py b/meta/lib/oeqa/selftest/bbtests.py
index 94ca79c031..42ae9d0cc9 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -8,6 +8,11 @@ from oeqa.utils.decorators import testcase
class BitbakeTests(oeSelfTest):
+ def getline(self, res, line):
+ for l in res.output.split('\n'):
+ if line in l:
+ return l
+
@testcase(789)
def test_run_bitbake_from_dir_1(self):
os.chdir(os.path.join(self.builddir, 'conf'))
@@ -63,7 +68,8 @@ class BitbakeTests(oeSelfTest):
result = bitbake('man -c patch', ignore_status=True)
self.delete_recipeinc('man')
bitbake('-cclean man')
- self.assertTrue("ERROR: Function failed: patch_do_patch" in result.output, msg = "Though no man-1.5h1-make.patch file exists, bitbake didn't output any err. message. bitbake output: %s" % result.output)
+ 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)
@testcase(1354)
def test_force_task_1(self):
@@ -135,7 +141,8 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
self.assertEqual(result.status, 1, msg="Command succeded when it should have failed. bitbake output: %s" % result.output)
self.assertTrue('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output, msg = "\"invalid\" file \
doesn't exist, yet no error message encountered. bitbake output: %s" % result.output)
- self.assertTrue('ERROR: Function failed: Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.' in result.output, msg = "\"invalid\" file \
+ line = self.getline(result, 'Function failed: Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.')
+ self.assertTrue(line and line.startswith("ERROR:"), msg = "\"invalid\" file \
doesn't exist, yet fetcher didn't report any error. bitbake output: %s" % result.output)
@testcase(171)