From 26be755cb5c177e4452ae1d4a9780824df27970e Mon Sep 17 00:00:00 2001 From: Lucian Musat Date: Wed, 14 Jan 2015 17:14:16 +0200 Subject: oeqa/ptest: Fixed complementary package install detection and added ptest-runner exit code check (From OE-Core rev: b214c7b901fe0fad081d7a97f9e91cc218c66bd6) Signed-off-by: Lucian Musat Signed-off-by: Richard Purdie --- meta/lib/oeqa/runtime/_ptest.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'meta/lib/oeqa/runtime/_ptest.py') diff --git a/meta/lib/oeqa/runtime/_ptest.py b/meta/lib/oeqa/runtime/_ptest.py index bf4d04171c..81c9c43862 100644 --- a/meta/lib/oeqa/runtime/_ptest.py +++ b/meta/lib/oeqa/runtime/_ptest.py @@ -104,12 +104,15 @@ class PtestRunnerTest(oeRuntimeTest): @skipUnlessPassed('test_ssh') def test_ptestrunner(self): self.add_smart_channel() - cond = oeRuntimeTest.hasPackage("ptest-runner") and oeRuntimeTest.hasFeature("ptest") and oeRuntimeTest.hasPackage("-ptest") - if not cond: + (runnerstatus, result) = self.target.run('which ptest-runner', 0) + cond = oeRuntimeTest.hasPackage("ptest-runner") and oeRuntimeTest.hasFeature("ptest") and oeRuntimeTest.hasPackage("-ptest") and (runnerstatus != 0) + if cond: self.install_packages(self.install_complementary("*-ptest")) self.install_packages(['ptest-runner']) - self.target.run('/usr/bin/ptest-runner > /tmp/ptest.log 2>&1', 0) + (runnerstatus, result) = self.target.run('/usr/bin/ptest-runner > /tmp/ptest.log 2>&1', 0) + #exit code is !=0 even if ptest-runner executes because some ptest tests fail. + self.assertTrue(runnerstatus != 127, msg="Cannot execute ptest-runner!") self.target.copy_from('/tmp/ptest.log', self.ptest_log) shutil.copyfile(self.ptest_log, "ptest.log") -- cgit v1.2.3-54-g00ecf