diff options
author | Ross Burton <ross.burton@arm.com> | 2022-09-07 14:02:05 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-09-07 21:28:41 +0100 |
commit | 8cbbc0ac7d8f981f8dac05c18ecb9b148cb40f53 (patch) | |
tree | 19c93835b7c37c7a13c0b68f094cfbfb335fbb99 /meta-selftest | |
parent | bcdba1a56f89c0c5f24dff266d756a3083a1a467 (diff) | |
download | poky-8cbbc0ac7d8f981f8dac05c18ecb9b148cb40f53.tar.gz |
meta-selftest/poison: improve sysroot poisoning test case
It was discovered by Martin Jansa that the sysroot poisoning errors are
not functioning as they should. Due to either a bug from day 1 or a
bad rebase, -Werror=poison-system-directories is only passed when GCC
is invoking _just_ the preprocessor, not the compiler.
Demonstrate this by expanding the test case to exercise not just $CPP,
but also $CC for both C and C++ languages. This improved test case now
fails.
(From OE-Core rev: 3ff9e67e278f6548952592675fc88ba41d1a8e96)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest')
-rw-r--r-- | meta-selftest/recipes-test/poison/poison.bb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/meta-selftest/recipes-test/poison/poison.bb b/meta-selftest/recipes-test/poison/poison.bb index 7ace901cc3..e9eee0cdba 100644 --- a/meta-selftest/recipes-test/poison/poison.bb +++ b/meta-selftest/recipes-test/poison/poison.bb | |||
@@ -9,8 +9,12 @@ inherit nopackages | |||
9 | # will result in compiler errors. This recipe should will fail to build and | 9 | # will result in compiler errors. This recipe should will fail to build and |
10 | # oe-selftest has a test that verifies that. | 10 | # oe-selftest has a test that verifies that. |
11 | do_compile() { | 11 | do_compile() { |
12 | touch empty.c | 12 | bbnote Testing preprocessor |
13 | ${CPP} ${CFLAGS} -I/usr/include empty.c | 13 | echo "int main(int argc, char** argv) {}" | ${CPP} -I/usr/include - |
14 | bbnote Testing C compiler | ||
15 | echo "int main(int argc, char** argv) {}" | ${CC} -x c -I/usr/include - | ||
16 | bbnote Testing C++ compiler | ||
17 | echo "int main(int argc, char** argv) {}" | ${CC} -x c++ -I/usr/include - | ||
14 | } | 18 | } |
15 | 19 | ||
16 | EXCLUDE_FROM_WORLD = "1" | 20 | EXCLUDE_FROM_WORLD = "1" |