提交 3437017f 编写于 作者: J Junio C Hamano

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
......@@ -82,6 +82,8 @@ before_install:
brew tap homebrew/binary --quiet
brew_force_set_latest_binary_hash perforce
brew_force_set_latest_binary_hash perforce-server
# Uncomment this if you want to run perf tests:
# brew install gnu-time
brew install git-lfs perforce-server perforce gettext
brew link --force gettext
;;
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册