mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-09 21:26:47 +02:00
add signal handler to run_test script to delete temporary file
This commit is contained in:
@@ -10,6 +10,16 @@ if (( ${#INFILES[@]} == 0 )); then
|
|||||||
INFILES=(tests/test_*.scad)
|
INFILES=(tests/test_*.scad)
|
||||||
fi
|
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
|
OUTCODE=0
|
||||||
for testfile in "${INFILES[@]}"; do
|
for testfile in "${INFILES[@]}"; do
|
||||||
if [[ -f "$testfile" ]] ; then
|
if [[ -f "$testfile" ]] ; then
|
||||||
|
Reference in New Issue
Block a user