summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/runtime/cases/ptest.py15
-rw-r--r--meta/recipes-sato/images/core-image-sato-sdk-ptest.bb3
2 files changed, 17 insertions, 1 deletions
diff --git a/meta/lib/oeqa/runtime/cases/ptest.py b/meta/lib/oeqa/runtime/cases/ptest.py
index eb284df439..5626f707b9 100644
--- a/meta/lib/oeqa/runtime/cases/ptest.py
+++ b/meta/lib/oeqa/runtime/cases/ptest.py
@@ -18,7 +18,20 @@ class PtestRunnerTest(OERuntimeTestCase):
@OETestDepends(['ssh.SSHTest.test_ssh'])
@OEHasPackage(['ptest-runner'])
@unittest.expectedFailure
- def test_ptestrunner(self):
+ def test_ptestrunner_expectfail(self):
+ if not self.td.get('PTEST_EXPECT_FAILURE'):
+ self.skipTest('Cannot run ptests with @expectedFailure as ptests are required to pass')
+ self.do_ptestrunner()
+
+ @skipIfNotFeature('ptest', 'Test requires ptest to be in DISTRO_FEATURES')
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['ptest-runner'])
+ def test_ptestrunner_expectsuccess(self):
+ if self.td.get('PTEST_EXPECT_FAILURE'):
+ self.skipTest('Cannot run ptests without @expectedFailure as ptests are expected to fail')
+ self.do_ptestrunner()
+
+ def do_ptestrunner(self):
status, output = self.target.run('which ptest-runner', 0)
if status != 0:
self.skipTest("No -ptest packages are installed in the image")
diff --git a/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb b/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb
index 58c257c49f..bf749acd79 100644
--- a/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb
+++ b/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb
@@ -18,3 +18,6 @@ IMAGE_ROOTFS_EXTRA_SPACE = "1124288"
# ptests need more memory than standard to avoid the OOM killer
# also lttng-tools needs /tmp that has at least 1G
QB_MEM = "-m 2048"
+
+# Sadly at the moment the full set of ptests is not robust enough and sporadically fails in random places
+PTEST_EXPECT_FAILURE = "1"