summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/cases
diff options
context:
space:
mode:
authorAndré Draszik <git@andred.net>2019-12-20 16:37:54 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-30 08:47:13 +0000
commitc6743c05a3cd326edc27dc74247d109ec25e240e (patch)
treee3fed1d01afa7994fbd8f7c6f4075e385bfa79d3 /meta/lib/oeqa/runtime/cases
parentcf35c16d712ee500bdfa2fb38f1586408426653d (diff)
downloadpoky-c6743c05a3cd326edc27dc74247d109ec25e240e.tar.gz
oeqa/runtime/ptest: fix detection of failed tests
Since commit d6065f136f6d ("oeqa/logparser: Various misc cleanups"), 7b17274c30c6 in poky, the ptest OEQA is unable to detect failures in any of the test results. The reason is that the test result string changed from 'fail' to 'FAILED', because the original mapping has been removed as part of that commit, but the code in here is still trying to match against the old string, resulting in no matches, i.e. everything is treated as successful, even if it shouldn't be. Update the OEQA ptest test to actually work again and report failure if there was a failure. Note that the ptest test is marked as @expectedfail, so even though this test now again starts to fail, the overall OEQA test result is not affected - but at least the overall OEQA test summary reflects the correct status again. In other words: RESULTS: RESULTS - ping.PingTest.test_ping: PASSED (0.26s) RESULTS - ptest.PtestRunnerTest.test_ptestrunner: PASSED (4.05s) RESULTS - ssh.SSHTest.test_ssh: PASSED (0.60s) SUMMARY: image-debug () - Ran 3 tests in 4.937s correctly changes to: AssertionError: Failed ptests: {'dummytest': ['check_True_is_True', 'test_basic']} RESULTS: RESULTS - ping.PingTest.test_ping: PASSED (0.24s) RESULTS - ssh.SSHTest.test_ssh: PASSED (0.56s) RESULTS - ptest.PtestRunnerTest.test_ptestrunner: EXPECTEDFAIL (4.13s) SUMMARY: image-debug () - Ran 3 tests in 4.937s instead and we see a summary of the ptest subtests that failed. (From OE-Core rev: 08ff4b9195a9de91b8090173c5bd03a5ff263616) Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime/cases')
-rw-r--r--meta/lib/oeqa/runtime/cases/ptest.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oeqa/runtime/cases/ptest.py b/meta/lib/oeqa/runtime/cases/ptest.py
index d8d1e1b344..aef79f62a9 100644
--- a/meta/lib/oeqa/runtime/cases/ptest.py
+++ b/meta/lib/oeqa/runtime/cases/ptest.py
@@ -68,7 +68,7 @@ class PtestRunnerTest(OERuntimeTestCase):
68 68
69 failed_tests = {} 69 failed_tests = {}
70 for section in results: 70 for section in results:
71 failed_testcases = [ "_".join(test.translate(trans).split()) for test in results[section] if results[section][test] == 'fail' ] 71 failed_testcases = [ "_".join(test.translate(trans).split()) for test in results[section] if results[section][test] == 'FAILED' ]
72 if failed_testcases: 72 if failed_testcases:
73 failed_tests[section] = failed_testcases 73 failed_tests[section] = failed_testcases
74 74