perf: load test-lib-functions from the correct directory

Loading it in the subshells still referred to $TEST_DIRECTORY/..,
which was only correct in preliminary versions of perf-lib.sh

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Thomas Rast 2012-03-08 09:54:54 +01:00 committed by Junio C Hamano
parent 56a33c8f1b
commit 1cbc32403b
2 changed files with 6 additions and 1 deletions

View File

@ -38,4 +38,9 @@ test_expect_success 'test_export works with weird vars' '
test "$bar" = "weird # variable"
'
test_perf 'test-lib-functions correctly loaded in subshells' '
: >a &&
test_path_is_file a
'
test_done

View File

@ -119,7 +119,7 @@ test_run_perf_ () {
test_export_="test_cleanup"
export test_cleanup test_export_
/usr/bin/time -f "%E %U %S" -o test_time.$i "$SHELL" -c '
. '"$TEST_DIRECTORY"/../test-lib-functions.sh'
. '"$TEST_DIRECTORY"/test-lib-functions.sh'
test_export () {
[ $# != 0 ] || return 0
test_export_="$test_export_\\|$1"