X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=all-tests;h=6cae656d7da9243d3f2a77309a11a3abbe31f932;hb=e77a91d5173a513108a7448868362de060b804a6;hp=a9fc3c6de4a6c8b7ff1a86450f8d92d903108452;hpb=40abd97d4963775e6ec31b2b2ea80d2fd0642b7e;p=nepi.git diff --git a/all-tests b/all-tests index a9fc3c6d..6cae656d 100755 --- a/all-tests +++ b/all-tests @@ -4,18 +4,29 @@ # store results in a file that contains the git hash # and also shows differences if any # +# if this command is run as all-tests3, then we will just do +# make PYTHON=python3 +# +# xxx - WARNING : most likely the python2 and python3 tests +# cannot safely be run together; need to check the nepi exp_ids +# used more closely + +COMMAND=$(basename $0) -targets="test-node test-app" +PYTHON=python +version=2 +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="all-tests.$hash" +output="zz.py$version.$hash" # if there is any pending change, use another name is_pristine="" -git diff HEAD | cmp --quiet - /dev/zero && is_pristine=true -[ -n "is_pristine" ] || output="$output-pending" +changes=$(git diff HEAD | wc -l); changes=$(echo $changes) +[ "$changes" == 0 ] && is_pristine=true +[ -n "$is_pristine" ] || output="$output-pending" function all_tests () { echo all-tests : begin at; date @@ -31,12 +42,18 @@ function all_tests () { echo ======================================== echo tests echo ======================================== - make all-tests + make PYTHON=$PYTHON all-tests + make_retcod=$! echo ======================================== end=$(date +%s) echo all-tests : end at; date; echo total duration $(($end-$begin)) seconds + return $make_retcod } +# WARNING +# the current code for analyzing the output is very basic +# this needs to be checked manually for some time + all_tests >& $output retcod=$?