diff options
author | Laurent Bonnans <laurent.bonnans@here.com> | 2019-05-07 16:14:03 +0200 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2019-05-17 10:28:04 +0200 |
commit | fbf974efd9b8b915b47e8dbfedb4a304afc8032f (patch) | |
tree | 3c63b66dfda0e6f6fa07ca58d7868c24f009b418 /lib | |
parent | 776dd1df3cf8f147a4848d7bb909eb8b8dbdcb9d (diff) | |
download | meta-updater-fbf974efd9b8b915b47e8dbfedb4a304afc8032f.tar.gz |
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 <laurent.bonnans@here.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oeqa/selftest/cases/updater_qemux86_64_ptest.py | 4 |
1 files 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): | |||
41 | stdout, stderr, retcode = self.qemu_command('sh -l -c ptest-runner', timeout=None) | 41 | stdout, stderr, retcode = self.qemu_command('sh -l -c ptest-runner', timeout=None) |
42 | output = stdout.decode() | 42 | output = stdout.decode() |
43 | print(output) | 43 | print(output) |
44 | self.assertEqual(retcode, 0) | ||
45 | 44 | ||
46 | has_failure = re.search('^FAIL', output, flags=re.MULTILINE) is not None | 45 | has_failure = re.search('^FAIL', output, flags=re.MULTILINE) is not None |
47 | if has_failure: | 46 | if has_failure: |
48 | print("Full test suite log:") | 47 | print("Full test suite log:") |
49 | stdout, stderr, retcode = self.qemu_command('cat /tmp/aktualizr-ptest.log', timeout=None) | 48 | stdout, _, _ = self.qemu_command('sh -c "cat /tmp/aktualizr-ptest.log || cat /tmp/aktualizr-ptest.log.tmp"', timeout=None) |
50 | print(stdout.decode()) | 49 | print(stdout.decode()) |
51 | 50 | ||
51 | self.assertEqual(retcode, 0) | ||
52 | self.assertFalse(has_failure) | 52 | self.assertFalse(has_failure) |