diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/bbtests.py')
-rw-r--r-- | meta/lib/oeqa/selftest/bbtests.py | 11 |
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 | |||
8 | 8 | ||
9 | class BitbakeTests(oeSelfTest): | 9 | class BitbakeTests(oeSelfTest): |
10 | 10 | ||
11 | def getline(self, res, line): | ||
12 | for l in res.output.split('\n'): | ||
13 | if line in l: | ||
14 | return l | ||
15 | |||
11 | @testcase(789) | 16 | @testcase(789) |
12 | def test_run_bitbake_from_dir_1(self): | 17 | def test_run_bitbake_from_dir_1(self): |
13 | os.chdir(os.path.join(self.builddir, 'conf')) | 18 | os.chdir(os.path.join(self.builddir, 'conf')) |
@@ -63,7 +68,8 @@ class BitbakeTests(oeSelfTest): | |||
63 | result = bitbake('man -c patch', ignore_status=True) | 68 | result = bitbake('man -c patch', ignore_status=True) |
64 | self.delete_recipeinc('man') | 69 | self.delete_recipeinc('man') |
65 | bitbake('-cclean man') | 70 | bitbake('-cclean man') |
66 | 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) | 71 | line = self.getline(result, "Function failed: patch_do_patch") |
72 | 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) | ||
67 | 73 | ||
68 | @testcase(1354) | 74 | @testcase(1354) |
69 | def test_force_task_1(self): | 75 | def test_force_task_1(self): |
@@ -135,7 +141,8 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\" | |||
135 | self.assertEqual(result.status, 1, msg="Command succeded when it should have failed. bitbake output: %s" % result.output) | 141 | self.assertEqual(result.status, 1, msg="Command succeded when it should have failed. bitbake output: %s" % result.output) |
136 | self.assertTrue('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output, msg = "\"invalid\" file \ | 142 | self.assertTrue('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output, msg = "\"invalid\" file \ |
137 | doesn't exist, yet no error message encountered. bitbake output: %s" % result.output) | 143 | doesn't exist, yet no error message encountered. bitbake output: %s" % result.output) |
138 | self.assertTrue('ERROR: Function failed: Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.' in result.output, msg = "\"invalid\" file \ | 144 | line = self.getline(result, 'Function failed: Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.') |
145 | self.assertTrue(line and line.startswith("ERROR:"), msg = "\"invalid\" file \ | ||
139 | doesn't exist, yet fetcher didn't report any error. bitbake output: %s" % result.output) | 146 | doesn't exist, yet fetcher didn't report any error. bitbake output: %s" % result.output) |
140 | 147 | ||
141 | @testcase(171) | 148 | @testcase(171) |