correct retcod - was always returning OK because of the tee thing
[tests.git] / system / runtest
1 #!/bin/bash
2 cd $(dirname $0)
3 mkdir -p logs
4 logfile=logs/runtest-$(date +%H-%M).log
5
6 # figure if TestMain succeeds, as the retcod gets lost in the pipe
7 rm -f logs/success
8 (python -u TestMain.py "$@" && touch logs/success) | tee $logfile
9
10 if [ -f logs/success ] ; then
11     exit 0
12 else
13     exit 1
14 fi