[Patch v2 01/11] perf-test: propagate non-zero returns from /usr/bin/time

Subject: [Patch v2 01/11] perf-test: propagate non-zero returns from /usr/bin/time

Date: Wed, 5 Dec 2012 23:01:38 -0400

To: notmuch@notmuchmail.org

Cc: David Bremner

From: david@tethera.net


From: David Bremner <bremner@debian.org>

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 |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/performance-test/perf-test-lib.sh b/performance-test/perf-test-lib.sh
index 1399d05..fb15028 100644
--- a/performance-test/perf-test-lib.sh
+++ b/performance-test/perf-test-lib.sh
@@ -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))
+	return 1
     fi
+    return 0
 }
 
 time_done () {
-- 
1.7.10.4


Thread: