diff options
author | Alexis Lothoré <alexis.lothore@bootlin.com> | 2023-06-09 08:47:59 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-17 11:50:57 +0100 |
commit | 1a2aa5e536d419c6473daa1b34363be92612ba28 (patch) | |
tree | b7c749183935f6c478df175f2aa7e0dbc5475e68 /meta | |
parent | 5eb501113730ec1040a548a31855acf568bea702 (diff) | |
download | poky-1a2aa5e536d419c6473daa1b34363be92612ba28.tar.gz |
oeqa/core/runner: add helper to know about expected failures
Testing framework currently uses the unittest.expectedFailure decorator for
tests that can have intermittent failures (see PTEST_EXPECT_FAILURE = "1")
in core-image-ptest.bb. While it allows upper layers to run tests without
failing on "fragile" tests, it prevents those from knowing more about those
failing tests since they are not accounting as failures (for example we
could want to retrieve some logs about failed tests to improve them, and
eventually to drop expectFailure decorator)
Add a helper to allow upper layers to know about those failures which won't
make global testing session
(From OE-Core rev: 34595858b14f628a8282777b91c841add6ebe1ca)
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/core/runner.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py index d50690ab37..5077eb8e3e 100644 --- a/meta/lib/oeqa/core/runner.py +++ b/meta/lib/oeqa/core/runner.py | |||
@@ -229,6 +229,10 @@ class OETestResult(_TestResult): | |||
229 | # Override as we unexpected successes aren't failures for us | 229 | # Override as we unexpected successes aren't failures for us |
230 | return (len(self.failures) == len(self.errors) == 0) | 230 | return (len(self.failures) == len(self.errors) == 0) |
231 | 231 | ||
232 | def hasAnyFailingTest(self): | ||
233 | # Account for expected failures | ||
234 | return not self.wasSuccessful() or len(self.expectedFailures) | ||
235 | |||
232 | class OEListTestsResult(object): | 236 | class OEListTestsResult(object): |
233 | def wasSuccessful(self): | 237 | def wasSuccessful(self): |
234 | return True | 238 | return True |