diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2018-01-04 14:13:46 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-01-05 11:54:56 +0000 |
commit | 21b27d1e9d54d4aab412facff22cd5d3d77827a8 (patch) | |
tree | d2839df2de47fbf9c404e64f80244f1416a3e664 | |
parent | f57feab2727dca916744deb64825f3beaf07961d (diff) | |
download | openembedded-core-21b27d1e9d54d4aab412facff22cd5d3d77827a8.tar.gz openembedded-core-21b27d1e9d54d4aab412facff22cd5d3d77827a8.tar.bz2 openembedded-core-21b27d1e9d54d4aab412facff22cd5d3d77827a8.zip |
runtime/cases/ptest.py: fail when ptests fail on target
That's the whole point isn't it? Previously this testcase succeeded
even if some of the underlying on-target tests failed; the only way
to find out if anything was wrong was to manually inspect the logs.
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/runtime/cases/ptest.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/cases/ptest.py b/meta/lib/oeqa/runtime/cases/ptest.py index a2b6ffdfe1..f60a433d59 100644 --- a/meta/lib/oeqa/runtime/cases/ptest.py +++ b/meta/lib/oeqa/runtime/cases/ptest.py @@ -83,3 +83,11 @@ class PtestRunnerTest(OERuntimeTestCase): # Remove the old link to create a new one os.remove(ptest_log_dir_link) os.symlink(os.path.basename(ptest_log_dir), ptest_log_dir_link) + + failed_tests = {} + for section in parse_result.result_dict: + failed_testcases = [ test for test, result in parse_result.result_dict[section] if result == 'fail' ] + if failed_testcases: + failed_tests[section] = failed_testcases + + self.assertFalse(failed_tests, msg = "Failed ptests: %s" %(str(failed_tests))) |