[v2,3/3] oeqa/sysroot.py: Check bitbake return status

Message ID 20220704144653.2490662-3-ptsneves@gmail.com
State Accepted, archived
Commit 5fe8c14f50d414e768588cef0675d8ef296ced77
Headers show
Series [v2,1/3] utils: create_cmdline_shebang_wrapper whitespace and sed refactor | expand

Commit Message

Paulo Neves July 4, 2022, 2:46 p.m. UTC
bitbake ran but we incorrectly did not check the exit status needs to
be non 0. Now all sysroot tests commands expected to fail are verified
to do so.

Signed-off-by: Paulo Neves <ptsneves@gmail.com>
---
 meta/lib/oeqa/selftest/cases/sysroot.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Comments

Richard Purdie July 4, 2022, 9:19 p.m. UTC | #1
On Mon, 2022-07-04 at 16:46 +0200, Paulo Neves wrote:
> bitbake ran but we incorrectly did not check the exit status needs to
> be non 0. Now all sysroot tests commands expected to fail are verified
> to do so.

This caused a series of failures on the autobuilder:

https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/3775/steps/15/logs/stdio

https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/3786/steps/14/logs/stdio
(and a couple of others)

Not sure what happened at this point.

Cheers,

Richard

Patch

diff --git a/meta/lib/oeqa/selftest/cases/sysroot.py b/meta/lib/oeqa/selftest/cases/sysroot.py
index 588fc8c713..6371a10074 100644
--- a/meta/lib/oeqa/selftest/cases/sysroot.py
+++ b/meta/lib/oeqa/selftest/cases/sysroot.py
@@ -43,7 +43,7 @@  TESTSTRING:pn-sysroot-test-arch2 = "%s"
         Author:    Paulo Neves <ptsneves@gmail.com>
         """
         expected = "maximum shebang size exceeded, the maximum size is 128. [shebang-size]"
-        res = bitbake("sysroot-shebang-test-native -c populate_sysroot", ignore_status=True)
+        res = bitbake("sysroot-shebang-test-native -c populate_sysroot")
         self.assertTrue(expected in res.output, msg=res.output)
 
     def test_sysroot_la(self):
@@ -54,11 +54,11 @@  TESTSTRING:pn-sysroot-test-arch2 = "%s"
         """
         expected = "la-test.la failed sanity test (workdir) in path"
 
-        res = bitbake("sysroot-la-test -c populate_sysroot", ignore_status=True)
+        res = bitbake("sysroot-la-test -c populate_sysroot")
         self.assertTrue(expected in res.output, msg=res.output)
         self.assertTrue('[la]' in res.output, msg=res.output)
 
-        res = bitbake("sysroot-la-test-native -c populate_sysroot", ignore_status=True)
+        res = bitbake("sysroot-la-test-native -c populate_sysroot")
         self.assertTrue(expected in res.output, msg=res.output)
         self.assertTrue('[la]' in res.output, msg=res.output)
 
@@ -70,10 +70,11 @@  TESTSTRING:pn-sysroot-test-arch2 = "%s"
         """
         expected = "test.pc failed sanity test (tmpdir) in path"
 
-        res = bitbake("sysroot-pc-test -c populate_sysroot", ignore_status=True)
+        res = bitbake("sysroot-pc-test -c populate_sysroot")
         self.assertTrue('[pkgconfig]' in res.output, msg=res.output)
         self.assertTrue(expected in res.output, msg=res.output)
 
-        res = bitbake("sysroot-pc-test-native -c populate_sysroot", ignore_status=True)
+        res = bitbake("sysroot-pc-test-native -c populate_sysroot")
         self.assertTrue(expected in res.output, msg=res.output)
         self.assertTrue('[pkgconfig]' in res.output, msg=res.output)
+        self.assertTrue(res.status != 0)