{"thread":{"id":"24507","subject":"[PATCH av/i18n 1/2] tests: Symlink share and po into valgrind wrapper directory","startedAt":"2010-07-25T09:50:55Z","lastAt":"2010-07-25T14:55:46Z","messageCount":5,"participants":["Thomas Rast","Ævar Arnfjörð Bjarmason"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"146256","messageId":"ba054975988a4a799bcd81a74acd865815ae9bf5.1280051448.git.trast@student.ethz.ch","threadId":"24507","inReplyTo":null,"subject":"[PATCH av/i18n 1/2] tests: Symlink share and po into valgrind wrapper directory","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2010-07-25T09:50:55Z","receivedAt":"2010-07-25T09:50:55Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"This is required since with --valgrind, the $GIT_EXEC_PATH that is\nused to determine the proper location of these directories points to\n.../t/valgrind/bin.\n\nSigned-off-by: Thomas Rast <trast@student.ethz.ch>\n---\n t/test-lib.sh |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 4ae0de8..2f4bb27 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -735,6 +735,8 @@ then\n \tdo\n \t\tmake_valgrind_symlink $file\n \tdone\n+\tmake_symlink \"$TEST_DIRECTORY/../po\" \"$GIT_VALGRIND\"/bin/po\n+\tmake_symlink \"$TEST_DIRECTORY/../share\" \"$GIT_VALGRIND\"/bin/share\n \tOLDIFS=$IFS\n \tIFS=:\n \tfor path in $PATH\n-- \n1.7.2.289.g93c76\n"},{"id":"146257","messageId":"d890d9ba7d967e6a191cb47194379d8f9ca5cd0d.1280051448.git.trast@student.ethz.ch","threadId":"24507","inReplyTo":"ba054975988a4a799bcd81a74acd865815ae9bf5.1280051448.git.trast@student.ethz.ch","subject":"[PATCH av/i18n 2/2] Make git-sh-i18n executable","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2010-07-25T09:50:56Z","receivedAt":"2010-07-25T09:50:56Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"git-sh-i18n was not picked up by the valgrind wrapper code because\nthat tests for the executable bit.  Since there does not seem to be a\nparticular reason why it needs to be non-executable, and this is the\npath of least special-casing to fix --valgrind testing, just make it\nexecutable.\n\nSigned-off-by: Thomas Rast <trast@student.ethz.ch>\n---\n 0 files changed, 0 insertions(+), 0 deletions(-)\n mode change 100644 => 100755 git-sh-i18n.sh\n\ndiff --git a/git-sh-i18n.sh b/git-sh-i18n.sh\nold mode 100644\nnew mode 100755\n-- \n1.7.2.289.g93c76\n"},{"id":"146258","messageId":"AANLkTimpqw2RirLPDJkAhQIql793nwC9pc0HctIcxKKj@mail.gmail.com","threadId":"24507","inReplyTo":"d890d9ba7d967e6a191cb47194379d8f9ca5cd0d.1280051448.git.trast@student.ethz.ch","subject":"Re: [PATCH av/i18n 2/2] Make git-sh-i18n executable","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-07-25T10:19:34Z","receivedAt":"2010-07-25T10:19:34Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Sun, Jul 25, 2010 at 09:50, Thomas Rast <trast@student.ethz.ch> wrote:\n> git-sh-i18n was not picked up by the valgrind wrapper code because\n> that tests for the executable bit.  Since there does not seem to be a\n> particular reason why it needs to be non-executable, and this is the\n> path of least special-casing to fix --valgrind testing, just make it\n> executable.\n>\n> Signed-off-by: Thomas Rast <trast@student.ethz.ch>\n> ---\n>  0 files changed, 0 insertions(+), 0 deletions(-)\n>  mode change 100644 => 100755 git-sh-i18n.sh\n>\n> diff --git a/git-sh-i18n.sh b/git-sh-i18n.sh\n> old mode 100644\n> new mode 100755\n> --\n\nWhy is it including git-sh-i18n.sh? It should only be using the\ngenerated SCRIPT_LIB git-sh-i18n file.\n\nOn my system the executable bit of git-sh-i18n.sh has no effect on the\ngenerated git-sh-i18n file:\n\n    $ rm git-sh-i18n; chmod +x git-sh-i18n.sh ; make ; ls -l git-sh-i18n*\n        GEN git-sh-i18n\n        SUBDIR git-gui\n        SUBDIR gitk-git\n    make[1]: Nothing to be done for `all'.\n        SUBDIR perl\n        SUBDIR git_remote_helpers\n        SUBDIR templates\n    -rw-r--r-- 1 avar avar 1965 2010-07-25 10:15 git-sh-i18n\n    -rwxr-xr-x 1 avar avar 1955 2010-07-25 10:08 git-sh-i18n.sh\n\nAnd this still leaves git-sh-setup without an executable bit, why\ndoesn't that fail under valgrind while git-sh-i18n apparently does?\nMaybe something to do with it being included as\n<<. \"$GIT_EXEC_PATH\"/git-sh-i18n>> instead of as <<. git-sh-setup>> ?\n"},{"id":"146279","messageId":"201007251515.08916.trast@student.ethz.ch","threadId":"24507","inReplyTo":"AANLkTimpqw2RirLPDJkAhQIql793nwC9pc0HctIcxKKj@mail.gmail.com","subject":"Re: [PATCH av/i18n 2/2] Make git-sh-i18n executable","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2010-07-25T13:15:08Z","receivedAt":"2010-07-25T13:15:08Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Ævar Arnfjörð Bjarmason wrote:\n> Why is it including git-sh-i18n.sh? It should only be using the\n> generated SCRIPT_LIB git-sh-i18n file.\n> \n> On my system the executable bit of git-sh-i18n.sh has no effect on the\n> generated git-sh-i18n file:\n\nHmph, you're right.  I'd have to move it into the SCRIPT_SH category\ninstead of SCRIPT_LIB to affect the executable bit.\n\nBack to the drawing board I guess...\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"146290","messageId":"06b6dd297e87a92e1c9000f5998e7bc955933235.1280069635.git.trast@student.ethz.ch","threadId":"24507","inReplyTo":"201007251515.08916.trast@student.ethz.ch","subject":"[PATCH ab/i18n v2] tests: locate i18n lib&data correctly under --valgrind","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2010-07-25T14:55:46Z","receivedAt":"2010-07-25T14:55:46Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"The new t020[01] for gettext support did not find git-sh-i18n and the\ntranslation data when run under --valgrind: lib-gettext.sh tried to\nlocate them under $GIT_EXEC_PATH, which normally is the git build\ndirectory, but is changed by --valgrind to point to the wrappers.\n\nIntroduce a new variable $GIT_BUILD_DIR which can be used to locate\ndata that resides under the build directory, and use that instead.\n\nSigned-off-by: Thomas Rast <trast@student.ethz.ch>\n---\n\nThis approach fixes both problems in one go.\n\n t/lib-gettext.sh |    6 +++---\n t/test-lib.sh    |    1 +\n 2 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/t/lib-gettext.sh b/t/lib-gettext.sh\nindex 831ee38..f0cdd3d 100644\n--- a/t/lib-gettext.sh\n+++ b/t/lib-gettext.sh\n@@ -5,11 +5,11 @@\n \n . ./test-lib.sh\n \n-GIT_TEXTDOMAINDIR=\"$GIT_EXEC_PATH/share/locale\"\n-GIT_PO_PATH=\"$GIT_EXEC_PATH/po\"\n+GIT_TEXTDOMAINDIR=\"$GIT_BUILD_DIR/share/locale\"\n+GIT_PO_PATH=\"$GIT_BUILD_DIR/po\"\n export GIT_TEXTDOMAINDIR GIT_PO_PATH\n \n-. \"$GIT_EXEC_PATH\"/git-sh-i18n\n+. \"$GIT_BUILD_DIR\"/git-sh-i18n\n \n if test_have_prereq GETTEXT\n then\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 4ae0de8..08e5438 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -768,6 +768,7 @@ else # normal case, use ../bin-wrappers only unless $with_dashes:\n \t\tPATH=\"$TEST_DIRECTORY/..:$PATH\"\n \tfi\n fi\n+GIT_BUILD_DIR=$(pwd)/..\n GIT_TEMPLATE_DIR=$(pwd)/../templates/blt\n unset GIT_CONFIG\n GIT_CONFIG_NOSYSTEM=1\n-- \n1.7.2.289.g93c76\n"}]}