* [OE-core][PATCH V4] oeqa/runtime/cases/ptest.py: use to_boolean for PTEST_EXPECT_FAILURE
@ 2026-01-09 1:36 Qi.Chen
0 siblings, 0 replies; only message in thread
From: Qi.Chen @ 2026-01-09 1:36 UTC (permalink / raw)
To: openembedded-core
From: Chen Qi <Qi.Chen@windriver.com>
When PTEST_EXPECT_FAILURE is set to "0", "False" or unset, the expected
behavior is that ptest should succeed. So we need to use to_boolean.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/lib/oeqa/runtime/cases/ptest.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/lib/oeqa/runtime/cases/ptest.py b/meta/lib/oeqa/runtime/cases/ptest.py
index fbaeb84d00..75165101af 100644
--- a/meta/lib/oeqa/runtime/cases/ptest.py
+++ b/meta/lib/oeqa/runtime/cases/ptest.py
@@ -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'), default=False):
self.skipTest('Cannot run ptests with @expectedFailure as ptests are required to pass')
self.do_ptestrunner()
@@ -30,7 +30,7 @@ class PtestRunnerTest(OERuntimeTestCase):
@OETestDepends(['ssh.SSHTest.test_ssh'])
@OEHasPackage(['ptest-runner'])
def test_ptestrunner_expectsuccess(self):
- if self.td.get('PTEST_EXPECT_FAILURE'):
+ if bb.utils.to_boolean(self.td.get('PTEST_EXPECT_FAILURE'), default=False):
self.skipTest('Cannot run ptests without @expectedFailure as ptests are expected to fail')
self.do_ptestrunner()
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-01-09 1:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-09 1:36 [OE-core][PATCH V4] oeqa/runtime/cases/ptest.py: use to_boolean for PTEST_EXPECT_FAILURE Qi.Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox