[oe-commits] Lucian Musat : oeqa/ptest: Fixed complementary package install detection and added ptest-runner exit code check
git at git.openembedded.org
git at git.openembedded.org
Tue Feb 17 22:38:05 UTC 2015
Module: openembedded-core.git
Branch: master-next
Commit: 1c536b725b706b20b95d4edc052fbde941d8dacf
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=1c536b725b706b20b95d4edc052fbde941d8dacf
Author: Lucian Musat <george.l.musat at intel.com>
Date: Wed Jan 14 17:14:16 2015 +0200
oeqa/ptest: Fixed complementary package install detection and added ptest-runner exit code check
Signed-off-by: Lucian Musat <george.l.musat at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/runtime/_ptest.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/meta/lib/oeqa/runtime/_ptest.py b/meta/lib/oeqa/runtime/_ptest.py
index bf4d041..81c9c43 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")
More information about the Openembedded-commits
mailing list