3 # helper script to run some predefined set of tests
4 # store results in a file that contains the git hash
5 # and also shows differences if any
7 # if this command is run as all-tests3, then we will just do
10 # xxx - WARNING : most likely the python2 and python3 tests
11 # cannot safely be run together; need to check the nepi exp_ids
14 COMMAND=$(basename $0)
18 echo $COMMAND | grep -q 3 && { PYTHON=python3; version=3; }
20 hash=$(git log -n 1 | head -1 | sed -e 's,commit ,,' -e 's,\(........\).*,\1,')
22 # compute output file name
23 output="zz.$hash.py$version"
25 # if there is any pending change, use another name
27 changes=$(git diff HEAD | wc -l); changes=$(echo $changes)
28 [ "$changes" == 0 ] && is_pristine=true
29 [ -n "$is_pristine" ] || output="$output-pending"
31 function all_tests () {
32 echo all-tests : begin at; date
34 echo ========================================
36 echo ========================================
37 echo ===== Current hash $hash
38 echo ===== Current branch
40 echo ===== Uncommitted changes
42 echo ========================================
44 echo ========================================
45 make PYTHON=$PYTHON all-tests
47 echo ========================================
49 echo all-tests : end at $((date)); echo total duration $(($end-$begin)) seconds
54 # the current code for analyzing the output is very basic
55 # this needs to be checked manually for some time
60 # analyze this output for success or not
61 success=$output.success
62 failure=$output.failed
64 if [ "$retcod" != 0 ]; then
66 elif grep -q '^FAIL' $output; then