X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=system%2Frun_log;h=ec1f18018df70035c134724bba992eff6d2b1b66;hb=9e5cba850b98b3b1fb5c9f51b94523eb29689d98;hp=505d7bc43d34079cf14c7f7a9205856cdc867f46;hpb=ef88f902e2eca85eb952f06492d2d760c5729af9;p=tests.git diff --git a/system/run_log b/system/run_log index 505d7bc..ec1f180 100755 --- a/system/run_log +++ b/system/run_log @@ -1,5 +1,6 @@ #!/bin/bash cd $(dirname $0) +python3 -c "import time; print(int(time.time()))" > timestamp mkdir -p logs time=$(date +%H-%M) runfile=run-${time}.txt @@ -11,11 +12,12 @@ tracelast=trace rm -f logs/success 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 $tracefile "$@" &> logs/$runfile && touch logs/success -cat $runfile +python3 -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