Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCHv3 1/3] runtime/cases/ptest.py: do not require ptest-pkgs in IMAGE_FEATURES; run only when ptest-runner is availalble;
@ 2018-01-04 12:13 Alexander Kanavin
  2018-01-04 12:13 ` [PATCHv3 2/3] testimage.bbclass: add ptest to the list of runtime tests whenever possible Alexander Kanavin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alexander Kanavin @ 2018-01-04 12:13 UTC (permalink / raw)
  To: openembedded-core

Previously the test would execute only when all available ptests
for packages in the image were installed; some of those tests 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.

Presence of ptest-runner means there is at least one ptest package installed
as they pull it in via a class dependency; ptest-runner is not generally
installed otherwise.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 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..a2b6ffdfe11 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 status != 0:
+            self.skipTest("No -ptest packages are installed in the image")
+
         import datetime
 
         test_log_dir = self.td.get('TEST_LOG_DIR', '')
-- 
2.15.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-04 12:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-04 12:13 [PATCHv3 1/3] runtime/cases/ptest.py: do not require ptest-pkgs in IMAGE_FEATURES; run only when ptest-runner is availalble; Alexander Kanavin
2018-01-04 12:13 ` [PATCHv3 2/3] testimage.bbclass: add ptest to the list of runtime tests whenever possible Alexander Kanavin
2018-01-04 12:13 ` [PATCHv3 3/3] runtime/cases/ptest.py: fail when ptests fail on target Alexander Kanavin
2018-01-04 12:32 ` ✗ patchtest: failure for "[v3] runtime/cases/ptest.py: d..." and 2 more Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox