[oe-commits] [openembedded-core] 10/13: runtime/cases/ptest.py: fail when ptests fail on target

git at git.openembedded.org git at git.openembedded.org
Wed Jan 3 17:58:33 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit dc46f2896085027065869e009f5dc58dea5f94fa
Author: Alexander Kanavin <alexander.kanavin at linux.intel.com>
AuthorDate: Thu Dec 21 14:45:00 2017 +0200

    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 at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oeqa/runtime/cases/ptest.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/meta/lib/oeqa/runtime/cases/ptest.py b/meta/lib/oeqa/runtime/cases/ptest.py
index 63e1195..8f208a5 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)))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list