mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-02 20:21:07 +00:00
Print a command trace if the check-names.sh exits unexpectedly
We've observed that sometimes check-names.sh exits unexpectedly with status 2 and no error message. The failure is not reproducible. This commits makes the script print a trace if it exits unexpectedly.
This commit is contained in:
parent
4072bec51e
commit
ef39c49cd7
|
@ -16,12 +16,22 @@ if grep --version|head -n1|grep GNU >/dev/null; then :; else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
trace=
|
||||||
|
if [ $# -ne 0 ] && [ "$1" = "-v" ]; then
|
||||||
|
shift
|
||||||
|
trace='-x'
|
||||||
|
exec 2>check-names.err
|
||||||
|
trap 'echo "FAILED UNEXPECTEDLY, status=$?";
|
||||||
|
cat check-names.err' EXIT
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
printf "Analysing source code...\n"
|
printf "Analysing source code...\n"
|
||||||
|
|
||||||
tests/scripts/list-macros.sh
|
sh $trace tests/scripts/list-macros.sh
|
||||||
tests/scripts/list-enum-consts.pl
|
tests/scripts/list-enum-consts.pl
|
||||||
tests/scripts/list-identifiers.sh
|
sh $trace tests/scripts/list-identifiers.sh
|
||||||
tests/scripts/list-symbols.sh
|
sh $trace tests/scripts/list-symbols.sh
|
||||||
|
|
||||||
FAIL=0
|
FAIL=0
|
||||||
|
|
||||||
|
@ -82,6 +92,12 @@ else
|
||||||
FAIL=1
|
FAIL=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$trace" ]; then
|
||||||
|
set +x
|
||||||
|
trap - EXIT
|
||||||
|
rm check-names.err
|
||||||
|
fi
|
||||||
|
|
||||||
printf "\nOverall: "
|
printf "\nOverall: "
|
||||||
if [ "$FAIL" -eq 0 ]; then
|
if [ "$FAIL" -eq 0 ]; then
|
||||||
rm macros actual-macros enum-consts identifiers exported-symbols
|
rm macros actual-macros enum-consts identifiers exported-symbols
|
||||||
|
|
Loading…
Reference in a new issue