https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: dev-util/include-what-you-use-0.19 fails tests. Discovered on: amd64 (internal ref: ci)
Created attachment 860871 [details] build.log build log and emerge --info
Error(s) that match a know pattern: FAILED (errors=169) IWYU Git version not found, DO NOT release from this tree! OSError: Failed to locate IWYU.
I managed to fix the ebuild's src_test by invoking run_iwyu_tests_py so that the actually build include-what-you-use will be used for testing (and not the system-one that is potentially in PATH), by src_test() { "${EPYTHON}" run_iwyu_tests.py \ -- ${BUILD_DIR}/bin/${PN} \ || || die "Tests failed with $? (using ${EPYTHON})" } However, the tests fail with include-what-you-use being unable to find the stddef.h header. This appears to be because the include path is specified relative to the include-what-you-use binaries location, and in src_test, the binary has not yet been merged into the live filesystem: ../include-what-you-use-0.19_build/bin/include-what-you-use -E -x c++ - -v < /dev/null clang version 15.0.7 … ignoring nonexistent directory "/var/tmp/portage/dev-util/include-what-you-use-0.19/work/include-what-you-use-0.19_build/bin/../../../../lib/clang/15.0.7/include" ignoring nonexistent directory "/usr/local/include" … Observe how the include directory is specified as "/var/tmp/portage/dev-util/include-what-you-use-0.19/work/include-what-you-use-0.19_build/bin/../../../../lib/clang/15.0.7/include".
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c479450dfc4080bb682ac6803107efe2422b81c commit 9c479450dfc4080bb682ac6803107efe2422b81c Author: Florian Schmaus <flow@gentoo.org> AuthorDate: 2023-04-29 19:09:44 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2023-04-29 19:16:34 +0000 dev-util/include-what-you-use: fix tests 1. invoke run_iwyu_tests with "-- ${BUILD_DIR}/bin/${PN}", so that the just build iwyu is used and not the one potentially available in PATH 2. Fix include path, see https://github.com/include-what-you-use/include-what-you-use/pull/1252 3. Drop stddef from badinc.cc. This makes the test pass. I am not sure if this is correct or not, but at the moment it was either this or dropping the test entirely. Closes: https://bugs.gentoo.org/905214 Signed-off-by: Florian Schmaus <flow@gentoo.org> dev-util/include-what-you-use/Manifest | 1 + ...cxx-badinc.cc-remove-stddef-from-expected.patch | 34 ++++++++++++++++++++++ .../include-what-you-use-0.19.ebuild | 21 +++++++++++-- 3 files changed, 54 insertions(+), 2 deletions(-)