From: Thomas Rast Date: Thu, 8 Mar 2012 08:54:54 +0000 (+0100) Subject: perf: load test-lib-functions from the correct directory X-Git-Tag: v1.7.10-rc1~18 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1cbc32403b20f064ec7c295c6603f6fd16662bce;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/t/perf/p0000-perf-lib-sanity.sh b/t/perf/p0000-perf-lib-sanity.sh index 2ca4aaccb..f8dd53670 100755 --- a/t/perf/p0000-perf-lib-sanity.sh +++ b/t/perf/p0000-perf-lib-sanity.sh @@ -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 diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh index 2a5e1f354..bcc013164 100644 --- a/t/perf/perf-lib.sh +++ b/t/perf/perf-lib.sh @@ -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"