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
This commit is contained in:
commit
ce22ea22e8
@ -82,6 +82,8 @@ before_install:
|
|||||||
brew tap homebrew/binary --quiet
|
brew tap homebrew/binary --quiet
|
||||||
brew_force_set_latest_binary_hash perforce
|
brew_force_set_latest_binary_hash perforce
|
||||||
brew_force_set_latest_binary_hash perforce-server
|
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 install git-lfs perforce-server perforce gettext
|
||||||
brew link --force gettext
|
brew link --force gettext
|
||||||
;;
|
;;
|
||||||
|
@ -127,11 +127,15 @@ test_checkout_worktree () {
|
|||||||
# Performance tests should never fail. If they do, stop immediately
|
# Performance tests should never fail. If they do, stop immediately
|
||||||
immediate=t
|
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_run_perf_ () {
|
||||||
test_cleanup=:
|
test_cleanup=:
|
||||||
test_export_="test_cleanup"
|
test_export_="test_cleanup"
|
||||||
export test_cleanup test_export_
|
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_DIRECTORY"/test-lib-functions.sh'
|
||||||
test_export () {
|
test_export () {
|
||||||
[ $# != 0 ] || return 0
|
[ $# != 0 ] || return 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user