From 0e46e704626af5189c9c9ff2c0f348d2205c10f3 Mon Sep 17 00:00:00 2001 From: Bryan Donlan Date: Sun, 4 May 2008 01:37:58 -0400 Subject: Don't use the 'export NAME=value' in the test scripts. This form is not portable across all shells, so replace instances of: export FOO=bar with: FOO=bar export FOO Signed-off-by: Bryan Donlan Signed-off-by: Junio C Hamano --- t/t9500-gitweb-standalone-no-errors.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 't/t9500-gitweb-standalone-no-errors.sh') diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh index 061a2596d3..3dc261d80b 100755 --- a/t/t9500-gitweb-standalone-no-errors.sh +++ b/t/t9500-gitweb-standalone-no-errors.sh @@ -39,13 +39,15 @@ EOF } gitweb_run () { - export GATEWAY_INTERFACE="CGI/1.1" - export HTTP_ACCEPT="*/*" - export REQUEST_METHOD="GET" - export QUERY_STRING=""$1"" - export PATH_INFO=""$2"" - - export GITWEB_CONFIG=$(pwd)/gitweb_config.perl + GATEWAY_INTERFACE="CGI/1.1" + HTTP_ACCEPT="*/*" + REQUEST_METHOD="GET" + QUERY_STRING=""$1"" + PATH_INFO=""$2"" + export GATEWAY_INTERFACE HTTP_ACCEPT REQUEST_METHOD QUERY_STRING PATH_INFO + + GITWEB_CONFIG=$(pwd)/gitweb_config.perl + export GITWEB_CONFIG # some of git commands write to STDERR on error, but this is not # written to web server logs, so we are not interested in that: -- cgit v1.2.3 From f69e836fab2b634281d92a0d304de4d768e479cc Mon Sep 17 00:00:00 2001 From: Bryan Donlan Date: Sun, 4 May 2008 01:37:59 -0400 Subject: Fix tests breaking when checkout path contains shell metacharacters This fixes the remainder of the issues where the test script itself is at fault for failing when the git checkout path contains whitespace or other shell metacharacters. The majority of git svn tests used the idiom test_expect_success "title" "test script using $svnrepo" These were changed to have the test script in single-quotes: test_expect_success "title" 'test script using "$svnrepo"' which unfortunately makes the patch appear larger than it really is. One consequence of this change is that in the verbose test output the value of $svnrepo (and in some cases other variables, too) is no longer expanded, i.e. previously we saw * expecting success: test script using /path/to/git/t/trash/svnrepo but now it is: * expecting success: test script using "$svnrepo" Signed-off-by: Bryan Donlan Signed-off-by: Junio C Hamano --- t/t9500-gitweb-standalone-no-errors.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 't/t9500-gitweb-standalone-no-errors.sh') diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh index 3dc261d80b..ae7082be1d 100755 --- a/t/t9500-gitweb-standalone-no-errors.sh +++ b/t/t9500-gitweb-standalone-no-errors.sh @@ -10,6 +10,7 @@ commandline, and checks that it would not write any errors or warnings to log.' gitweb_init () { + safe_pwd="$(perl -MPOSIX=getcwd -e 'print quotemeta(getcwd)')" cat >gitweb_config.perl </dev/null 2>gitweb.log && if grep -q -s "^[[]" gitweb.log >/dev/null; then false; else true; fi -- cgit v1.2.3