summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-30 22:01:23 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-02 11:05:59 +0000
commit927320844fd040dcef26a250a0bab725b2fd71d9 (patch)
treea27d6edee47c31756608e864b921388f8a75a0bc /meta/lib
parent3ce523c1ef6ee38981941a99f0e457950b53649f (diff)
downloadpoky-927320844fd040dcef26a250a0bab725b2fd71d9.tar.gz
oeqa/runtime/ptest: Ensure OOM errors are logged
Currently processed being killed by the OOM killer may not be spotted by ptest-runner. After we complete the tests, check the logs and report if there were any. This ensures the user is aware of OOM conditions affecting the ptest results. (From OE-Core rev: 20a441d53817f80e0ce1597e77f6e794422ac49a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/runtime/cases/ptest.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/meta/lib/oeqa/runtime/cases/ptest.py b/meta/lib/oeqa/runtime/cases/ptest.py
index 6ae951356d..2a28ca59a8 100644
--- a/meta/lib/oeqa/runtime/cases/ptest.py
+++ b/meta/lib/oeqa/runtime/cases/ptest.py
@@ -70,5 +70,13 @@ class PtestRunnerTest(OERuntimeTestCase):
70 if failed_testcases: 70 if failed_testcases:
71 failed_tests[section] = failed_testcases 71 failed_tests[section] = failed_testcases
72 72
73 failmsg = ""
74 status, output = self.target.run('dmesg | grep "Killed process"', 0)
75 if output:
76 failmsg = "ERROR: Processes were killed by the OOM Killer:\n%s\n" % output
77
73 if failed_tests: 78 if failed_tests:
74 self.fail("Failed ptests:\n%s" % pprint.pformat(failed_tests)) 79 failmsg = failmsg + "Failed ptests:\n%s" % pprint.pformat(failed_tests)
80
81 if failmsg:
82 self.fail(failmsg)