<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt>Looks like it doesn't skip the test correctly:</tt><br>
<pre><span class="stdout">| NOTE: test_ptestrunner (ptest.PtestRunnerTest)
| DEBUG: Checking if ptest is in DISTRO_FEATURES or IMAGE_FEATURES
| DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR 192.168.7.2 export PATH=/usr/sbin:/sbin:/usr/bin:/bin; which ptest-runner
| DEBUG: Data from SSH call: which: no ptest-runner in (/usr/sbin:/sbin:/usr/bin:/bin)
| DEBUG: [Command returned '1' after 0.10 seconds]
| DEBUG: Command: which ptest-runner
| Output: which: no ptest-runner in (/usr/sbin:/sbin:/usr/bin:/bin)
|
| DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR 192.168.7.2 export PATH=/usr/sbin:/sbin:/usr/bin:/bin; ptest-runner
| DEBUG: Data from SSH call: sh: ptest-runner: command not found
| DEBUG: [Command returned '127' after 0.10 seconds]
| DEBUG: Command: ptest-runner
| Output: sh: ptest-runner: command not found
|
| NOTE: ... FAIL
<a class="moz-txt-link-freetext" href="https://autobuilder.yocto.io/builders/nightly-deb-non-deb/builds/673/steps/Running%20Sanity%20Tests/logs/stdio">https://autobuilder.yocto.io/builders/nightly-deb-non-deb/builds/673/steps/Running%20Sanity%20Tests/logs/stdio</a>
Thanks,
Cal
</span></pre>
<div class="moz-cite-prefix">On 12/21/2017 04:44 AM, Alexander
Kanavin wrote:<br>
</div>
<blockquote type="cite"
cite="mid:20171221124500.29810-1-alexander.kanavin@linux.intel.com">
<pre wrap="">Doing so means that all available ptests for packages in the image
will be installed and run; some of them may be broken, never finish,
take a very long time or simply irrelevant to the user who wants to
check ptests of only a few specific packages, and does so by listing
them explicitly via IMAGE_INSTALL_append or similar.
Conversely, do not run the test if ptest-runner is not installed
(which means there are no ptests available, as they pull it in via a
dependency).
Signed-off-by: Alexander Kanavin <a class="moz-txt-link-rfc2396E" href="mailto:alexander.kanavin@linux.intel.com"><alexander.kanavin@linux.intel.com></a>
---
meta/lib/oeqa/runtime/cases/ptest.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/runtime/cases/ptest.py b/meta/lib/oeqa/runtime/cases/ptest.py
index ec8c038a566..63e119530dc 100644
--- a/meta/lib/oeqa/runtime/cases/ptest.py
+++ b/meta/lib/oeqa/runtime/cases/ptest.py
@@ -48,9 +48,12 @@ class PtestRunnerTest(OERuntimeTestCase):
@OETestID(1600)
@skipIfNotFeature('ptest', 'Test requires ptest to be in DISTRO_FEATURES')
- @skipIfNotFeature('ptest-pkgs', 'Test requires ptest-pkgs to be in IMAGE_FEATURES')
@OETestDepends(['ssh.SSHTest.test_ssh'])
def test_ptestrunner(self):
+ status, output = self.target.run('which ptest-runner', 0)
+ if len(output) == 0:
+ self.skipTest("No -ptest packages are installed in the image")
+
import datetime
test_log_dir = self.td.get('TEST_LOG_DIR', '')
</pre>
</blockquote>
<br>
</body>
</html>