oeqa/runtime/cases/ptest.py: use to_boolean for PTEST_EXPECT_FAILURE
PATCH v3 1/2 oeqa/runtime/cases/ptest.py: use to_boolean for PTEST_EXPECT_FAILURE
From: Chen Qi <[email protected]>
When PTEST_EXPECT_FAILURE is set to "0", the expected behavior is that ptest should succeed. So we need to use to_boolean.
--- meta/lib/oeqa/runtime/cases/ptest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
meta/lib/oeqa/runtime/cases/ptest.py +3 -3
@@ -22,7 +22,7 @@ class PtestRunnerTest(OERuntimeTestCase): @OEHasPackage(['ptest-runner']) @unittest.expectedFailure def test_ptestrunner_expectfail(self): - if not self.td.get('PTEST_EXPECT_FAILURE'): + if not bb.utils.to_boolean(self.td.get('PTEST_EXPECT_FAILURE')): self.skipTest('Cannot run ptests with @expectedFailure as ptests are required to pass') self.do_ptestrunner()
@@ -30,8 +30,8 @@ class PtestRunnerTest(OERuntimeTestCase): @OETestDepends(['ssh.SSHTest.test_ssh']) @OEHasPackage(['ptest-runner']) def test_ptestrunner_expectsuccess(self): - if self.td.get('PTEST_EXPECT_FAILURE'): - self.skipTest('Cannot run ptests without @expectedFailure as ptests are expected to fail') + if bb.utils.to_boolean(self.td.get('PTEST_EXPECT_FAILURE')): + self.skipTest('Cannot run ptests without @expectedFailure as ptests are expected to fail') self.do_ptestrunner() def do_ptestrunner(self):
Signature · 1 line
2.43.0
PATCH v3 2/2 core-image-ptest: drop PTEST_EXPECT_FAILURE
From: Chen Qi <[email protected]>
This variable setting is not helping people now. Because in practice, ptest failure warnings on autobuilder are still catched and reported back to developer.
In addition, setting this value to 1 is sometimes causing confusion for developers.
As an example, I used 'bitbake core-image-ptest-util-linux:do_testimage'. It succeeded with warning message. I didn't notice the warning message. I saw the command succeeded and I tought util-linux ptest is OK. But in actual fact, the ptest failed. It's the PTEST_EXPECT_FAILURE setting in this core-image-ptest.bb that is not giving me error.
In summary, a simple erroring out action should be clearer.
--- meta/recipes-core/images/core-image-ptest.bb | 3 --- 1 file changed, 3 deletions(-)
meta/recipes-core/images/core-image-ptest.bb +0 -3
@@ -41,9 +41,6 @@ QB_MEM:virtclass-mcextend-tcl = "-m 5100" TEST_SUITES = "ping ssh parselogs ptest" -# Sadly at the moment the full set of ptests is not robust enough and sporadically fails in random places -PTEST_EXPECT_FAILURE = "1" - python () { if not d.getVar("MCNAME"): raise bb.parse.SkipRecipe("No class extension set")
Signature · 1 line
2.43.0