X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=all-tests;h=5ede05d743e79c250d3e761ad429dad6bf2df234;hb=b323c66f4e8ecedcae299e8442c91fcbaea9276f;hp=5c538542a164d0844e41c01d9e5f5415c45bf355;hpb=e3ce3d767b284574087f630fb2a98d861811ced5;p=nepi.git diff --git a/all-tests b/all-tests index 5c538542..5ede05d7 100755 --- a/all-tests +++ b/all-tests @@ -11,8 +11,13 @@ # cannot safely be run together; need to check the nepi exp_ids # used more closely +DIRNAME=$(dirname $0) COMMAND=$(basename $0) +if echo $COMMAND | grep -q 6; then + $DIRNAME/all-tests2; $DIRNAME/all-tests3; exit +fi + PYTHON=python version=2 echo $COMMAND | grep -q 3 && { PYTHON=python3; version=3; } @@ -20,7 +25,8 @@ echo $COMMAND | grep -q 3 && { PYTHON=python3; version=3; } hash=$(git log -n 1 | head -1 | sed -e 's,commit ,,' -e 's,\(........\).*,\1,') # compute output file name -output="zz.py$version.$hash" +output="zz.$hash.py$version" +latest="zz.latest.py$version" # if there is any pending change, use another name is_pristine="" @@ -43,17 +49,19 @@ function all_tests () { echo tests echo ======================================== make PYTHON=$PYTHON all-tests + make_retcod=$! echo ======================================== end=$(date +%s) - echo all-tests : end at; date; echo total duration $(($end-$begin)) seconds + echo all-tests : end at $((date)); echo total duration $(($end-$begin)) seconds + return $make_retcod } -# WARNING: the current code for analyzing the output is not quite right -# I've seen cases where the tests session goes very badly - with broken imports for example -# but it's considered OK though -# we mght wish to take the opposite angle : check we have as many OK as expected -# but then the list of default targets should be declared here and not in Makefile -# in any case this is good enough for now +# WARNING +# the current code for analyzing the output is very basic +# this needs to be checked manually for some time + +# create a 'latest' symlink +ln -f -s $output $latest all_tests >& $output retcod=$?