function die()
{
- echo >&2 "DIE: $*"
- exit 1
+ echo >&2 "error: $*"
+ died=1
}
# Run a single command multiple time and store the execution times
{
if [ "$dry_run" = "true" ]; then return; fi
echo " $ $@"
- "$@"
+ "$@" || die "$@: failed"
}
# perl function to compute min/max/avg.
plot "$name.gnu"
}
bench_compilation_time
+
+if test -n "$died"; then
+ echo "Some commands failed"
+ exit 1
+fi
+exit 0