summaryrefslogtreecommitdiff
path: root/t/perf/p0000-perf-lib-sanity.sh
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2012-03-08 08:54:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-03-08 20:07:50 (GMT)
commit561ae0673569f43a92ea6b0776ae0f4c01472dca (patch)
tree2cd08b4294644ccc4aba74f2b1d4156ef39eeca9 /t/perf/p0000-perf-lib-sanity.sh
parent1cbc32403b20f064ec7c295c6603f6fd16662bce (diff)
downloadgit-561ae0673569f43a92ea6b0776ae0f4c01472dca.zip
git-561ae0673569f43a92ea6b0776ae0f4c01472dca.tar.gz
git-561ae0673569f43a92ea6b0776ae0f4c01472dca.tar.bz2
perf: export some important test-lib variables
The only bug right now is that $GIT_TEST_CMP is needed for test_cmp to work. However, we also export the three most important paths for tests: TEST_DIRECTORY TRASH_DIRECTORY GIT_BUILD_DIR Since they are available within test_expect_success, a future test writer may expect them to also be defined in test_perf. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/perf/p0000-perf-lib-sanity.sh')
-rwxr-xr-xt/perf/p0000-perf-lib-sanity.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/perf/p0000-perf-lib-sanity.sh b/t/perf/p0000-perf-lib-sanity.sh
index f8dd536..cf8e1ef 100755
--- a/t/perf/p0000-perf-lib-sanity.sh
+++ b/t/perf/p0000-perf-lib-sanity.sh
@@ -38,9 +38,18 @@ test_expect_success 'test_export works with weird vars' '
test "$bar" = "weird # variable"
'
+test_perf 'important variables available in subshells' '
+ test -n "$HOME" &&
+ test -n "$TEST_DIRECTORY" &&
+ test -n "$TRASH_DIRECTORY" &&
+ test -n "$GIT_BUILD_DIR"
+'
+
test_perf 'test-lib-functions correctly loaded in subshells' '
: >a &&
- test_path_is_file a
+ test_path_is_file a &&
+ : >b &&
+ test_cmp a b
'
test_done