X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=system%2Frun_log;h=ec1f18018df70035c134724bba992eff6d2b1b66;hb=a9e5d3afadff87fa868bd6c2e6c2dd31ae80f816;hp=e1704630d3287bba1c7844a62796352feac384ee;hpb=87f953c20a5a10273673e0fab3a6ded79475ad4c;p=tests.git diff --git a/system/run_log b/system/run_log index e170463..ec1f180 100755 --- a/system/run_log +++ b/system/run_log @@ -1,6 +1,6 @@ #!/bin/bash cd $(dirname $0) -python -c "import time; print int(time.time())" > timestamp +python3 -c "import time; print(int(time.time()))" > timestamp mkdir -p logs time=$(date +%H-%M) runfile=run-${time}.txt @@ -12,9 +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 logs/$tracefile "$@" &> logs/$runfile ; retcod=$? +python3 -u TestMain.py -t logs/$tracefile "$@" &> logs/$runfile ; retcod=$? cat logs/$runfile -[ "$retcod" == 0 ] && touch logs/success +case "$retcod" in + 0) touch logs/success ;; + 2) touch logs/warning ;; +esac -echo "run_log is exiting" $retcod +echo run_log exit_code $retcod exit $retcod