From a051a9ffda1a6d1dd2c72e350f91ef3eff680843 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Fri, 7 Dec 2012 17:13:28 -0500 Subject: [PATCH] bench: do not crash on die, just flag the failed command This will make bigtests tests other benchs. Signed-off-by: Jean Privat --- src/run_bench.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/run_bench.sh b/src/run_bench.sh index c44de47..c35ab79 100755 --- a/src/run_bench.sh +++ b/src/run_bench.sh @@ -27,8 +27,8 @@ count=2 function die() { - echo >&2 "DIE: $*" - exit 1 + echo >&2 "error: $*" + died=1 } # Run a single command multiple time and store the execution times @@ -72,7 +72,7 @@ function run_command() { if [ "$dry_run" = "true" ]; then return; fi echo " $ $@" - "$@" + "$@" || die "$@: failed" } # perl function to compute min/max/avg. @@ -386,3 +386,9 @@ function bench_compilation_time plot "$name.gnu" } bench_compilation_time + +if test -n "$died"; then + echo "Some commands failed" + exit 1 +fi +exit 0 -- 1.7.9.5