X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=system%2Frun_log;h=e1704630d3287bba1c7844a62796352feac384ee;hb=87f953c20a5a10273673e0fab3a6ded79475ad4c;hp=0c6a88c94c862c6eae4b98221ac8c0f943d15760;hpb=33db9af58df8abbc61a00f9b9b74f624758c20e8;p=tests.git diff --git a/system/run_log b/system/run_log index 0c6a88c..e170463 100755 --- a/system/run_log +++ b/system/run_log @@ -1,17 +1,20 @@ #!/bin/bash cd $(dirname $0) +python -c "import time; print int(time.time())" > timestamp mkdir -p logs time=$(date +%H-%M) -logfile=logs/run-${time}.log -tracefile=logs/trace-${time}.txt +runfile=run-${time}.txt +runlast=run +tracefile=trace-${time}.txt +tracelast=trace # figure if TestMain succeeds, as the retcod gets lost in the pipe rm -f logs/success -python -u TestMain.py -t $tracefile "$@" &> $logfile && touch logs/success -cat $logfile +rm -f logs/$runlast; (cd logs; ln -s $runfile $runlast) +rm -f logs/$tracelast; (cd logs; ln -s $tracefile $tracelast) +python -u TestMain.py -t logs/$tracefile "$@" &> logs/$runfile ; retcod=$? +cat logs/$runfile +[ "$retcod" == 0 ] && touch logs/success -if [ -f logs/success ] ; then - exit 0 -else - exit 1 -fi +echo "run_log is exiting" $retcod +exit $retcod