diff options
authorAlexander Kanavin <>2020-02-23 14:52:31 +0100
committerRichard Purdie <>2020-02-25 10:41:15 +0000
commit102afcc7ea7d7673183f272a29ab233084ad168b (patch)
parent4abb2f270ba61e99993e53d292bcf5310a59dc19 (diff)
ptest: add an option to enforce a failure (e.g. ptests are required to pass)
This can be useful with a more specific, targeted and robust set of ptest packages; the benefit is that ptest regressions are caught as they happen and can be more easily traced to changes that caused them. The existing AB ptest image continues to be expected to fail, my observation of the AB runs is that the full set of ptests is not robust enough (particularly around socket/network related tests) and sporadically fails in random places. This can probably be addressed by making ptests exclusive to a worker (e.g. there is no other workload happening at the same time as ptests). Signed-off-by: Alexander Kanavin <> Signed-off-by: Richard Purdie <>
2 files changed, 17 insertions, 1 deletions
diff --git a/meta/lib/oeqa/runtime/cases/ b/meta/lib/oeqa/runtime/cases/
index eb284df439..5626f707b9 100644
--- a/meta/lib/oeqa/runtime/cases/
+++ b/meta/lib/oeqa/runtime/cases/
@@ -18,7 +18,20 @@ class PtestRunnerTest(OERuntimeTestCase):
- def test_ptestrunner(self):
+ def test_ptestrunner_expectfail(self):
+ 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):
+ self.skipTest('Cannot run ptests without @expectedFailure as ptests are expected to fail')
+ self.do_ptestrunner()
+ def do_ptestrunner(self):
status, output ='which ptest-runner', 0)
if status != 0:
self.skipTest("No -ptest packages are installed in the image")
diff --git a/meta/recipes-sato/images/ b/meta/recipes-sato/images/
index 58c257c49f..bf749acd79 100644
--- a/meta/recipes-sato/images/
+++ b/meta/recipes-sato/images/
@@ -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