X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=system%2Frun_log;h=0003226506cf2fb986847f2f7eaeeeb396544919;hb=6538ab6e1bc3d71412f4caf567cd18a11e1267c2;hp=345ac2e347c57b304972dc834f69525371232c2d;hpb=e40ef24f58e1a8190339fa7e43beb05f1034deeb;p=tests.git diff --git a/system/run_log b/system/run_log index 345ac2e..0003226 100755 --- a/system/run_log +++ b/system/run_log @@ -1,17 +1,23 @@ #!/bin/bash cd $(dirname $0) +python -c "import time; print int(time.time())" > timestamp mkdir -p logs time=$(date +%H-%M) -logfile=logs/runtest-${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 +case "$retcod" in + 0) touch logs/success ;; + 2) touch logs/warning ;; +esac -if [ -f logs/success ] ; then - exit 0 -else - exit 1 -fi +echo run_log exit_code $retcod +exit $retcod