diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2020-02-23 14:52:31 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-02-25 10:41:22 +0000 |
commit | c43423cd28d086d31c06c7e047dba139b35f5cdb (patch) | |
tree | 7474005af907c27c37811ab14be28adb9bf7a3a5 /meta/lib | |
parent | 63304e8d4eee65d27efa7925b87f08cab6884a56 (diff) | |
download | poky-c43423cd28d086d31c06c7e047dba139b35f5cdb.tar.gz |
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).
(From OE-Core rev: 102afcc7ea7d7673183f272a29ab233084ad168b)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/runtime/cases/ptest.py | 15 |
1 files changed, 14 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): | |||
18 | @OETestDepends(['ssh.SSHTest.test_ssh']) | 18 | @OETestDepends(['ssh.SSHTest.test_ssh']) |
19 | @OEHasPackage(['ptest-runner']) | 19 | @OEHasPackage(['ptest-runner']) |
20 | @unittest.expectedFailure | 20 | @unittest.expectedFailure |
21 | def test_ptestrunner(self): | 21 | def test_ptestrunner_expectfail(self): |
22 | if not self.td.get('PTEST_EXPECT_FAILURE'): | ||
23 | self.skipTest('Cannot run ptests with @expectedFailure as ptests are required to pass') | ||
24 | self.do_ptestrunner() | ||
25 | |||
26 | @skipIfNotFeature('ptest', 'Test requires ptest to be in DISTRO_FEATURES') | ||
27 | @OETestDepends(['ssh.SSHTest.test_ssh']) | ||
28 | @OEHasPackage(['ptest-runner']) | ||
29 | def test_ptestrunner_expectsuccess(self): | ||
30 | if self.td.get('PTEST_EXPECT_FAILURE'): | ||
31 | self.skipTest('Cannot run ptests without @expectedFailure as ptests are expected to fail') | ||
32 | self.do_ptestrunner() | ||
33 | |||
34 | def do_ptestrunner(self): | ||
22 | status, output = self.target.run('which ptest-runner', 0) | 35 | status, output = self.target.run('which ptest-runner', 0) |
23 | if status != 0: | 36 | if status != 0: |
24 | self.skipTest("No -ptest packages are installed in the image") | 37 | self.skipTest("No -ptest packages are installed in the image") |