summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/cases/ptest.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/runtime/cases/ptest.py')
-rw-r--r--meta/lib/oeqa/runtime/cases/ptest.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/meta/lib/oeqa/runtime/cases/ptest.py b/meta/lib/oeqa/runtime/cases/ptest.py
index a9572c81f0..fbaeb84d00 100644
--- a/meta/lib/oeqa/runtime/cases/ptest.py
+++ b/meta/lib/oeqa/runtime/cases/ptest.py
@@ -1,4 +1,6 @@
#
+# Copyright OpenEmbedded Contributors
+#
# SPDX-License-Identifier: MIT
#
@@ -57,7 +59,7 @@ class PtestRunnerTest(OERuntimeTestCase):
ptest_dirs = [ '/usr/lib' ]
if not libdir in ptest_dirs:
ptest_dirs.append(libdir)
- status, output = self.target.run('ptest-runner -d \"{}\"'.format(' '.join(ptest_dirs)), 0)
+ status, output = self.target.run('ptest-runner -t 450 -d \"{}\"'.format(' '.join(ptest_dirs)), 0)
os.makedirs(ptest_log_dir)
with open(ptest_runner_log, 'w') as f:
f.write(output)
@@ -81,17 +83,20 @@ class PtestRunnerTest(OERuntimeTestCase):
extras['ptestresult.sections'] = sections
+ zerolength = []
trans = str.maketrans("()", "__")
for section in results:
for test in results[section]:
result = results[section][test]
testname = "ptestresult." + (section or "No-section") + "." + "_".join(test.translate(trans).split())
extras[testname] = {'status': result}
+ if not results[section]:
+ zerolength.append(section)
failed_tests = {}
for section in sections:
- if 'exitcode' in sections[section].keys():
+ if 'exitcode' in sections[section].keys() or 'timeout' in sections[section].keys():
failed_tests[section] = sections[section]["log"]
for section in results:
@@ -105,7 +110,11 @@ class PtestRunnerTest(OERuntimeTestCase):
failmsg = "ERROR: Processes were killed by the OOM Killer:\n%s\n" % output
if failed_tests:
- failmsg = failmsg + "Failed ptests:\n%s" % pprint.pformat(failed_tests)
+ failmsg = failmsg + "\nFailed ptests:\n%s\n" % pprint.pformat(failed_tests)
+
+ if zerolength:
+ failmsg = failmsg + "\nptests which had no test results:\n%s" % pprint.pformat(zerolength)
if failmsg:
+ self.logger.warning("There were failing ptests.")
self.fail(failmsg)