diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-06-09 13:36:54 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-06-09 14:18:55 -0700 |
commit | f23b1d06e5a7a162a7cfc5281b10580e7e3d23d6 (patch) | |
tree | dd8bf4c6e0a331df045570af6e0220560daa9193 /t/t3302-notes-index-expensive.sh | |
parent | ac2803b9625a9c38c1595f22da8f160969ed9625 (diff) | |
download | git-f23b1d06e5a7a162a7cfc5281b10580e7e3d23d6.tar.gz |
t3302: do not chdir around in the primary test process
These days^Wyears we strive to do stuff in subdirectories inside
subshells to avoid mistakes.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3302-notes-index-expensive.sh')
-rwxr-xr-x | t/t3302-notes-index-expensive.sh | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/t/t3302-notes-index-expensive.sh b/t/t3302-notes-index-expensive.sh index aa9dbd770f..7712cf3993 100755 --- a/t/t3302-notes-index-expensive.sh +++ b/t/t3302-notes-index-expensive.sh @@ -106,18 +106,27 @@ do_tests () { pr=$1 count=$2 - test_expect_success $pr 'setup / mkdir' ' - mkdir $count && - cd $count + test_expect_success $pr "setup $count" ' + mkdir "$count" && + ( + cd "$count" && + create_repo "$count" + ) ' - test_expect_success $pr "setup $count" "create_repo $count" - - test_expect_success $pr 'notes work' "test_notes $count" - - test_expect_success USR_BIN_TIME,$pr 'notes timing with /usr/bin/time' "time_notes 100" + test_expect_success $pr 'notes work' ' + ( + cd "$count" && + test_notes "$count" + ) + ' - test_expect_success $pr 'teardown / cd ..' 'cd ..' + test_expect_success USR_BIN_TIME,$pr 'notes timing with /usr/bin/time' ' + ( + cd "$count" && + time_notes 100 + ) + ' } do_tests NOT_EXPENSIVE 10 |