From 39d754a48c7471c72509db6a0beb85a8a141b401 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Tue, 15 Sep 2015 16:53:06 -0400 Subject: [PATCH] benchmarks/strings: continue in case of error Signed-off-by: Jean Privat --- benchmarks/strings/bench_strings.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/benchmarks/strings/bench_strings.sh b/benchmarks/strings/bench_strings.sh index 7a09065..5d24653 100755 --- a/benchmarks/strings/bench_strings.sh +++ b/benchmarks/strings/bench_strings.sh @@ -205,14 +205,14 @@ function launch_bench() echo " Trying variant $variant for benchmark $bench" echo "---------------------------------------------------------" git diff-index --quiet HEAD || { - echo "Cannot run benches on a dirty working directory." - echo "Please commit or stash your modifications and relaunch the command." - exit 1 + die "Cannot run benches on a dirty working directory." + die "Please commit or stash your modifications and relaunch the command." + return } git am $curr_rev || { - echo "Error when applying patch $curr_rev" - git am --abort; - exit 1; + die "Error when applying patch $curr_rev" + git am --abort + return } if [ "$need_bootstrap" = true ]; then prepare_compiler @@ -263,12 +263,6 @@ function main() bench=$1 shift; - git diff-index --quiet HEAD || { - echo "Cannot run benches on a dirty working directory." - echo "Please commit or stash your modifications and relaunch the command." - exit 1 - } - head=`git rev-parse HEAD` variant="HEAD" need_plot=true @@ -314,3 +308,9 @@ function main() } main "$@"; + +if test -n "$died"; then + echo "Some commands failed" + exit 1 +fi +exit 0 -- 1.7.9.5