diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-27 12:19:39 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-27 22:13:11 +0000 |
commit | e865e4e703a96d715d409c1f59411bf2b02f1e3d (patch) | |
tree | c717ba01983a59333580198d96f54aa63a3adc9f /meta | |
parent | 3b06853f590d6f32129ceea5a5dd220f0b949c2b (diff) | |
download | poky-e865e4e703a96d715d409c1f59411bf2b02f1e3d.tar.gz |
oeqa/selftest/buildoptions: Improve ccache test failure output
The current failure mode doesn't show us what the logs actually looked like
and later cleans can lose them. Show the whole log in case of failure
to aid debugging intermittent problems on the autobuilder.
(From OE-Core rev: 7c3a0dc5978cea898b1ca51decf4d6e7cf9d519f)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/buildoptions.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/buildoptions.py b/meta/lib/oeqa/selftest/cases/buildoptions.py index 4ebfdb7123..9b87e7fcfc 100644 --- a/meta/lib/oeqa/selftest/cases/buildoptions.py +++ b/meta/lib/oeqa/selftest/cases/buildoptions.py | |||
@@ -40,8 +40,9 @@ class ImageOptionsTests(OESelftestTestCase): | |||
40 | self.add_command_to_tearDown('bitbake -c clean m4') | 40 | self.add_command_to_tearDown('bitbake -c clean m4') |
41 | bitbake("m4 -f -c compile") | 41 | bitbake("m4 -f -c compile") |
42 | log_compile = os.path.join(get_bb_var("WORKDIR","m4"), "temp/log.do_compile") | 42 | log_compile = os.path.join(get_bb_var("WORKDIR","m4"), "temp/log.do_compile") |
43 | res = runCmd("grep ccache %s" % log_compile, ignore_status=True) | 43 | with open(log_compile, "r") as f: |
44 | self.assertEqual(0, res.status, msg="No match for ccache in m4 log.do_compile. For further details: %s" % log_compile) | 44 | loglines = "".join(f.readlines()) |
45 | self.assertIn("ccache", loglines, msg="No match for ccache in m4 log.do_compile. For further details: %s" % log_compile) | ||
45 | 46 | ||
46 | @OETestID(1435) | 47 | @OETestID(1435) |
47 | def test_read_only_image(self): | 48 | def test_read_only_image(self): |