{"thread":{"id":"11146","subject":"[PATCH] Add option --path to allow to run tests with real systems","startedAt":"2007-12-05T13:45:22Z","lastAt":"2007-12-06T15:50:59Z","messageCount":5,"participants":["Nguyễn Thái Ngọc Duy","Junio C Hamano","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"62014","messageId":"20071205134522.GA24617@laptop","threadId":"11146","inReplyTo":null,"subject":"[PATCH] Add option --path to allow to run tests with real systems","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2007-12-05T13:45:22Z","receivedAt":"2007-12-05T13:45:22Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n As we have decided to move git-* to gitexecdir, we should\n make sure it works.\n\n I'm running tests with --path now and saw some errors. Some\n of them could be from bugs of this patch. I haven't looked into\n them yet.\n\n t/lib-git-svn.sh          |    2 +-\n t/t0000-basic.sh          |    6 +++---\n t/t0040-parse-options.sh  |   16 ++++++++--------\n t/t4200-rerere.sh         |    8 ++++----\n t/t5301-sliding-window.sh |    2 +-\n t/t5302-pack-index.sh     |    4 ++--\n t/test-lib.sh             |   18 ++++++++++++++----\n 7 files changed, 33 insertions(+), 23 deletions(-)\n\ndiff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh\nindex 8d4a447..fd60ebc 100644\n--- a/t/lib-git-svn.sh\n+++ b/t/lib-git-svn.sh\n@@ -46,7 +46,7 @@ rawsvnrepo=\"$svnrepo\"\n svnrepo=\"file://$svnrepo\"\n \n poke() {\n-\ttest-chmtime +1 \"$1\"\n+\t$GIT_TEST_PATH/test-chmtime +1 \"$1\"\n }\n \n SVN_HTTPD_MODULE_PATH=${SVN_HTTPD_MODULE_PATH-'/usr/lib/apache2/modules'}\ndiff --git a/t/t0000-basic.sh b/t/t0000-basic.sh\nindex 4e49d59..f809163 100755\n--- a/t/t0000-basic.sh\n+++ b/t/t0000-basic.sh\n@@ -289,12 +289,12 @@ test_expect_success 'absolute path works as expected' '\n \tmkdir third &&\n \tdir=\"$(cd .git; pwd -P)\" &&\n \tdir2=third/../second/other/.git &&\n-\ttest \"$dir\" = \"$(test-absolute-path $dir2)\" &&\n+\ttest \"$dir\" = \"$($GIT_TEST_PATH/test-absolute-path $dir2)\" &&\n \tfile=\"$dir\"/index &&\n-\ttest \"$file\" = \"$(test-absolute-path $dir2/index)\" &&\n+\ttest \"$file\" = \"$($GIT_TEST_PATH/test-absolute-path $dir2/index)\" &&\n \tln -s ../first/file .git/syml &&\n \tsym=\"$(cd first; pwd -P)\"/file &&\n-\ttest \"$sym\" = \"$(test-absolute-path $dir2/syml)\"\n+\ttest \"$sym\" = \"$($GIT_TEST_PATH/test-absolute-path $dir2/syml)\"\n '\n \n test_done\ndiff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh\nindex 462fdf2..ca1cc9f 100755\n--- a/t/t0040-parse-options.sh\n+++ b/t/t0040-parse-options.sh\n@@ -23,7 +23,7 @@ string options\n EOF\n \n test_expect_success 'test help' '\n-\t! test-parse-options -h > output 2> output.err &&\n+\t! $GIT_TEST_PATH/test-parse-options -h > output 2> output.err &&\n \ttest ! -s output &&\n \tgit diff expect.err output.err\n '\n@@ -35,7 +35,7 @@ string: 123\n EOF\n \n test_expect_success 'short options' '\n-\ttest-parse-options -s123 -b -i 1729 -b > output 2> output.err &&\n+\t$GIT_TEST_PATH/test-parse-options -s123 -b -i 1729 -b > output 2> output.err &&\n \tgit diff expect output &&\n \ttest ! -s output.err\n '\n@@ -46,7 +46,7 @@ string: 321\n EOF\n \n test_expect_success 'long options' '\n-\ttest-parse-options --boolean --integer 1729 --boolean --string2=321 \\\n+\t$GIT_TEST_PATH/test-parse-options --boolean --integer 1729 --boolean --string2=321 \\\n \t\t> output 2> output.err &&\n \ttest ! -s output.err &&\n \tgit diff expect output\n@@ -62,7 +62,7 @@ arg 02: --boolean\n EOF\n \n test_expect_success 'intermingled arguments' '\n-\ttest-parse-options a1 --string 123 b1 --boolean -j 13 -- --boolean \\\n+\t$GIT_TEST_PATH/test-parse-options a1 --string 123 b1 --boolean -j 13 -- --boolean \\\n \t\t> output 2> output.err &&\n \ttest ! -s output.err &&\n \tgit diff expect output\n@@ -75,19 +75,19 @@ string: (not set)\n EOF\n \n test_expect_success 'unambiguously abbreviated option' '\n-\ttest-parse-options --int 2 --boolean --no-bo > output 2> output.err &&\n+\t$GIT_TEST_PATH/test-parse-options --int 2 --boolean --no-bo > output 2> output.err &&\n \ttest ! -s output.err &&\n \tgit diff expect output\n '\n \n test_expect_success 'unambiguously abbreviated option with \"=\"' '\n-\ttest-parse-options --int=2 > output 2> output.err &&\n+\t$GIT_TEST_PATH/test-parse-options --int=2 > output 2> output.err &&\n \ttest ! -s output.err &&\n \tgit diff expect output\n '\n \n test_expect_failure 'ambiguously abbreviated option' '\n-\ttest-parse-options --strin 123;\n+\t$GIT_TEST_PATH/test-parse-options --strin 123;\n         test $? != 129\n '\n \n@@ -98,7 +98,7 @@ string: 123\n EOF\n \n test_expect_success 'non ambiguous option (after two options it abbreviates)' '\n-\ttest-parse-options --st 123 > output 2> output.err &&\n+\t$GIT_TEST_PATH/test-parse-options --st 123 > output 2> output.err &&\n \ttest ! -s output.err &&\n \tgit diff expect output\n '\ndiff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh\nindex cfcdb69..ddbae1d 100755\n--- a/t/t4200-rerere.sh\n+++ b/t/t4200-rerere.sh\n@@ -149,16 +149,16 @@ just_over_15_days_ago=$((-1-15*86400))\n almost_60_days_ago=$((60-60*86400))\n just_over_60_days_ago=$((-1-60*86400))\n \n-test-chmtime =$almost_60_days_ago $rr/preimage\n-test-chmtime =$almost_15_days_ago $rr2/preimage\n+$GIT_TEST_PATH/test-chmtime =$almost_60_days_ago $rr/preimage\n+$GIT_TEST_PATH/test-chmtime =$almost_15_days_ago $rr2/preimage\n \n test_expect_success 'garbage collection (part1)' 'git rerere gc'\n \n test_expect_success 'young records still live' \\\n \t\"test -f $rr/preimage && test -f $rr2/preimage\"\n \n-test-chmtime =$just_over_60_days_ago $rr/preimage\n-test-chmtime =$just_over_15_days_ago $rr2/preimage\n+$GIT_TEST_PATH/test-chmtime =$just_over_60_days_ago $rr/preimage\n+$GIT_TEST_PATH/test-chmtime =$just_over_15_days_ago $rr2/preimage\n \n test_expect_success 'garbage collection (part2)' 'git rerere gc'\n \ndiff --git a/t/t5301-sliding-window.sh b/t/t5301-sliding-window.sh\nindex 073ac0c..8327051 100755\n--- a/t/t5301-sliding-window.sh\n+++ b/t/t5301-sliding-window.sh\n@@ -12,7 +12,7 @@ test_expect_success \\\n      for i in a b c\n      do\n          echo $i >$i &&\n-         test-genrandom \"$i\" 32768 >>$i &&\n+         $GIT_TEST_PATH/test-genrandom \"$i\" 32768 >>$i &&\n          git update-index --add $i || return 1\n      done &&\n      echo d >d && cat c >>d && git update-index --add d &&\ndiff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh\nindex 2a2878b..0ae9cd8 100755\n--- a/t/t5302-pack-index.sh\n+++ b/t/t5302-pack-index.sh\n@@ -15,11 +15,11 @@ test_expect_success \\\n      do\n \t\t i=`printf '%03i' $i`\n          echo $i >file_$i &&\n-         test-genrandom \"$i\" 8192 >>file_$i &&\n+         $GIT_TEST_PATH/test-genrandom \"$i\" 8192 >>file_$i &&\n          git update-index --add file_$i &&\n \t\t i=`expr $i + 1` || return 1\n      done &&\n-     { echo 101 && test-genrandom 100 8192; } >file_101 &&\n+     { echo 101 && $GIT_TEST_PATH/test-genrandom 100 8192; } >file_101 &&\n      git update-index --add file_101 &&\n      tree=`git write-tree` &&\n      commit=`git commit-tree $tree </dev/null` && {\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 90b6844..50a3551 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -84,6 +84,8 @@ do\n \t--no-python)\n \t\t# noop now...\n \t\tshift ;;\n+\t--path=*)\n+\t\tpath=\"${1#*=}\"; shift ;;\n \t*)\n \t\tbreak ;;\n \tesac\n@@ -296,11 +298,19 @@ test_done () {\n \n # Test the binaries we have just built.  The tests are kept in\n # t/ subdirectory and are run in trash subdirectory.\n-PATH=$(pwd)/..:$PATH\n-GIT_EXEC_PATH=$(pwd)/..\n+if [ -n \"$path\" ]; then\n+\t[ -x \"$path/git\" ] || error \"git not found in $path\"\n+\tPATH=\"$path\":$PATH\n+\texport PATH\n+\tGIT_EXEC_PATH=\"$(git --exec-path)\"\n+else\n+\tPATH=$(pwd)/..:$PATH\n+\tGIT_EXEC_PATH=$(pwd)/..\n+fi\n+GIT_TEST_PATH=$(pwd)/..\n GIT_TEMPLATE_DIR=$(pwd)/../templates/blt\n GIT_CONFIG=.git/config\n-export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG\n+export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG GIT_TEST_PATH\n \n GITPERLLIB=$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git\n export GITPERLLIB\n@@ -308,7 +318,7 @@ test -d ../templates/blt || {\n \terror \"You haven't built things yet, have you?\"\n }\n \n-if ! test -x ../test-chmtime; then\n+if ! test -x $GIT_TEST_PATH/test-chmtime; then\n \techo >&2 'You need to build test-chmtime:'\n \techo >&2 'Run \"make test-chmtime\" in the source (toplevel) directory'\n \texit 1\n-- \n1.5.3.6.2040.gcdff-dirty\n"},{"id":"62044","messageId":"7v3auhq6mv.fsf@gitster.siamese.dyndns.org","threadId":"11146","inReplyTo":"20071205134522.GA24617@laptop","subject":"Re: [PATCH] Add option --path to allow to run tests with real systems","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-12-05T19:32:56Z","receivedAt":"2007-12-05T19:32:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:\n\n> diff --git a/t/test-lib.sh b/t/test-lib.sh\n> index 90b6844..50a3551 100644\n> --- a/t/test-lib.sh\n> +++ b/t/test-lib.sh\n> @@ -84,6 +84,8 @@ do\n>  \t--no-python)\n>  \t\t# noop now...\n>  \t\tshift ;;\n> +\t--path=*)\n> +\t\tpath=\"${1#*=}\"; shift ;;\n>  \t*)\n>  \t\tbreak ;;\n>  \tesac\n> @@ -296,11 +298,19 @@ test_done () {\n>  \n>  # Test the binaries we have just built.  The tests are kept in\n>  # t/ subdirectory and are run in trash subdirectory.\n> -PATH=$(pwd)/..:$PATH\n> -GIT_EXEC_PATH=$(pwd)/..\n> +if [ -n \"$path\" ]; then\n> +\t[ -x \"$path/git\" ] || error \"git not found in $path\"\n> +\tPATH=\"$path\":$PATH\n> +\texport PATH\n> +\tGIT_EXEC_PATH=\"$(git --exec-path)\"\n\nThis is wrong, isn't it?  $path may point at the freshly built but not\ninstalled git executable, but it reports --exec-path the location that\ngit-foo and friends are to be _eventually_ installed, not the location\nthey are sitting after built, being tested, waiting to be installed.\n"},{"id":"62145","messageId":"20071206134817.GA8523@laptop","threadId":"11146","inReplyTo":"7v3auhq6mv.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] Add option --path to allow to run tests with real systems. You must install git before running this test.","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2007-12-06T13:48:17Z","receivedAt":"2007-12-06T13:48:17Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n On Thu, Dec 06, 2007 at 10:15:05AM +0700, Nguyen Thai Ngoc Duy wrote:\n > On Dec 6, 2007 2:32 AM, Junio C Hamano <gitster@pobox.com> wrote:\n > > This is wrong, isn't it?  $path may point at the freshly built but not\n > > installed git executable, but it reports --exec-path the location that\n > > git-foo and friends are to be _eventually_ installed, not the location\n > > they are sitting after built, being tested, waiting to be installed.\n > >\n > Yes, forgot to mention you must do \"make install\" first :)\n > \n\n Perhaps a check to remind people to 'make install' like this?\n\n t/lib-git-svn.sh          |    2 +-\n t/t0000-basic.sh          |    6 +++---\n t/t0040-parse-options.sh  |   16 ++++++++--------\n t/t4200-rerere.sh         |    8 ++++----\n t/t5301-sliding-window.sh |    2 +-\n t/t5302-pack-index.sh     |    4 ++--\n t/test-lib.sh             |   19 +++++++++++++++----\n 7 files changed, 34 insertions(+), 23 deletions(-)\n\ndiff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh\nindex 8d4a447..fd60ebc 100644\n--- a/t/lib-git-svn.sh\n+++ b/t/lib-git-svn.sh\n@@ -46,7 +46,7 @@ rawsvnrepo=\"$svnrepo\"\n svnrepo=\"file://$svnrepo\"\n \n poke() {\n-\ttest-chmtime +1 \"$1\"\n+\t$GIT_TEST_PATH/test-chmtime +1 \"$1\"\n }\n \n SVN_HTTPD_MODULE_PATH=${SVN_HTTPD_MODULE_PATH-'/usr/lib/apache2/modules'}\ndiff --git a/t/t0000-basic.sh b/t/t0000-basic.sh\nindex 4e49d59..f809163 100755\n--- a/t/t0000-basic.sh\n+++ b/t/t0000-basic.sh\n@@ -289,12 +289,12 @@ test_expect_success 'absolute path works as expected' '\n \tmkdir third &&\n \tdir=\"$(cd .git; pwd -P)\" &&\n \tdir2=third/../second/other/.git &&\n-\ttest \"$dir\" = \"$(test-absolute-path $dir2)\" &&\n+\ttest \"$dir\" = \"$($GIT_TEST_PATH/test-absolute-path $dir2)\" &&\n \tfile=\"$dir\"/index &&\n-\ttest \"$file\" = \"$(test-absolute-path $dir2/index)\" &&\n+\ttest \"$file\" = \"$($GIT_TEST_PATH/test-absolute-path $dir2/index)\" &&\n \tln -s ../first/file .git/syml &&\n \tsym=\"$(cd first; pwd -P)\"/file &&\n-\ttest \"$sym\" = \"$(test-absolute-path $dir2/syml)\"\n+\ttest \"$sym\" = \"$($GIT_TEST_PATH/test-absolute-path $dir2/syml)\"\n '\n \n test_done\ndiff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh\nindex 462fdf2..ca1cc9f 100755\n--- a/t/t0040-parse-options.sh\n+++ b/t/t0040-parse-options.sh\n@@ -23,7 +23,7 @@ string options\n EOF\n \n test_expect_success 'test help' '\n-\t! test-parse-options -h > output 2> output.err &&\n+\t! $GIT_TEST_PATH/test-parse-options -h > output 2> output.err &&\n \ttest ! -s output &&\n \tgit diff expect.err output.err\n '\n@@ -35,7 +35,7 @@ string: 123\n EOF\n \n test_expect_success 'short options' '\n-\ttest-parse-options -s123 -b -i 1729 -b > output 2> output.err &&\n+\t$GIT_TEST_PATH/test-parse-options -s123 -b -i 1729 -b > output 2> output.err &&\n \tgit diff expect output &&\n \ttest ! -s output.err\n '\n@@ -46,7 +46,7 @@ string: 321\n EOF\n \n test_expect_success 'long options' '\n-\ttest-parse-options --boolean --integer 1729 --boolean --string2=321 \\\n+\t$GIT_TEST_PATH/test-parse-options --boolean --integer 1729 --boolean --string2=321 \\\n \t\t> output 2> output.err &&\n \ttest ! -s output.err &&\n \tgit diff expect output\n@@ -62,7 +62,7 @@ arg 02: --boolean\n EOF\n \n test_expect_success 'intermingled arguments' '\n-\ttest-parse-options a1 --string 123 b1 --boolean -j 13 -- --boolean \\\n+\t$GIT_TEST_PATH/test-parse-options a1 --string 123 b1 --boolean -j 13 -- --boolean \\\n \t\t> output 2> output.err &&\n \ttest ! -s output.err &&\n \tgit diff expect output\n@@ -75,19 +75,19 @@ string: (not set)\n EOF\n \n test_expect_success 'unambiguously abbreviated option' '\n-\ttest-parse-options --int 2 --boolean --no-bo > output 2> output.err &&\n+\t$GIT_TEST_PATH/test-parse-options --int 2 --boolean --no-bo > output 2> output.err &&\n \ttest ! -s output.err &&\n \tgit diff expect output\n '\n \n test_expect_success 'unambiguously abbreviated option with \"=\"' '\n-\ttest-parse-options --int=2 > output 2> output.err &&\n+\t$GIT_TEST_PATH/test-parse-options --int=2 > output 2> output.err &&\n \ttest ! -s output.err &&\n \tgit diff expect output\n '\n \n test_expect_failure 'ambiguously abbreviated option' '\n-\ttest-parse-options --strin 123;\n+\t$GIT_TEST_PATH/test-parse-options --strin 123;\n         test $? != 129\n '\n \n@@ -98,7 +98,7 @@ string: 123\n EOF\n \n test_expect_success 'non ambiguous option (after two options it abbreviates)' '\n-\ttest-parse-options --st 123 > output 2> output.err &&\n+\t$GIT_TEST_PATH/test-parse-options --st 123 > output 2> output.err &&\n \ttest ! -s output.err &&\n \tgit diff expect output\n '\ndiff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh\nindex cfcdb69..ddbae1d 100755\n--- a/t/t4200-rerere.sh\n+++ b/t/t4200-rerere.sh\n@@ -149,16 +149,16 @@ just_over_15_days_ago=$((-1-15*86400))\n almost_60_days_ago=$((60-60*86400))\n just_over_60_days_ago=$((-1-60*86400))\n \n-test-chmtime =$almost_60_days_ago $rr/preimage\n-test-chmtime =$almost_15_days_ago $rr2/preimage\n+$GIT_TEST_PATH/test-chmtime =$almost_60_days_ago $rr/preimage\n+$GIT_TEST_PATH/test-chmtime =$almost_15_days_ago $rr2/preimage\n \n test_expect_success 'garbage collection (part1)' 'git rerere gc'\n \n test_expect_success 'young records still live' \\\n \t\"test -f $rr/preimage && test -f $rr2/preimage\"\n \n-test-chmtime =$just_over_60_days_ago $rr/preimage\n-test-chmtime =$just_over_15_days_ago $rr2/preimage\n+$GIT_TEST_PATH/test-chmtime =$just_over_60_days_ago $rr/preimage\n+$GIT_TEST_PATH/test-chmtime =$just_over_15_days_ago $rr2/preimage\n \n test_expect_success 'garbage collection (part2)' 'git rerere gc'\n \ndiff --git a/t/t5301-sliding-window.sh b/t/t5301-sliding-window.sh\nindex 073ac0c..8327051 100755\n--- a/t/t5301-sliding-window.sh\n+++ b/t/t5301-sliding-window.sh\n@@ -12,7 +12,7 @@ test_expect_success \\\n      for i in a b c\n      do\n          echo $i >$i &&\n-         test-genrandom \"$i\" 32768 >>$i &&\n+         $GIT_TEST_PATH/test-genrandom \"$i\" 32768 >>$i &&\n          git update-index --add $i || return 1\n      done &&\n      echo d >d && cat c >>d && git update-index --add d &&\ndiff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh\nindex 2a2878b..0ae9cd8 100755\n--- a/t/t5302-pack-index.sh\n+++ b/t/t5302-pack-index.sh\n@@ -15,11 +15,11 @@ test_expect_success \\\n      do\n \t\t i=`printf '%03i' $i`\n          echo $i >file_$i &&\n-         test-genrandom \"$i\" 8192 >>file_$i &&\n+         $GIT_TEST_PATH/test-genrandom \"$i\" 8192 >>file_$i &&\n          git update-index --add file_$i &&\n \t\t i=`expr $i + 1` || return 1\n      done &&\n-     { echo 101 && test-genrandom 100 8192; } >file_101 &&\n+     { echo 101 && $GIT_TEST_PATH/test-genrandom 100 8192; } >file_101 &&\n      git update-index --add file_101 &&\n      tree=`git write-tree` &&\n      commit=`git commit-tree $tree </dev/null` && {\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 90b6844..97c0f4d 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -84,6 +84,8 @@ do\n \t--no-python)\n \t\t# noop now...\n \t\tshift ;;\n+\t--path=*)\n+\t\tpath=\"${1#*=}\"; shift ;;\n \t*)\n \t\tbreak ;;\n \tesac\n@@ -296,11 +298,20 @@ test_done () {\n \n # Test the binaries we have just built.  The tests are kept in\n # t/ subdirectory and are run in trash subdirectory.\n-PATH=$(pwd)/..:$PATH\n-GIT_EXEC_PATH=$(pwd)/..\n+if [ -n \"$path\" ]; then\n+\t[ -x \"$path/git\" ] || error \"git not found in $path\"\n+\t[ \"$($path/git --version)\" = \"$(../git --version)\" ] ||\n+\t\terror \"Version mismatch. Did you forget to 'make install'?\"\n+\tPATH=\"$path\":$PATH\n+\tGIT_EXEC_PATH=\"$($path/git --exec-path)\"\n+else\n+\tPATH=$(pwd)/..:$PATH\n+\tGIT_EXEC_PATH=$(pwd)/..\n+fi\n+GIT_TEST_PATH=$(pwd)/..\n GIT_TEMPLATE_DIR=$(pwd)/../templates/blt\n GIT_CONFIG=.git/config\n-export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG\n+export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG GIT_TEST_PATH\n \n GITPERLLIB=$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git\n export GITPERLLIB\n@@ -308,7 +319,7 @@ test -d ../templates/blt || {\n \terror \"You haven't built things yet, have you?\"\n }\n \n-if ! test -x ../test-chmtime; then\n+if ! test -x $GIT_TEST_PATH/test-chmtime; then\n \techo >&2 'You need to build test-chmtime:'\n \techo >&2 'Run \"make test-chmtime\" in the source (toplevel) directory'\n \texit 1\n-- \n1.5.3.6.2040.gfc2f-dirty\n"},{"id":"62154","messageId":"Pine.LNX.4.64.0712061422010.27959@racer.site","threadId":"11146","inReplyTo":"20071206134817.GA8523@laptop","subject":"Re: [PATCH] Add option --path to allow to run tests with real systems. You must install git before running this test.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-12-06T15:23:31Z","receivedAt":"2007-12-06T15:23:31Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 6 Dec 2007, Nguyễn Thái Ngọc Duy wrote:\n\n> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n> ---\n>  On Thu, Dec 06, 2007 at 10:15:05AM +0700, Nguyen Thai Ngoc Duy wrote:\n>  > On Dec 6, 2007 2:32 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>  > > This is wrong, isn't it?  $path may point at the freshly built but not\n>  > > installed git executable, but it reports --exec-path the location that\n>  > > git-foo and friends are to be _eventually_ installed, not the location\n>  > > they are sitting after built, being tested, waiting to be installed.\n>  > >\n>  > Yes, forgot to mention you must do \"make install\" first :)\n>  > \n> \n>  Perhaps a check to remind people to 'make install' like this?\n\nWell, the whole point of \"make test\" is to be sure that it works before \ninstalling it.\n\nHow about something completely different?\n\n-- snipsnap --\n\n t/test-lib.sh |   13 ++++++++++++-\n 1 files changed, 12 insertions(+), 1 deletions(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 90b6844..ee87b83 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -296,7 +296,18 @@ test_done () {\n \n # Test the binaries we have just built.  The tests are kept in\n # t/ subdirectory and are run in trash subdirectory.\n-PATH=$(pwd)/..:$PATH\n+\n+# Test libexec, while we are at it\n+\n+test -d test-bin || mkdir test-bin || error \"t/test-bin/ could not be created\"\n+for file in ../git ../git-sh-setup ../test-*\n+do\n+\ttarget=test-bin/\"$(basename \"$filename\")\"\n+\ttest -x \"$file\" && test ! -x \"$target\" &&\n+\t\tln -s ../\"$file\" test-bin/\n+done\n+\n+PATH=$(pwd)/test-bin:$PATH\n GIT_EXEC_PATH=$(pwd)/..\n GIT_TEMPLATE_DIR=$(pwd)/../templates/blt\n GIT_CONFIG=.git/config"},{"id":"62158","messageId":"Pine.LNX.4.64.0712061549491.27959@racer.site","threadId":"11146","inReplyTo":"fcaeb9bf0712060732r70d07135lf6a01ae2410a0ada@mail.gmail.com","subject":"Re: [PATCH] Add option --path to allow to run tests with real systems. You must install git before running this test.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-12-06T15:50:59Z","receivedAt":"2007-12-06T15:50:59Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 6 Dec 2007, Nguyen Thai Ngoc Duy wrote:\n\n> On Dec 6, 2007 10:23 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> > Hi,\n> >\n> > On Thu, 6 Dec 2007, Nguyễn Thái Ngọc Duy wrote:\n> >\n> > > Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n> > > ---\n> > >  On Thu, Dec 06, 2007 at 10:15:05AM +0700, Nguyen Thai Ngoc Duy wrote:\n> > >  > On Dec 6, 2007 2:32 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> > >  > > This is wrong, isn't it?  $path may point at the freshly built but not\n> > >  > > installed git executable, but it reports --exec-path the location that\n> > >  > > git-foo and friends are to be _eventually_ installed, not the location\n> > >  > > they are sitting after built, being tested, waiting to be installed.\n> > >  > >\n> > >  > Yes, forgot to mention you must do \"make install\" first :)\n> > >  >\n> > >\n> > >  Perhaps a check to remind people to 'make install' like this?\n> >\n> > Well, the whole point of \"make test\" is to be sure that it works before\n> > installing it.\n> >\n> > How about something completely different?\n> \n> I still think testing another round after installing is good. But\n> that's not my aim. So Ack on your patch (at least the idea because I\n> have not used it yet).\n\nNo, I think that testing after installing is way too late.\n\nBTW there was no sign-off on my patch (as well as no commit message), \nbecause it does not work on symbolic-link-challenged systems.  So it was \npurely meant as inspiration.\n\nCiao,\nDscho\n"}]}