From f628825481b706baa3d9bf871a081cb1285c2778 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 24 Jul 2012 09:43:59 -0400 Subject: t/lib-httpd: handle running under --valgrind Running the http tests with valgrind does not work for two reasons: 1. Apache complains about following the symbolic link from git-http-backend to valgrind.sh. 2. Apache does not pass through the GIT_VALGRIND variable to the backend CGI. This patch fixes both problems. Unfortunately, there is a slight hack we need to handle passing environment variables through Apache. If we just tell it: PassEnv GIT_VALGRIND then Apache will complain when GIT_VALGRIND is not set. If we try: SetEnv GIT_VALGRIND ${GIT_VALGRIND} then when GIT_VALGRIND is not set, it will pass through the literal "${GIT_VALGRIND}". Instead, we now unconditionally pass through GIT_VALGRIND from lib-httpd.sh into apache, even if it is empty. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/lib-httpd/apache.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 't/lib-httpd') diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf index de3762e247..36b1596a10 100644 --- a/t/lib-httpd/apache.conf +++ b/t/lib-httpd/apache.conf @@ -42,6 +42,9 @@ ErrorLog error.log +PassEnv GIT_VALGRIND +PassEnv GIT_VALGRIND_OPTIONS + Alias /dumb/ www/ Alias /auth/ www/auth/ @@ -62,7 +65,7 @@ ScriptAlias /smart/ ${GIT_EXEC_PATH}/git-http-backend/ ScriptAlias /smart_noexport/ ${GIT_EXEC_PATH}/git-http-backend/ ScriptAlias /smart_custom_env/ ${GIT_EXEC_PATH}/git-http-backend/ - Options None + Options FollowSymlinks Options ExecCGI -- cgit v1.2.1