mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-01-09 19:27:42 +01:00
bf5573f86c
When running tests in parallel (e.g. using `make -j4 check`), the header tests currently fail due to headers-overlay.sh and headers-system.sh both generating headers-gen.c simultaneously, resulting in garbled output. Fix this by using separate C files for the tests. Signed-off-by: Lukas Fleischer <lfleischer@lfos.de> Signed-off-by: Guillem Jover <guillem@hadrons.org>
26 lines
420 B
Bash
Executable File
26 lines
420 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
run()
|
|
{
|
|
echo "$@"
|
|
"$@"
|
|
}
|
|
|
|
incdir="${top_srcdir}/include/bsd"
|
|
CPPFLAGS="$CPPFLAGS -DLIBBSD_OVERLAY"
|
|
|
|
for inc in $(cd $incdir; find -name '*.h' | sort | cut -c3-); do
|
|
cat >headers-overlay-gen.c <<SOURCE
|
|
#include <$inc>
|
|
int main() { return 0; }
|
|
SOURCE
|
|
|
|
echo "testing header $inc"
|
|
run $CC -isystem "$incdir" $CPPFLAGS headers-overlay-gen.c -o /dev/null
|
|
echo
|
|
|
|
rm -f headers-overlay-gen*
|
|
done
|