Browse Source

MT#55283 improve build test error output

Change-Id: I66ad3dbb1d746ad81d55c4daf922f0cfaf6f7850
pull/1126/merge
Richard Fuchs 3 weeks ago
parent
commit
d851706c23
2 changed files with 14 additions and 3 deletions
  1. +1
    -1
      lib/common.Makefile
  2. +13
    -2
      utils/build_test_wrapper

+ 1
- 1
lib/common.Makefile View File

@ -71,6 +71,6 @@ t38.c ../daemon/t38.c: ../lib/spandsp_logging.h
../utils/const_str_hash "$<" $(CFLAGS) < "$<" > "$@"
$(BUILD_TEST_ALTS): $(wildcard $(subst .h,-*,$(BUILD_TEST_ALTS)))
../utils/build_test_wrapper "$@" 2> /dev/null
../utils/build_test_wrapper "$@"
.PHONY: all debug clean install

+ 13
- 2
utils/build_test_wrapper View File

@ -7,13 +7,24 @@ if test "$MAKE" = ""; then
fi
echo "Looking for usable alternative for $TARGET"
rm -f "$ROOT"-test
rm -f .stderr.$$
for x in "$ROOT"*.h; do
echo "Trying build with $x"
rm -f "$TARGET"
(echo '/******** GENERATED FILE ********/'; cat "$x") > "$TARGET"
$MAKE "$ROOT"-test && break
$MAKE "$ROOT"-test 2>> .stderr.$$ && break
echo "Failed build with $x"
rm -f "$TARGET"
done
rm -f "$ROOT"-test
test -f "$TARGET"
if test -f "$TARGET"; then
rm -f .stderr.$$
exit 0
fi
echo "Failed to find usable build alternative for $TARGET"
echo "Collected stderr:"
echo "--------------------------"
cat .stderr.$$
rm -f .stderr.$$
echo "--------------------------"
exit 1

Loading…
Cancel
Save