mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-12-07 19:32:06 +00:00
add signal handler to run_test script to delete temporary file
This commit is contained in:
parent
5ed910a82b
commit
e5956f4d41
1 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue