aboutsummaryrefslogtreecommitdiffstats
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-25 22:25:04 +0000
commitf922970b119849bcdd7f7df74bd2029816ff637c (patch)
treec32f4e79458f3ce6d0cfe8e2abaef7c2bf55200e
parentba944a72302fa088c31c7b1eee4ad9f64f9769e4 (diff)
downloadopenembedded-core-f922970b119849bcdd7f7df74bd2029816ff637c.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> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-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):
if failed_testcases:
failed_tests[section] = failed_testcases
+ failmsg = ""
+ status, output = self.target.run('dmesg | grep "Killed process"', 0)
+ if output:
+ failmsg = "ERROR: Processes were killed by the OOM Killer:\n%s\n" % output
+
if failed_tests:
- self.fail("Failed ptests:\n%s" % pprint.pformat(failed_tests))
+ failmsg = failmsg + "Failed ptests:\n%s" % pprint.pformat(failed_tests)
+
+ if failmsg:
+ self.fail(failmsg)