]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/ptest: Fixed complementary package install detection and added ptest-runner...
authorLucian Musat <george.l.musat@intel.com>
Wed, 14 Jan 2015 15:14:16 +0000 (17:14 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 Feb 2015 07:50:43 +0000 (07:50 +0000)
Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runtime/_ptest.py

index bf4d04171c4a2fccf60850a9a1de02c7ba38ade8..81c9c43862799c355ee8388a59a7c28c3cedd97c 100644 (file)
@@ -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")