diff options
author | Ross Burton <ross.burton@arm.com> | 2025-01-21 18:23:08 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-01-22 13:20:29 +0000 |
commit | 1c5a2c8bcc96b8bdfc5186d75953dfabd4b3842a (patch) | |
tree | 7ea373499155551e5a715c95ef3a0609b1bd11aa /meta/lib/oeqa/selftest/cases/buildoptions.py | |
parent | 364880dcb36c443ad6bbd5840f3882ca0740134c (diff) | |
download | poky-1c5a2c8bcc96b8bdfc5186d75953dfabd4b3842a.tar.gz |
oeqa/poisoning: fix gcc include poisoning test
The test code in poison was flawed: as long as one CPP/CC/CXX has fatal
poisoning enabled then the test passes. However, at the moment due to
a bad rebase only CPP has fatal poisoning and CC/CXX do not.
Rewrite the do_compile() task to more carefully check the output so the
test harness itself just has to bitbake the recipe.
Note that this results in the test failing:
ERROR: poison-1.0-r0 do_compile: C Compiler is not poisoned.
Exit status 0, output: cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
ERROR: poison-1.0-r0 do_compile: C++ Compiler is not poisoned.
Exit status 0, output: cc1plus: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
(From OE-Core rev: 5b413d1fdb4bdbaec86d630bb52c3ccf68aae789)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/buildoptions.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/buildoptions.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/meta/lib/oeqa/selftest/cases/buildoptions.py b/meta/lib/oeqa/selftest/cases/buildoptions.py index 09272314bb..b509bcf951 100644 --- a/meta/lib/oeqa/selftest/cases/buildoptions.py +++ b/meta/lib/oeqa/selftest/cases/buildoptions.py | |||
@@ -234,6 +234,5 @@ PREMIRRORS = "\\ | |||
234 | 234 | ||
235 | class Poisoning(OESelftestTestCase): | 235 | class Poisoning(OESelftestTestCase): |
236 | def test_poisoning(self): | 236 | def test_poisoning(self): |
237 | res = bitbake("poison", ignore_status=True) | 237 | # The poison recipe fails if the poisoning didn't work |
238 | self.assertNotEqual(res.status, 0) | 238 | bitbake("poison") |
239 | self.assertTrue("is unsafe for cross-compilation" in res.output) | ||