diff options
author | Lucian Musat <george.l.musat@intel.com> | 2015-01-14 17:14:16 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-19 07:51:38 +0000 |
commit | 26be755cb5c177e4452ae1d4a9780824df27970e (patch) | |
tree | ec4b1139d2a2975ac948cdce5ef304b25264afdc /meta/lib/oeqa/runtime | |
parent | 2f8e5a8be1b2baf1aa9cf275f74a906b7597a45b (diff) | |
download | poky-26be755cb5c177e4452ae1d4a9780824df27970e.tar.gz |
oeqa/ptest: Fixed complementary package install detection and added ptest-runner exit code check
(From OE-Core rev: b214c7b901fe0fad081d7a97f9e91cc218c66bd6)
Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime')
-rw-r--r-- | meta/lib/oeqa/runtime/_ptest.py | 9 |
1 files changed, 6 insertions, 3 deletions
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): | |||
104 | @skipUnlessPassed('test_ssh') | 104 | @skipUnlessPassed('test_ssh') |
105 | def test_ptestrunner(self): | 105 | def test_ptestrunner(self): |
106 | self.add_smart_channel() | 106 | self.add_smart_channel() |
107 | cond = oeRuntimeTest.hasPackage("ptest-runner") and oeRuntimeTest.hasFeature("ptest") and oeRuntimeTest.hasPackage("-ptest") | 107 | (runnerstatus, result) = self.target.run('which ptest-runner', 0) |
108 | if not cond: | 108 | cond = oeRuntimeTest.hasPackage("ptest-runner") and oeRuntimeTest.hasFeature("ptest") and oeRuntimeTest.hasPackage("-ptest") and (runnerstatus != 0) |
109 | if cond: | ||
109 | self.install_packages(self.install_complementary("*-ptest")) | 110 | self.install_packages(self.install_complementary("*-ptest")) |
110 | self.install_packages(['ptest-runner']) | 111 | self.install_packages(['ptest-runner']) |
111 | 112 | ||
112 | self.target.run('/usr/bin/ptest-runner > /tmp/ptest.log 2>&1', 0) | 113 | (runnerstatus, result) = self.target.run('/usr/bin/ptest-runner > /tmp/ptest.log 2>&1', 0) |
114 | #exit code is !=0 even if ptest-runner executes because some ptest tests fail. | ||
115 | self.assertTrue(runnerstatus != 127, msg="Cannot execute ptest-runner!") | ||
113 | self.target.copy_from('/tmp/ptest.log', self.ptest_log) | 116 | self.target.copy_from('/tmp/ptest.log', self.ptest_log) |
114 | shutil.copyfile(self.ptest_log, "ptest.log") | 117 | shutil.copyfile(self.ptest_log, "ptest.log") |
115 | 118 | ||