]> git.notmuchmail.org Git - notmuch/commitdiff
perf-test: propagate non-zero returns from /usr/bin/time
authorDavid Bremner <bremner@debian.org>
Thu, 6 Dec 2012 01:37:29 +0000 (21:37 -0400)
committerDavid Bremner <bremner@debian.org>
Sat, 15 Dec 2012 02:23:54 +0000 (22:23 -0400)
Unlike in the correctness tests, the most common cause of non-zero
return seems to be the user interrupting, so killing the run seems
like the friendly thing to do.

performance-test/perf-test-lib.sh

index 1399d0598060b82a3beb5be3679c4f4dba2ec1bf..fb15028fbd6712285956aa2898f8e98234effc57 100644 (file)
@@ -51,7 +51,9 @@ time_run () {
     if test "$verbose" != "t"; then exec 4>test.output 3>&4; fi
     if ! eval >&3 "/usr/bin/time -f '%e\t%U\t%S\t%M\t%I\t%O' $2" ; then
        test_failure=$(($test_failure + 1))
     if test "$verbose" != "t"; then exec 4>test.output 3>&4; fi
     if ! eval >&3 "/usr/bin/time -f '%e\t%U\t%S\t%M\t%I\t%O' $2" ; then
        test_failure=$(($test_failure + 1))
+       return 1
     fi
     fi
+    return 0
 }
 
 time_done () {
 }
 
 time_done () {