add signal handler to run_test script to delete temporary file

This commit is contained in:
Adrian Mariano
2025-04-13 08:34:44 -04:00
parent 5ed910a82b
commit e5956f4d41

View File

@@ -10,6 +10,16 @@ if (( ${#INFILES[@]} == 0 )); then
INFILES=(tests/test_*.scad)
fi
cleanup () {
rm -f out.echo
exit
}
# clean up out.echo if we terminate due to a signal
trap cleanup SIGINT SIGHUP SIGQUIT SIGABRT
OUTCODE=0
for testfile in "${INFILES[@]}"; do
if [[ -f "$testfile" ]] ; then