diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-07-06 13:38:16 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-07-06 13:38:16 -0700 |
commit | 3437017fecf7198516bc17e458aab4909e24c7f0 (patch) | |
tree | 69af607606dfcaea5437d4b86e7251d6037b5cf7 /t | |
parent | Merge branch 'ak/t7800-wo-readlink' (diff) | |
parent | perf: accommodate for MacOSX (diff) | |
download | tgif-3437017fecf7198516bc17e458aab4909e24c7f0.tar.xz |
Merge branch 'js/perf-on-apple'
t/perf needs /usr/bin/time with GNU extension; the invocation of it
is updated to "gtime" on Darwin.
* js/perf-on-apple:
perf: accommodate for MacOSX
Diffstat (limited to 't')
-rw-r--r-- | t/perf/perf-lib.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh index 18c363ea7f..773f955d4a 100644 --- a/t/perf/perf-lib.sh +++ b/t/perf/perf-lib.sh @@ -127,11 +127,15 @@ test_checkout_worktree () { # Performance tests should never fail. If they do, stop immediately immediate=t +# Perf tests require GNU time +case "$(uname -s)" in Darwin) GTIME="${GTIME:-gtime}";; esac +GTIME="${GTIME:-/usr/bin/time}" + test_run_perf_ () { test_cleanup=: test_export_="test_cleanup" export test_cleanup test_export_ - /usr/bin/time -f "%E %U %S" -o test_time.$i "$SHELL" -c ' + "$GTIME" -f "%E %U %S" -o test_time.$i "$SHELL" -c ' . '"$TEST_DIRECTORY"/test-lib-functions.sh' test_export () { [ $# != 0 ] || return 0 |