MT#55283 improve build test error output

Change-Id: I66ad3dbb1d746ad81d55c4daf922f0cfaf6f7850
(cherry picked from commit d851706c23)
(cherry picked from commit 2f99bbe48c)
pull/2058/head
Richard Fuchs 3 months ago
parent 83685a0bf3
commit c29fee33a3

@ -71,6 +71,6 @@ t38.c ../daemon/t38.c: ../lib/spandsp_logging.h
../utils/const_str_hash "$<" $(CFLAGS) < "$<" > "$@" ../utils/const_str_hash "$<" $(CFLAGS) < "$<" > "$@"
$(BUILD_TEST_ALTS): $(wildcard $(subst .h,-*,$(BUILD_TEST_ALTS))) $(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 .PHONY: all debug clean install

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