bugfix
[tests.git] / system / run_log
1 #!/bin/bash
2 cd $(dirname $0)
3 mkdir -p logs
4 time=$(date +%H-%M)
5 runfile=run-${time}.txt
6 runlast=run
7 tracefile=trace-${time}.txt
8 tracelast=trace
9
10 # figure if TestMain succeeds, as the retcod gets lost in the pipe
11 rm -f logs/success
12 rm -f logs/$runlast; (cd logs; ln -s $runfile $runlast)
13 rm -f logs/$tracelast; (cd logs; ln -s $tracefile $tracelast)
14 python -u TestMain.py -t logs/$tracefile "$@" &> logs/$runfile && touch logs/success
15 cat logs/$runfile
16
17 if [ -f logs/success ] ; then
18     exit 0
19 else
20     exit 1
21 fi