From aff2440b3f1e57d92d5e8015d0e7c3e993944a3e Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Tue, 7 May 2019 16:14:03 +0200 Subject: More robust aktualizr-ptest printing of errors If ctest is interrupted (e.g. timeout), its partial output will be in /tmp/aktualizr-ptest.log.tmp Signed-off-by: Laurent Bonnans --- lib/oeqa/selftest/cases/updater_qemux86_64_ptest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/oeqa/selftest/cases/updater_qemux86_64_ptest.py b/lib/oeqa/selftest/cases/updater_qemux86_64_ptest.py index a04032c..8783fe0 100644 --- a/lib/oeqa/selftest/cases/updater_qemux86_64_ptest.py +++ b/lib/oeqa/selftest/cases/updater_qemux86_64_ptest.py @@ -41,12 +41,12 @@ class PtestTests(OESelftestTestCase): stdout, stderr, retcode = self.qemu_command('sh -l -c ptest-runner', timeout=None) output = stdout.decode() print(output) - self.assertEqual(retcode, 0) has_failure = re.search('^FAIL', output, flags=re.MULTILINE) is not None if has_failure: print("Full test suite log:") - stdout, stderr, retcode = self.qemu_command('cat /tmp/aktualizr-ptest.log', timeout=None) + stdout, _, _ = self.qemu_command('sh -c "cat /tmp/aktualizr-ptest.log || cat /tmp/aktualizr-ptest.log.tmp"', timeout=None) print(stdout.decode()) + self.assertEqual(retcode, 0) self.assertFalse(has_failure) -- cgit v1.2.3-54-g00ecf From ba3496c3f54c8d121e112082deca303180a570a9 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Tue, 7 May 2019 16:20:49 +0200 Subject: README: Add updater_qemux86_64_ptest to list of test targets. Signed-off-by: Patrick Vacek --- README.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.adoc b/README.adoc index cc01612..a28d934 100644 --- a/README.adoc +++ b/README.adoc @@ -228,7 +228,7 @@ sudo apt install ovmf 5. Run oe-selftest: + ``` -oe-selftest -r updater_native updater_qemux86_64 updater_minnowboard updater_raspberrypi +oe-selftest -r updater_native updater_qemux86_64 updater_minnowboard updater_raspberrypi updater_qemux86_64_ptest ``` For more information about oe-selftest, including details about how to run individual test modules or classes, please refer to the https://wiki.yoctoproject.org/wiki/Oe-selftest[Yocto Project wiki]. -- cgit v1.2.3-54-g00ecf