diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2021-01-19 01:23:44 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-01-20 00:45:05 +0000 |
commit | f13a95e17e38e519d9afb3834fcb9c9472132d21 (patch) | |
tree | b8b8a4c8076f2a2bef5627ac4662bc213cf97b13 /meta/lib/oeqa/selftest | |
parent | 220a5fcb991d40ebfc8a7fe876ce448b0ac92a47 (diff) | |
download | poky-f13a95e17e38e519d9afb3834fcb9c9472132d21.tar.gz |
ccache.bbclass: Use ccache-native and disable ccache for native recipes
Since host's ccache is not reliable, so disable ccache for native recipes and
use ccache-native for other types of recipes. We need disable ccache for native
recipes is because ccache-native now depends on cmake-native which causes
circular dependencies, and it's not easy to break the circular.
(From OE-Core rev: 631bbd4896882ba2acbe5bc85bc90ab7abc794ef)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/buildoptions.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/meta/lib/oeqa/selftest/cases/buildoptions.py b/meta/lib/oeqa/selftest/cases/buildoptions.py index e91f0bd18f..fb0a5ebfed 100644 --- a/meta/lib/oeqa/selftest/cases/buildoptions.py +++ b/meta/lib/oeqa/selftest/cases/buildoptions.py | |||
@@ -38,13 +38,14 @@ class ImageOptionsTests(OESelftestTestCase): | |||
38 | p = bb_vars['SYSROOT_DESTDIR'] + bb_vars['bindir'] + "/" + "ccache" | 38 | p = bb_vars['SYSROOT_DESTDIR'] + bb_vars['bindir'] + "/" + "ccache" |
39 | self.assertTrue(os.path.isfile(p), msg = "No ccache found (%s)" % p) | 39 | self.assertTrue(os.path.isfile(p), msg = "No ccache found (%s)" % p) |
40 | self.write_config('INHERIT += "ccache"') | 40 | self.write_config('INHERIT += "ccache"') |
41 | self.add_command_to_tearDown('bitbake -c clean m4-native') | 41 | recipe = "binutils-cross-x86_64" |
42 | bitbake("m4-native -c clean") | 42 | self.add_command_to_tearDown('bitbake -c clean %s' % recipe) |
43 | bitbake("m4-native -f -c compile") | 43 | bitbake("%s -c clean" % recipe) |
44 | log_compile = os.path.join(get_bb_var("WORKDIR","m4-native"), "temp/log.do_compile") | 44 | bitbake("%s -f -c compile" % recipe) |
45 | log_compile = os.path.join(get_bb_var("WORKDIR", recipe), "temp/log.do_compile") | ||
45 | with open(log_compile, "r") as f: | 46 | with open(log_compile, "r") as f: |
46 | loglines = "".join(f.readlines()) | 47 | loglines = "".join(f.readlines()) |
47 | self.assertIn("ccache", loglines, msg="No match for ccache in m4-native log.do_compile. For further details: %s" % log_compile) | 48 | self.assertIn("ccache", loglines, msg="No match for ccache in %s log.do_compile. For further details: %s" % (recipe , log_compile)) |
48 | 49 | ||
49 | def test_read_only_image(self): | 50 | def test_read_only_image(self): |
50 | distro_features = get_bb_var('DISTRO_FEATURES') | 51 | distro_features = get_bb_var('DISTRO_FEATURES') |