]> code.ossystems Code Review - openembedded-core.git/commitdiff
runtime/cases/ptest.py: do not require ptest-pkgs in IMAGE_FEATURES; run only when...
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>
Thu, 4 Jan 2018 12:13:44 +0000 (14:13 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 5 Jan 2018 11:54:56 +0000 (11:54 +0000)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runtime/cases/ptest.py

index ec8c038a566e103356a7ec628d556fce1eaef862..a2b6ffdfe112d6cb6c01e891376ef37758bdca44 100644 (file)
@@ -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', '')