Code

gettext tests: locate i18n lib&data correctly under --valgrind
authorThomas Rast <trast@student.ethz.ch>
Sun, 25 Jul 2010 14:55:46 +0000 (16:55 +0200)
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 30 Oct 2010 07:10:05 +0000 (07:10 +0000)
The new t020[01] for gettext support did not find git-sh-i18n and the
translation data when run under --valgrind: lib-gettext.sh tried to
locate them under $GIT_EXEC_PATH, which normally is the git build
directory, but is changed by --valgrind to point to the wrappers.

Introduce a new variable $GIT_BUILD_DIR which can be used to locate
data that resides under the build directory, and use that instead.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
t/lib-gettext.sh

index 831ee38e831eca07c2ab9627d217b47e7145b505..f0cdd3da931f52251e37f0fafa69aac419e92302 100644 (file)
@@ -5,11 +5,11 @@
 
 . ./test-lib.sh
 
-GIT_TEXTDOMAINDIR="$GIT_EXEC_PATH/share/locale"
-GIT_PO_PATH="$GIT_EXEC_PATH/po"
+GIT_TEXTDOMAINDIR="$GIT_BUILD_DIR/share/locale"
+GIT_PO_PATH="$GIT_BUILD_DIR/po"
 export GIT_TEXTDOMAINDIR GIT_PO_PATH
 
-. "$GIT_EXEC_PATH"/git-sh-i18n
+. "$GIT_BUILD_DIR"/git-sh-i18n
 
 if test_have_prereq GETTEXT
 then