runtest.sh (289B)
1 #!/bin/bash 2 3 trap "rm ${1}.tmp" EXIT 4 cd test 5 # instrument to use valgrind 6 sed 's,../../irctk\([^@]*\) \([^ @]*\)@,valgrind --log-file="../'${1%.sh}'_\2.log" ../../irctk\1 \2@,g' $1 \ 7 > ${1}.tmp 8 chmod +x ${1}.tmp 9 if setsid ./${1}.tmp 10 then 11 echo "$1: passed" 12 else 13 echo "$1: FAILED" 14 fi 15