Skip to content

Commit

Permalink
perf: load test-lib-functions from the correct directory
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Rast authored and Junio C Hamano committed Mar 8, 2012
1 parent 56a33c8 commit 1cbc324
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions t/perf/p0000-perf-lib-sanity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion t/perf/perf-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 1cbc324

Please sign in to comment.