Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-07-11 20:44:15 +0300
committerJunio C Hamano <gitster@pobox.com>2016-07-11 20:44:15 +0300
commitce22ea22e863e100529334b02b2899780d2c9dcc (patch)
tree7753b9bd212296c9f704019db1f854b31b6be759 /t
parentc4cdde45f0e8111ab7aac03ddb9a89ef1029fb50 (diff)
parente3efa94be985c398b2118c3c7f7f9bfe3d056687 (diff)
Merge branch 'js/perf-on-apple' into maint
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.sh6
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