From e3ce3d767b284574087f630fb2a98d861811ced5 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 4 Nov 2015 13:07:31 +0100 Subject: [PATCH] tweak all-tests: . can be run as aither all-tests or all-tests3 . output now in zz.py2.hash[.pending] or of course .py3 --- all-tests | 23 ++++++++++++++++++++--- all-tests3 | 1 + 2 files changed, 21 insertions(+), 3 deletions(-) create mode 120000 all-tests3 diff --git a/all-tests b/all-tests index 419614a3..5c538542 100755 --- a/all-tests +++ b/all-tests @@ -4,13 +4,23 @@ # 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="" @@ -32,12 +42,19 @@ function all_tests () { echo ======================================== echo tests echo ======================================== - make all-tests + make PYTHON=$PYTHON all-tests echo ======================================== end=$(date +%s) echo all-tests : end at; date; echo total duration $(($end-$begin)) seconds } +# 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 + all_tests >& $output retcod=$? diff --git a/all-tests3 b/all-tests3 new file mode 120000 index 00000000..183c3c5f --- /dev/null +++ b/all-tests3 @@ -0,0 +1 @@ +all-tests \ No newline at end of file -- 2.43.0