diff options
author | Paulo Neves <ptsneves@gmail.com> | 2022-07-03 13:41:13 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-07-08 00:09:42 +0100 |
commit | 2ef273f424c62253c89e8b6bfc173575bc084c54 (patch) | |
tree | 39cb1b09180538c90d6e5c0e10f77db277b9356d | |
parent | a5b921b3155a0bdf89b5b49204b177526d4d72c5 (diff) | |
download | poky-2ef273f424c62253c89e8b6bfc173575bc084c54.tar.gz |
oeqa/sysroot.py: Check bitbake return status
bitbake ran but we incorrectly did not assert the exit status needs to
be non 0. Now all sysroot tests commands expected to fail are verified
to do so.
(From OE-Core rev: 5fe8c14f50d414e768588cef0675d8ef296ced77)
Signed-off-by: Paulo Neves <ptsneves@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/selftest/cases/sysroot.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/sysroot.py b/meta/lib/oeqa/selftest/cases/sysroot.py index 588fc8c713..294ba4a4a0 100644 --- a/meta/lib/oeqa/selftest/cases/sysroot.py +++ b/meta/lib/oeqa/selftest/cases/sysroot.py | |||
@@ -45,6 +45,7 @@ TESTSTRING:pn-sysroot-test-arch2 = "%s" | |||
45 | expected = "maximum shebang size exceeded, the maximum size is 128. [shebang-size]" | 45 | expected = "maximum shebang size exceeded, the maximum size is 128. [shebang-size]" |
46 | res = bitbake("sysroot-shebang-test-native -c populate_sysroot", ignore_status=True) | 46 | res = bitbake("sysroot-shebang-test-native -c populate_sysroot", ignore_status=True) |
47 | self.assertTrue(expected in res.output, msg=res.output) | 47 | self.assertTrue(expected in res.output, msg=res.output) |
48 | self.assertTrue(res.status != 0) | ||
48 | 49 | ||
49 | def test_sysroot_la(self): | 50 | def test_sysroot_la(self): |
50 | """ | 51 | """ |
@@ -57,10 +58,12 @@ TESTSTRING:pn-sysroot-test-arch2 = "%s" | |||
57 | res = bitbake("sysroot-la-test -c populate_sysroot", ignore_status=True) | 58 | res = bitbake("sysroot-la-test -c populate_sysroot", ignore_status=True) |
58 | self.assertTrue(expected in res.output, msg=res.output) | 59 | self.assertTrue(expected in res.output, msg=res.output) |
59 | self.assertTrue('[la]' in res.output, msg=res.output) | 60 | self.assertTrue('[la]' in res.output, msg=res.output) |
61 | self.assertTrue(res.status != 0) | ||
60 | 62 | ||
61 | res = bitbake("sysroot-la-test-native -c populate_sysroot", ignore_status=True) | 63 | res = bitbake("sysroot-la-test-native -c populate_sysroot", ignore_status=True) |
62 | self.assertTrue(expected in res.output, msg=res.output) | 64 | self.assertTrue(expected in res.output, msg=res.output) |
63 | self.assertTrue('[la]' in res.output, msg=res.output) | 65 | self.assertTrue('[la]' in res.output, msg=res.output) |
66 | self.assertTrue(res.status != 0) | ||
64 | 67 | ||
65 | def test_sysroot_pkgconfig(self): | 68 | def test_sysroot_pkgconfig(self): |
66 | """ | 69 | """ |
@@ -73,7 +76,9 @@ TESTSTRING:pn-sysroot-test-arch2 = "%s" | |||
73 | res = bitbake("sysroot-pc-test -c populate_sysroot", ignore_status=True) | 76 | res = bitbake("sysroot-pc-test -c populate_sysroot", ignore_status=True) |
74 | self.assertTrue('[pkgconfig]' in res.output, msg=res.output) | 77 | self.assertTrue('[pkgconfig]' in res.output, msg=res.output) |
75 | self.assertTrue(expected in res.output, msg=res.output) | 78 | self.assertTrue(expected in res.output, msg=res.output) |
79 | self.assertTrue(res.status != 0) | ||
76 | 80 | ||
77 | res = bitbake("sysroot-pc-test-native -c populate_sysroot", ignore_status=True) | 81 | res = bitbake("sysroot-pc-test-native -c populate_sysroot", ignore_status=True) |
78 | self.assertTrue(expected in res.output, msg=res.output) | 82 | self.assertTrue(expected in res.output, msg=res.output) |
79 | self.assertTrue('[pkgconfig]' in res.output, msg=res.output) | 83 | self.assertTrue('[pkgconfig]' in res.output, msg=res.output) |
84 | self.assertTrue(res.status != 0) | ||