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
8 targets="test-node test-app"
10 hash=$(git log -n 1 | head -1 | sed -e 's,commit ,,' -e 's,\(........\).*,\1,')
12 # compute output file name
13 output="all-tests.$hash"
15 # if there is any pending change, use another name
17 git diff HEAD | cmp --quiet - /dev/zero && is_pristine=true
18 [ -n "is_pristine" ] || output="$output-pending"
20 function all_tests () {
21 echo all-tests : begin at; date
23 echo ========================================
25 echo ========================================
26 echo ===== Current hash $hash
27 echo ===== Current branch
29 echo ===== Uncommitted changes
31 echo ========================================
33 echo ========================================
35 echo ========================================
37 echo all-tests : end at; date; echo total duration $(($end-$begin)) seconds
43 # analyze this output for success or not
44 success=$output.success
45 failure=$output.failed
47 if [ "$retcod" != 0 ]; then
49 elif grep -q '^FAIL' $output; then