{"thread":{"id":"14883","subject":"[PATCH 0/3] Enable parallelized tests","startedAt":"2008-08-08T05:59:08Z","lastAt":"2008-08-10T07:33:18Z","messageCount":26,"participants":["Johannes Schindelin","Junio C Hamano","René Scharfe","Stephan Beyer","SZEDER Gábor","Olivier Marin"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"86453","messageId":"alpine.DEB.1.00.0808080752210.9611@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"14883","inReplyTo":null,"subject":"[PATCH 0/3] Enable parallelized tests","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-08-08T05:59:08Z","receivedAt":"2008-08-08T05:59:08Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nThis patch pair enables parallel tests.  On a pretty beefy machine,\n\n\t$ /usr/bin/time make -j50\n\nshows this:\n\n\t69.33user 92.33system 0:59.26elapsed 272%CPU (0avgtext+0avgdata\n\t0maxresident)k 0inputs+0outputs (0major+33007360minor)pagefaults 0swaps\n\nvs.\n\n\t$ /usr/bin/time make\n\nshowing this:\n\n\t61.25user 75.10system 3:57.68elapsed 57%CPU (0avgtext+0avgdata\n\t0maxresident)k 0inputs+0outputs (0major+32897071minor)pagefaults 0swaps\n\nNote: the machine was used for other tasks during the test, too.\n\nThese results are with SVN/CVS tests enabled.  I am pretty sure that the\nresults would be even more impressive without them (the SVN/CVS tests come\nall at the end, and seem to idle the CPU mostly, and the last few seconds\nare only spent on 2 tests).\n\nJohannes Schindelin (3):\n  t9700: remove useless check\n  tests: Clarify dependencies between tests, 'aggregate-results' and\n    'clean'\n  Enable parallel tests\n\n t/Makefile      |   15 ++++++++++++---\n t/t9700/test.pl |    3 ---\n t/test-lib.sh   |   11 ++++++++++-\n 3 files changed, 22 insertions(+), 7 deletions(-)\n"},{"id":"86454","messageId":"alpine.DEB.1.00.0808080752540.9611@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"14883","inReplyTo":"alpine.DEB.1.00.0808080752210.9611@pacific.mpi-cbg.de.mpi-cbg.de","subject":"[PATCH 1/3] t9700: remove useless check","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-08-08T05:59:13Z","receivedAt":"2008-08-08T05:59:13Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nt9700 used to check if the basename of the current directory is\n'trash directory', the expensive way.\n\nHowever, there is absolutely no good reason why this test should not\nrun in, say 'life is good' or 'i love tests'.  So remove the check\naltogether.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9700/test.pl |    3 ---\n 1 files changed, 0 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t9700/test.pl b/t/t9700/test.pl\nindex 4d23125..851cea4 100755\n--- a/t/t9700/test.pl\n+++ b/t/t9700/test.pl\n@@ -14,10 +14,7 @@ use File::Temp;\n BEGIN { use_ok('Git') }\n \n # set up\n-our $repo_dir = \"trash directory\";\n our $abs_repo_dir = Cwd->cwd;\n-die \"this must be run by calling the t/t97* shell script(s)\\n\"\n-    if basename(Cwd->cwd) ne $repo_dir;\n ok(our $r = Git->repository(Directory => \".\"), \"open repository\");\n \n # config\n-- \n1.6.0.rc2.23.gd08e9\n"},{"id":"86455","messageId":"alpine.DEB.1.00.0808080753500.9611@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"14883","inReplyTo":"alpine.DEB.1.00.0808080752210.9611@pacific.mpi-cbg.de.mpi-cbg.de","subject":"[PATCH 2/3] tests: Clarify dependencies between tests, 'aggregate-results' and 'clean'","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-08-08T05:59:18Z","receivedAt":"2008-08-08T05:59:18Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nThe Makefile targets 'aggregate-results' and 'clean' pretended to be\nindependent.  This is not true, of course, since aggregate-results\nneeds the results _before_ they are removed.\n\nLikewise, the tests should have been run already when the results are\nto be aggregated.\n\nHowever, as it is legitimate to run only a few tests, and then aggregate\njust those results, so another target is introduced, that depends on all\ntests, then aggregates the results, and only then removes the results.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/Makefile |    7 ++++++-\n 1 files changed, 6 insertions(+), 1 deletions(-)\n\ndiff --git a/t/Makefile b/t/Makefile\nindex 0d65ced..aa952e1 100644\n--- a/t/Makefile\n+++ b/t/Makefile\n@@ -14,7 +14,8 @@ SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))\n T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)\n TSVN = $(wildcard t91[0-9][0-9]-*.sh)\n \n-all: pre-clean $(T) aggregate-results clean\n+all: pre-clean\n+\t$(MAKE) aggregate-results-and-cleanup\n \n $(T):\n \t@echo \"*** $@ ***\"; GIT_CONFIG=.git/config '$(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS)\n@@ -25,6 +26,10 @@ pre-clean:\n clean:\n \t$(RM) -r 'trash directory' test-results\n \n+aggregate-results-and-cleanup: $(T)\n+\t$(MAKE) aggregate-results\n+\t$(MAKE) clean\n+\n aggregate-results:\n \t'$(SHELL_PATH_SQ)' ./aggregate-results.sh test-results/t*-*\n \n-- \n1.6.0.rc2.23.gd08e9\n"},{"id":"86456","messageId":"alpine.DEB.1.00.0808080754230.9611@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"14883","inReplyTo":"alpine.DEB.1.00.0808080752210.9611@pacific.mpi-cbg.de.mpi-cbg.de","subject":"[PATCH 3/3] Enable parallel tests","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-08-08T05:59:23Z","receivedAt":"2008-08-08T05:59:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nOn multiprocessor machines, or with I/O heavy tests (that leave the\nCPU waiting a lot), it makes sense to parallelize the tests.\n\nHowever, care has to be taken that the different jobs use different\ntrash directories.\n\nThis commit does so, by inspecting the MAKEFLAGS variable to detect\nif the option \"-j\" or \"--jobs\" was passed to make.  In that case, the\ntest is run with the new \"--parallel\" option.\n\nIf parallel mode was detected, the trash directories are created with\na suffix that is unique with regard to the test, as it is the test's\nbase name.\n\nParallel mode also triggers removal of the trash directory in the test\nitself if everything went fine, so that the trash directories do not\npile up only to be removed at the very end.\n\nIf a test failed, the trash directory is not removed.  Chances are\nthat the exact error message is lost in the clutter, but you can still\nsee what test failed from the name of the trash directory, and repeat\nthe test (without -j).\n\nIf all was good, you will see the aggregated results.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/Makefile    |    8 ++++++--\n t/test-lib.sh |   11 ++++++++++-\n 2 files changed, 16 insertions(+), 3 deletions(-)\n\ndiff --git a/t/Makefile b/t/Makefile\nindex aa952e1..fb2fba9 100644\n--- a/t/Makefile\n+++ b/t/Makefile\n@@ -14,6 +14,11 @@ SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))\n T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)\n TSVN = $(wildcard t91[0-9][0-9]-*.sh)\n \n+# MAKEFLAGS only sees the -j flag when expanded in the task, so we cannot\n+# use ifeq() games here.  Instead we play shell games.\n+GIT_TEST_OPTS += $(shell echo \" $(MAKEFLAGS)\" | \\\n+\tsed -n \"s/^.* \\(--jobs\\|\\(-\\|[^-]*\\)j\\).*/--parallel/p\")\n+\n all: pre-clean\n \t$(MAKE) aggregate-results-and-cleanup\n \n@@ -24,7 +29,7 @@ pre-clean:\n \t$(RM) -r test-results\n \n clean:\n-\t$(RM) -r 'trash directory' test-results\n+\t$(RM) -rf 'trash directory' test-results\n \n aggregate-results-and-cleanup: $(T)\n \t$(MAKE) aggregate-results\n@@ -39,4 +44,3 @@ full-svn-test:\n \t$(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=0 LC_ALL=en_US.UTF-8\n \n .PHONY: pre-clean $(T) aggregate-results clean\n-.NOTPARALLEL:\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 11c0275..c5868c4 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -74,6 +74,7 @@ esac\n \t) &&\n \tcolor=t\n \n+test=\"trash directory\"\n while test \"$#\" -ne 0\n do\n \tcase \"$1\" in\n@@ -94,6 +95,10 @@ do\n \t--no-python)\n \t\t# noop now...\n \t\tshift ;;\n+\t--parallel)\n+\t\ttest=\"$test.$(basename \"$0\" .sh)\"\n+\t\tremove_trash=\"$(pwd)/$test\"\n+\t\tshift ;;\n \t*)\n \t\tbreak ;;\n \tesac\n@@ -449,6 +454,11 @@ test_done () {\n \t\t# we will leave things as they are.\n \n \t\tsay_color pass \"passed all $msg\"\n+\n+\t\ttest ! -z = \"$remove_trash\" &&\n+\t\tcd \"$(dirname \"$remove_trash\")\" &&\n+\t\trm -rf \"$(basename \"$remove_trash\")\"\n+\n \t\texit 0 ;;\n \n \t*)\n@@ -485,7 +495,6 @@ fi\n . ../GIT-BUILD-OPTIONS\n \n # Test repository\n-test=\"trash directory\"\n rm -fr \"$test\" || {\n \ttrap - exit\n \techo >&5 \"FATAL: Cannot prepare test area\"\n-- \n1.6.0.rc2.23.gd08e9\n"},{"id":"86459","messageId":"7vvdycf17a.fsf@gitster.siamese.dyndns.org","threadId":"14883","inReplyTo":"alpine.DEB.1.00.0808080754230.9611@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: [PATCH 3/3] Enable parallel tests","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-08T06:52:25Z","receivedAt":"2008-08-08T06:52:25Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On multiprocessor machines, or with I/O heavy tests (that leave the\n> CPU waiting a lot), it makes sense to parallelize the tests.\n\nI was actually thinking about doing this eventually.  Thanks for beating\nme to it.\n\n> Parallel mode also triggers removal of the trash directory in the test\n> itself if everything went fine, so that the trash directories do not\n> pile up only to be removed at the very end.\n\nI think making the tests remove their own mess makes sense regardless.\n\nI have to wonder why you would want to make this change conditional on\nMAKEFLAGS.  I was envisioning that parallel tests would run in \"trash\ndirectory/$(basename $0)\" or something.\n\nAre there downsides of doing this change unconditionally?\n\n>  clean:\n> -\t$(RM) -r 'trash directory' test-results\n> +\t$(RM) -rf 'trash directory' test-results\n\nThis is not needed, I think, as RM is defined with -f already.\n"},{"id":"86461","messageId":"489BF95F.1070000@lsrfire.ath.cx","threadId":"14883","inReplyTo":"alpine.DEB.1.00.0808080754230.9611@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: [PATCH 3/3] Enable parallel tests","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2008-08-08T07:44:31Z","receivedAt":"2008-08-08T07:44:31Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Johannes Schindelin schrieb:\n> On multiprocessor machines, or with I/O heavy tests (that leave the\n> CPU waiting a lot), it makes sense to parallelize the tests.\n> \n> However, care has to be taken that the different jobs use different\n> trash directories.\n\nGood idea!\n\n> This commit does so, by inspecting the MAKEFLAGS variable to detect\n> if the option \"-j\" or \"--jobs\" was passed to make.  In that case, the\n> test is run with the new \"--parallel\" option.\n\nHow about making the test harness be able to run multiple tests in\nparallel by default, i.e. always use a different trash directory name\nfor each test, without adding the new option?  The implementation would\nbe a bit simpler (no -j detection needed) and the documentation would be\nsimpler, too.  We could say \"look in 'trash directory/tNNNN'\" instead of\n\"look in this place unless you used -j\".\n\n> diff --git a/t/test-lib.sh b/t/test-lib.sh\n> index 11c0275..c5868c4 100644\n> --- a/t/test-lib.sh\n> +++ b/t/test-lib.sh\n> @@ -74,6 +74,7 @@ esac\n>  \t) &&\n>  \tcolor=t\n>  \n> +test=\"trash directory\"\n>  while test \"$#\" -ne 0\n>  do\n>  \tcase \"$1\" in\n> @@ -94,6 +95,10 @@ do\n>  \t--no-python)\n>  \t\t# noop now...\n>  \t\tshift ;;\n> +\t--parallel)\n> +\t\ttest=\"$test.$(basename \"$0\" .sh)\"\n> +\t\tremove_trash=\"$(pwd)/$test\"\n> +\t\tshift ;;\n\ntest=\"trash directory/$this_test\"?\n\nThe advantage would be that all trash was still inside \"trash\ndirectory\".  Not sure if the extra directory level would break\nsomething.  (Note: $this_test is defined a bit later in the script.)\n\ntest=\"trash for $this_test\"?\n\nThis one still has a space in it..\n\n>  \t*)\n>  \t\tbreak ;;\n>  \tesac\n> @@ -449,6 +454,11 @@ test_done () {\n>  \t\t# we will leave things as they are.\n>  \n>  \t\tsay_color pass \"passed all $msg\"\n> +\n> +\t\ttest ! -z = \"$remove_trash\" &&\n\nThis test succeeds always, because = is not an empty string.\n\nRené\n"},{"id":"86465","messageId":"7vprojgbbu.fsf@gitster.siamese.dyndns.org","threadId":"14883","inReplyTo":"489BF95F.1070000@lsrfire.ath.cx","subject":"Re: [PATCH 3/3] Enable parallel tests","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-08T08:28:21Z","receivedAt":"2008-08-08T08:28:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:\n\n> test=\"trash directory/$this_test\"?\n>\n> The advantage would be that all trash was still inside \"trash\n> directory\".  Not sure if the extra directory level would break\n> something.  (Note: $this_test is defined a bit later in the script.)\n\nThe extra directory level may break some tests that refer to their\nprecomputed test vectors in ../tXXXX, but I think they should be fixed\nregardless.  That's what $TEST_DIRECTORY is for.\n\nI'd very much prefer having 't/trash directory/t1234-test-name/' so that\nwe can say \"make clean\" to clean \"t/trash directory\" in one go.\n"},{"id":"86474","messageId":"7vod43etuw.fsf_-_@gitster.siamese.dyndns.org","threadId":"14883","inReplyTo":"7vprojgbbu.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] tests: use $TEST_DIRECTORY to refer to the t/ directory","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-08T09:31:03Z","receivedAt":"2008-08-08T09:31:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I'll push this out as 'test-deeper' branch to repo.or.cz (alt-git.git)\nbecause the test suite has unprintable bytes that are inappropriate for\ne-mail transmission.\n\n-- >8 --\nMany test scripts assumed that they will start in a 'trash' subdirectory\nthat is a single level down from the t/ directory, and referred to their\ntest vector files by asking for files like \"../t9999/expect\".  This will\nbreak if we move the 'trash' subdirectory elsewhere.\n\nTo solve this, we earlier introduced \"$TEST_DIRECTORY\" so that they can\nrefer to t/ directory reliably.  This finally makes all the tests use\nit to refer to the outside environment.\n\nWith this patch, and a one-liner not included here (because it would\ncontradict with what Dscho really wants to do):\n\n| diff --git a/t/test-lib.sh b/t/test-lib.sh\n| index 70ea7e0..60e69e4 100644\n| --- a/t/test-lib.sh\n| +++ b/t/test-lib.sh\n| @@ -485,7 +485,7 @@ fi\n|  . ../GIT-BUILD-OPTIONS\n|\n|  # Test repository\n| -test=\"trash directory\"\n| +test=\"trash directory/another level/yet another\"\n|  rm -fr \"$test\" || {\n|         trap - exit\n|         echo >&5 \"FATAL: Cannot prepare test area\"\n\nall the tests still pass, but we would want extra sets of eyeballs on this\ntype of change to really make sure.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t0022-crlf-rename.sh                   |    4 ++--\n t/t1000-read-tree-m-3way.sh              |    2 +-\n t/t3900-i18n-commit.sh                   |   18 +++++++++---------\n t/t3901-i18n-patch.sh                    |   28 ++++++++++++++--------------\n t/t4000-diff-format.sh                   |    2 +-\n t/t4001-diff-rename.sh                   |    2 +-\n t/t4002-diff-basic.sh                    |    2 +-\n t/t4003-diff-rename-1.sh                 |    6 +++---\n t/t4004-diff-rename-symlink.sh           |    2 +-\n t/t4005-diff-rename-2.sh                 |    6 +++---\n t/t4007-rename-3.sh                      |    4 ++--\n t/t4008-diff-break-rewrite.sh            |    6 +++---\n t/t4009-diff-rename-4.sh                 |    6 +++---\n t/t4010-diff-pathspec.sh                 |    2 +-\n t/t4011-diff-symlink.sh                  |    2 +-\n t/t4012-diff-binary.sh                   |    2 +-\n t/t4013-diff-various.sh                  |    2 +-\n t/t4015-diff-whitespace.sh               |    2 +-\n t/t4020-diff-external.sh                 |    2 +-\n t/t4022-diff-rewrite.sh                  |    4 ++--\n t/t4023-diff-rename-typechange.sh        |   14 +++++++-------\n t/t4027-diff-submodule.sh                |    2 +-\n t/t4100-apply-stat.sh                    |    4 ++--\n t/t4101-apply-nonl.sh                    |    2 +-\n t/t5100-mailinfo.sh                      |   18 +++++++++---------\n t/t5515-fetch-merge-logic.sh             |    4 ++--\n t/t5540-http-push.sh                     |    2 +-\n t/t6002-rev-list-bisect.sh               |    2 +-\n t/t6003-rev-list-topo-order.sh           |    2 +-\n t/t6023-merge-file.sh                    |    2 +-\n t/t6027-merge-binary.sh                  |    2 +-\n t/t6101-rev-parse-parents.sh             |    2 +-\n t/t6200-fmt-merge-msg.sh                 |    4 ++--\n t/t7001-mv.sh                            |    4 ++--\n t/t7004-tag.sh                           |    2 +-\n t/t7101-reset.sh                         |   10 +++++-----\n t/t7500-commit.sh                        |   16 ++++++++--------\n t/t8001-annotate.sh                      |    2 +-\n t/t8002-blame.sh                         |    2 +-\n t/t9110-git-svn-use-svm-props.sh         |    2 +-\n t/t9111-git-svn-use-svnsync-props.sh     |    2 +-\n t/t9115-git-svn-dcommit-funky-renames.sh |    2 +-\n t/t9121-git-svn-fetch-renamed-dir.sh     |    2 +-\n t/t9200-git-cvsexportcommit.sh           |   14 +++++++-------\n t/t9300-fast-import.sh                   |    2 +-\n t/t9301-fast-export.sh                   |    2 +-\n t/t9500-gitweb-standalone-no-errors.sh   |   16 ++++++++--------\n t/t9700-perl-git.sh                      |    2 +-\n t/t9700/test.pl                          |    3 ---\n t/test-lib.sh                            |    2 +-\n 50 files changed, 123 insertions(+), 126 deletions(-)\n"},{"id":"86480","messageId":"alpine.DEB.1.00.0808081225000.9611@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"14883","inReplyTo":"7vvdycf17a.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 3/3] Enable parallel tests","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-08-08T10:26:20Z","receivedAt":"2008-08-08T10:26:20Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 7 Aug 2008, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > Parallel mode also triggers removal of the trash directory in the test \n> > itself if everything went fine, so that the trash directories do not \n> > pile up only to be removed at the very end.\n> \n> I think making the tests remove their own mess makes sense regardless.\n\nWhen I add tests, I first run the appropriate t/t*.sh, then expect what is \nin trash directory, then extend the test.  So at least I need an option to \nkeep the directory.\n\n> >  clean:\n> > -\t$(RM) -r 'trash directory' test-results\n> > +\t$(RM) -rf 'trash directory' test-results\n> \n> This is not needed, I think, as RM is defined with -f already.\n\nOkay, thanks.\n\nCiao,\nDscho\n"},{"id":"86483","messageId":"7vtzdvdcdx.fsf@gitster.siamese.dyndns.org","threadId":"14883","inReplyTo":"alpine.DEB.1.00.0808081225000.9611@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: [PATCH 3/3] Enable parallel tests","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-08T10:33:46Z","receivedAt":"2008-08-08T10:33:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi,\n>\n> On Thu, 7 Aug 2008, Junio C Hamano wrote:\n>\n>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>> \n>> > Parallel mode also triggers removal of the trash directory in the test \n>> > itself if everything went fine, so that the trash directories do not \n>> > pile up only to be removed at the very end.\n>> \n>> I think making the tests remove their own mess makes sense regardless.\n>\n> When I add tests, I first run the appropriate t/t*.sh, then expect what is \n> in trash directory, then extend the test.  So at least I need an option to \n> keep the directory.\n\nThat's easy.  I do the same as you but do so by disabling \"test_done\" ;-)\n"},{"id":"86481","messageId":"alpine.DEB.1.00.0808081232210.9611@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"14883","inReplyTo":"7vod43etuw.fsf_-_@gitster.siamese.dyndns.org","subject":"Re: [PATCH] tests: use $TEST_DIRECTORY to refer to the t/ directory","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-08-08T10:35:12Z","receivedAt":"2008-08-08T10:35:12Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 8 Aug 2008, Junio C Hamano wrote:\n\n> |  # Test repository\n> | -test=\"trash directory\"\n> | +test=\"trash directory/another level/yet another\"\n\nOh my.  If you continue like that, we are soon going to hit PATH_MAX on \nsome systems (*cough* Windows *cough*), badly.\n\n>  t/t0022-crlf-rename.sh                   |    4 ++--\n>  t/t1000-read-tree-m-3way.sh              |    2 +-\n>  t/t3900-i18n-commit.sh                   |   18 +++++++++---------\n>  t/t3901-i18n-patch.sh                    |   28 ++++++++++++++--------------\n>  t/t4000-diff-format.sh                   |    2 +-\n>  t/t4001-diff-rename.sh                   |    2 +-\n>  t/t4002-diff-basic.sh                    |    2 +-\n>  t/t4003-diff-rename-1.sh                 |    6 +++---\n>  t/t4004-diff-rename-symlink.sh           |    2 +-\n>  t/t4005-diff-rename-2.sh                 |    6 +++---\n>  t/t4007-rename-3.sh                      |    4 ++--\n>  t/t4008-diff-break-rewrite.sh            |    6 +++---\n>  t/t4009-diff-rename-4.sh                 |    6 +++---\n>  t/t4010-diff-pathspec.sh                 |    2 +-\n>  t/t4011-diff-symlink.sh                  |    2 +-\n>  t/t4012-diff-binary.sh                   |    2 +-\n>  t/t4013-diff-various.sh                  |    2 +-\n>  t/t4015-diff-whitespace.sh               |    2 +-\n>  t/t4020-diff-external.sh                 |    2 +-\n>  t/t4022-diff-rewrite.sh                  |    4 ++--\n>  t/t4023-diff-rename-typechange.sh        |   14 +++++++-------\n>  t/t4027-diff-submodule.sh                |    2 +-\n>  t/t4100-apply-stat.sh                    |    4 ++--\n>  t/t4101-apply-nonl.sh                    |    2 +-\n>  t/t5100-mailinfo.sh                      |   18 +++++++++---------\n>  t/t5515-fetch-merge-logic.sh             |    4 ++--\n>  t/t5540-http-push.sh                     |    2 +-\n>  t/t6002-rev-list-bisect.sh               |    2 +-\n>  t/t6003-rev-list-topo-order.sh           |    2 +-\n>  t/t6023-merge-file.sh                    |    2 +-\n>  t/t6027-merge-binary.sh                  |    2 +-\n>  t/t6101-rev-parse-parents.sh             |    2 +-\n>  t/t6200-fmt-merge-msg.sh                 |    4 ++--\n>  t/t7001-mv.sh                            |    4 ++--\n>  t/t7004-tag.sh                           |    2 +-\n>  t/t7101-reset.sh                         |   10 +++++-----\n>  t/t7500-commit.sh                        |   16 ++++++++--------\n>  t/t8001-annotate.sh                      |    2 +-\n>  t/t8002-blame.sh                         |    2 +-\n>  t/t9110-git-svn-use-svm-props.sh         |    2 +-\n>  t/t9111-git-svn-use-svnsync-props.sh     |    2 +-\n>  t/t9115-git-svn-dcommit-funky-renames.sh |    2 +-\n>  t/t9121-git-svn-fetch-renamed-dir.sh     |    2 +-\n>  t/t9200-git-cvsexportcommit.sh           |   14 +++++++-------\n>  t/t9300-fast-import.sh                   |    2 +-\n>  t/t9301-fast-export.sh                   |    2 +-\n>  t/t9500-gitweb-standalone-no-errors.sh   |   16 ++++++++--------\n>  t/t9700-perl-git.sh                      |    2 +-\n>  t/t9700/test.pl                          |    3 ---\n>  t/test-lib.sh                            |    2 +-\n>  50 files changed, 123 insertions(+), 126 deletions(-)\n\nFrankly, I do not have the time.  It is not only about looking what you \nchanged, but also what you did not change.\n\nBesides, I do not see the point.  \"clean\" can just as well\n\n\t$(RM) -r 'trash directory.t'[0-9]*\n\nCiao,\nDscho\n"},{"id":"86482","messageId":"alpine.DEB.1.00.0808081236010.9611@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"14883","inReplyTo":"489BF95F.1070000@lsrfire.ath.cx","subject":"Re: [PATCH 3/3] Enable parallel tests","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-08-08T10:37:25Z","receivedAt":"2008-08-08T10:37:25Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 8 Aug 2008, René Scharfe wrote:\n\n> Johannes Schindelin schrieb:\n> \n> > This commit does so, by inspecting the MAKEFLAGS variable to detect if \n> > the option \"-j\" or \"--jobs\" was passed to make.  In that case, the \n> > test is run with the new \"--parallel\" option.\n> \n> How about making the test harness be able to run multiple tests in\n> parallel by default, i.e. always use a different trash directory name\n> for each test, without adding the new option?  The implementation would\n> be a bit simpler (no -j detection needed) and the documentation would be\n> simpler, too.\n\nI am totally opposed to dropping the -j detection.  This is what cost me 3 \nhours to research/implement.  *sighs*\n\n> >  \t*)\n> >  \t\tbreak ;;\n> >  \tesac\n> > @@ -449,6 +454,11 @@ test_done () {\n> >  \t\t# we will leave things as they are.\n> >  \n> >  \t\tsay_color pass \"passed all $msg\"\n> > +\n> > +\t\ttest ! -z = \"$remove_trash\" &&\n> \n> This test succeeds always, because = is not an empty string.\n\nThanks.\n\nCiao,\nDscho\n"},{"id":"86485","messageId":"7vmyjndc2c.fsf@gitster.siamese.dyndns.org","threadId":"14883","inReplyTo":"alpine.DEB.1.00.0808081232210.9611@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: [PATCH] tests: use $TEST_DIRECTORY to refer to the t/ directory","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-08T10:40:43Z","receivedAt":"2008-08-08T10:40:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Frankly, I do not have the time.  It is not only about looking what you \n> changed, but also what you did not change.\n\nThat's Ok.  You are not (and you shouldn't be) the only person who is\ncapable of reviewing and helping the development process ;-)\n\nHint, hint...\n"},{"id":"86487","messageId":"alpine.DEB.1.00.0808081302180.9611@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"14883","inReplyTo":"alpine.DEB.1.00.0808081236010.9611@pacific.mpi-cbg.de.mpi-cbg.de","subject":"[PATCH 3/3 v2] Enable parallel tests","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-08-08T11:08:37Z","receivedAt":"2008-08-08T11:08:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nOn multiprocessor machines, or with I/O heavy tests (that leave the\nCPU waiting a lot), it makes sense to parallelize the tests.\n\nHowever, care has to be taken that the different jobs use different\ntrash directories.\n\nThis commit does so, by creating the trash directories with a suffix\nthat is unique with regard to the test, as it is the test's base name.\n\nFurther, the trash directory is removed in the test itself if\neverything went fine, so that the trash directories do not\npile up only to be removed at the very end.\n\nIf a test failed, the trash directory is not removed.  Chances are\nthat the exact error message is lost in the clutter, but you can still\nsee what test failed from the name of the trash directory, and repeat\nthe test (without -j).\n\nIf all was good, you will see the aggregated results.\n\nSuggestions to simplify this commit came from Junio and René.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\t> On Fri, 8 Aug 2008, René Scharfe wrote:\n\t> \n\t> > The implementation would be a bit simpler (no -j detection \n\t> > needed) and the documentation would be simpler, too.\n\n\tOh well, here it goes.\n\n t/Makefile    |    1 -\n t/test-lib.sh |    8 +++++++-\n 2 files changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/t/Makefile b/t/Makefile\nindex aa952e1..ed49c20 100644\n--- a/t/Makefile\n+++ b/t/Makefile\n@@ -39,4 +39,3 @@ full-svn-test:\n \t$(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=0 LC_ALL=en_US.UTF-8\n \n .PHONY: pre-clean $(T) aggregate-results clean\n-.NOTPARALLEL:\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 11c0275..75c8a36 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -449,6 +449,11 @@ test_done () {\n \t\t# we will leave things as they are.\n \n \t\tsay_color pass \"passed all $msg\"\n+\n+\t\ttest ! -z \"$remove_trash\" &&\n+\t\tcd \"$(dirname \"$remove_trash\")\" &&\n+\t\trm -rf \"$(basename \"$remove_trash\")\"\n+\n \t\texit 0 ;;\n \n \t*)\n@@ -485,7 +490,8 @@ fi\n . ../GIT-BUILD-OPTIONS\n \n # Test repository\n-test=\"trash directory\"\n+test=\"trash directory.$(basename \"$0\" .sh)\"\n+remove_trash=\"$(pwd)/$test\"\n rm -fr \"$test\" || {\n \ttrap - exit\n \techo >&5 \"FATAL: Cannot prepare test area\"\n-- \n1.6.0.rc2.23.gd08e9\n"},{"id":"86506","messageId":"20080808144007.GA12098@leksak.fem-net","threadId":"14883","inReplyTo":"7vmyjndc2c.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] tests: use $TEST_DIRECTORY to refer to the t/ directory","fromName":"Stephan Beyer","fromEmail":"s-beyer@gmx.net","sentAt":"2008-08-08T14:40:07Z","receivedAt":"2008-08-08T14:40:07Z","isPatch":true,"sender":{"key":"s-beyer@gmx.net","avatar":"https://avatars.githubusercontent.com/u/143889?v=4"},"body":"Hi,\n\nJunio C Hamano wrote:\n> Hint, hint...\n\nI've taken only a short look, and:\n\n\t$ GIT_TEST_HTTPD=1 ./t5540-http-push.sh\n\t* skipping test, web server setup failed\n\t* passed all 0 test(s)\n\nafter the following change, it became:\n\n\t$ GIT_TEST_HTTPD=1 ./t5540-http-push.sh\n\t*   ok 1: setup remote repository\n\t*   ok 2: clone remote repository\n\t*   still broken 3: push to remote repository\n\t*   still broken 4: create and delete remote branch\n\t* still have 2 known breakage(s)\n\t* passed all remaining 2 test(s)\n\nRegards.\n\n--snip--\n\ndiff --git a/t/lib-httpd.sh b/t/lib-httpd.sh\nindex dc473df..6ac312b 100644\n--- a/t/lib-httpd.sh\n+++ b/t/lib-httpd.sh\n@@ -14,7 +14,7 @@ fi\n LIB_HTTPD_PATH=${LIB_HTTPD_PATH-'/usr/sbin/apache2'}\n LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'8111'}\n \n-TEST_PATH=\"$PWD\"/../lib-httpd\n+TEST_PATH=\"$TEST_DIRECTORY\"/lib-httpd\n HTTPD_ROOT_PATH=\"$PWD\"/httpd\n HTTPD_DOCUMENT_ROOT_PATH=$HTTPD_ROOT_PATH/www\n \n-- \nStephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F\n"},{"id":"86510","messageId":"20080808150359.GA25106@leksak.fem-net","threadId":"14883","inReplyTo":"alpine.DEB.1.00.0808081302180.9611@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: [PATCH 3/3 v2] Enable parallel tests","fromName":"Stephan Beyer","fromEmail":"s-beyer@gmx.net","sentAt":"2008-08-08T15:03:59Z","receivedAt":"2008-08-08T15:03:59Z","isPatch":true,"sender":{"key":"s-beyer@gmx.net","avatar":"https://avatars.githubusercontent.com/u/143889?v=4"},"body":"Hi,\n\nJohannes Schindelin wrote:\n> @@ -485,7 +490,8 @@ fi\n>  . ../GIT-BUILD-OPTIONS\n>  \n>  # Test repository\n> -test=\"trash directory\"\n> +test=\"trash directory.$(basename \"$0\" .sh)\"\n> +remove_trash=\"$(pwd)/$test\"\n>  rm -fr \"$test\" || {\n>  \ttrap - exit\n>  \techo >&5 \"FATAL: Cannot prepare test area\"\n\nPlease also change t/README, there is a text like:\n\n  [...]\n   database and chdir(2) into it.  This directory is 't/trash directory'\n   if you must know, but I do not think you care.\n\nIf the subdirectory variant is chosen (\"trash directory/foo/\" instead\nof \"trash directory.foo/\"), then\n\n   This directory is below 't/trash directory'.\"\n\ncould be sufficient.\n\nBtw, Junio, about the passage: \"I do not think you care\" -- I cared :)\nSometimes it's nice to change to 'trash directory' and do git log, git diff,\ngit show or whatever.\n\nRegards,\n  Stephan\n\n-- \nStephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F\n"},{"id":"86513","messageId":"alpine.DEB.1.00.0808081726170.24820@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"14883","inReplyTo":"20080808150359.GA25106@leksak.fem-net","subject":"Re: [PATCH 3/3 v2] Enable parallel tests","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-08-08T15:27:12Z","receivedAt":"2008-08-08T15:27:12Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 8 Aug 2008, Stephan Beyer wrote:\n\n> Please also change t/README\n\nNo time.  But I am sure should you provide a patch that Junio would be \nable to squash it in.  Provided he takes the series at all.\n\n> Btw, Junio, about the passage: \"I do not think you care\" -- I cared :) \n> Sometimes it's nice to change to 'trash directory' and do git log, git \n> diff, git show or whatever.\n\nJunio already adressed that.\n\nCiao,\nDscho\n"},{"id":"86516","messageId":"20080808153624.GA28716@neumann","threadId":"14883","inReplyTo":"alpine.DEB.1.00.0808080752210.9611@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: [PATCH 0/3] Enable parallelized tests","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2008-08-08T15:36:24Z","receivedAt":"2008-08-08T15:36:24Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"\nHi,\n\nOn Fri, Aug 08, 2008 at 07:59:08AM +0200, Johannes Schindelin wrote:\n> This patch pair enables parallel tests.\nGlad to see that others have also picked up this topic.  I have also\nwritten parallel testing patches back in March, but did not send them\nout, as there were issues I could not resolve in a satisfactory way -\nand your patches doesn't seem to address theim either.\n\nThere are a few tests involving http transfers, namely:\n  t5540-http-push.sh\n  t9115-git-svn-dcommit-funky-renames.sh \n  t9118-git-svn-funky-branch-names.sh\n  t9120-git-svn-clone-with-percent-escapes.sh\n\nThese start an apache web server at the beginning of the test and shut\nit down after the test finished.  Obviously, if you run tests in\nparallel then these tests can also run concurrently.  The problem is\nwith the svn tests, as all those tests use the same directory and port\nfor the web server, resulting in failed tests with -jN.\n\nt5540 is not an issue at the moment, as it uses lib-httpd.sh, hence a\ndifferent directory and a (possibly) different port than the svn\ntests.  However, who knows, in the future we might have other tests\nusing lib-httpd.sh.\n\nThe simplest solution would be to disable parallel testing altogether\nif http tests are enabled (GIT_TEST_HTTPD and SVN_HTTPD_PORT).  But\nIMHO it would be much better to have only one apache process for the\n_whole_ testsuite, and to have different paths for the test repos\nunder its documentroot.  But yes, it's more difficult to implement; at\nleast I could not do it.\n\n\nRegards,\nGábor\n"},{"id":"86517","messageId":"20080808160252.GA8541@leksak.fem-net","threadId":"14883","inReplyTo":"20080808153624.GA28716@neumann","subject":"Re: [PATCH 0/3] Enable parallelized tests","fromName":"Stephan Beyer","fromEmail":"s-beyer@gmx.net","sentAt":"2008-08-08T16:02:52Z","receivedAt":"2008-08-08T16:02:52Z","isPatch":true,"sender":{"key":"s-beyer@gmx.net","avatar":"https://avatars.githubusercontent.com/u/143889?v=4"},"body":"Hi,\n\n> There are a few tests involving http transfers, namely:\n>   t5540-http-push.sh\n>   t9115-git-svn-dcommit-funky-renames.sh \n>   t9118-git-svn-funky-branch-names.sh\n>   t9120-git-svn-clone-with-percent-escapes.sh\n> \n> These start an apache web server at the beginning of the test and shut\n> it down after the test finished.  Obviously, if you run tests in\n> parallel then these tests can also run concurrently.  The problem is\n> with the svn tests, as all those tests use the same directory and port\n> for the web server, resulting in failed tests with -jN.\n> \n> t5540 is not an issue at the moment, as it uses lib-httpd.sh, hence a\n> different directory and a (possibly) different port than the svn\n> tests.  However, who knows, in the future we might have other tests\n> using lib-httpd.sh.\n> \n> The simplest solution would be to disable parallel testing altogether\n> if http tests are enabled (GIT_TEST_HTTPD and SVN_HTTPD_PORT).\n\nHm, another simple(?) solution could be to make the tests that try to\naccess the same port/directory/whatever depend on each other.\nWell, this could bloat the Makefile, but seems to be clean (at least to\nme).\n\nRegards,\n  Stephan\n\n-- \nStephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F\n"},{"id":"86520","messageId":"alpine.DEB.1.00.0808081829160.24820@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"14883","inReplyTo":"20080808160252.GA8541@leksak.fem-net","subject":"Re: [PATCH 0/3] Enable parallelized tests","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-08-08T16:30:30Z","receivedAt":"2008-08-08T16:30:30Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 8 Aug 2008, Stephan Beyer wrote:\n\n> Hm, another simple(?) solution could be to make the tests that try to \n> access the same port/directory/whatever depend on each other.\n\nNo.  Because then you cannot run them independently anymore.\n\nCiao,\nDscho\n"},{"id":"86521","messageId":"20080808163341.GA20211@leksak.fem-net","threadId":"14883","inReplyTo":"alpine.DEB.1.00.0808081829160.24820@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: [PATCH 0/3] Enable parallelized tests","fromName":"Stephan Beyer","fromEmail":"s-beyer@gmx.net","sentAt":"2008-08-08T16:33:41Z","receivedAt":"2008-08-08T16:33:41Z","isPatch":true,"sender":{"key":"s-beyer@gmx.net","avatar":"https://avatars.githubusercontent.com/u/143889?v=4"},"body":"Johannes Schindelin wrote:\n> Hi,\n> \n> On Fri, 8 Aug 2008, Stephan Beyer wrote:\n> \n> > Hm, another simple(?) solution could be to make the tests that try to \n> > access the same port/directory/whatever depend on each other.\n> \n> No.  Because then you cannot run them independently anymore.\n\nSorry, I meant, \"depend on each other _in the Makefile_\".\n\nSo \"./t91xy-git-svn-foo.sh\" will work independently, won't it?\nWhat does not work independently is \"make t91xy-git-svn-foo.sh\"\nbut is it that bad?\n\nRegards,\n  Stephan\n\n-- \nStephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F\n"},{"id":"86525","messageId":"alpine.DEB.1.00.0808081849250.24820@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"14883","inReplyTo":"20080808163341.GA20211@leksak.fem-net","subject":"Re: [PATCH 0/3] Enable parallelized tests","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-08-08T16:51:07Z","receivedAt":"2008-08-08T16:51:07Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 8 Aug 2008, Stephan Beyer wrote:\n\n> Johannes Schindelin wrote:\n> > \n> > On Fri, 8 Aug 2008, Stephan Beyer wrote:\n> > \n> > > Hm, another simple(?) solution could be to make the tests that try \n> > > to access the same port/directory/whatever depend on each other.\n> > \n> > No.  Because then you cannot run them independently anymore.\n> \n> Sorry, I meant, \"depend on each other _in the Makefile_\".\n> \n> So \"./t91xy-git-svn-foo.sh\" will work independently, won't it? What does \n> not work independently is \"make t91xy-git-svn-foo.sh\" but is it that \n> bad?\n\nI went out of my way to keep that functionality intact.  But of course, we \ncould throw it away.  We could also throw Git away and go back to tarballs \nand patches.\n\nCiao,\nDscho\n\nP.S.: And I do not think it is clean to say that one test depends on the \nother.  Because they do not.  They depend on not being run concurrently.  \nBut that could be fixed.\n"},{"id":"86527","messageId":"20080808165611.GA2025@leksak.fem-net","threadId":"14883","inReplyTo":"alpine.DEB.1.00.0808081849250.24820@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: [PATCH 0/3] Enable parallelized tests","fromName":"Stephan Beyer","fromEmail":"s-beyer@gmx.net","sentAt":"2008-08-08T16:56:11Z","receivedAt":"2008-08-08T16:56:11Z","isPatch":true,"sender":{"key":"s-beyer@gmx.net","avatar":"https://avatars.githubusercontent.com/u/143889?v=4"},"body":"Hi,\n\nJohannes Schindelin wrote:\n> P.S.: And I do not think it is clean to say that one test depends on the \n> other.  Because they do not.  They depend on not being run concurrently.\n\nAh ok, you're right here.\n\nRegards,\n  Stephan\n\n-- \nStephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F\n"},{"id":"86623","messageId":"489E1FDB.5070700@free.fr","threadId":"14883","inReplyTo":"7vod43etuw.fsf_-_@gitster.siamese.dyndns.org","subject":"Re: [PATCH] tests: use $TEST_DIRECTORY to refer to the t/ directory","fromName":"Olivier Marin","fromEmail":"dkr+ml.git@free.fr","sentAt":"2008-08-09T22:53:15Z","receivedAt":"2008-08-09T22:53:15Z","isPatch":true,"sender":{"key":"dkr+ml.git@free.fr","avatar":null},"body":"Junio C Hamano a écrit :\n> \n> all the tests still pass, but we would want extra sets of eyeballs on this\n> type of change to really make sure.\n\nOK, I read the diff and found some trivial quoting issues that will break the\nfollowing tests if $TEST_DIRECTORY contain a space:\n\n>  t/t4101-apply-nonl.sh                    |    2 +-\n>  t/t5100-mailinfo.sh                      |   18 +++++++++---------\n>  t/t7500-commit.sh                        |   16 ++++++++--------\n\nOlivier.\n"},{"id":"86624","messageId":"7vljz54vy3.fsf@gitster.siamese.dyndns.org","threadId":"14883","inReplyTo":"489E1FDB.5070700@free.fr","subject":"Re: [PATCH] tests: use $TEST_DIRECTORY to refer to the t/ directory","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-09T23:20:36Z","receivedAt":"2008-08-09T23:20:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Olivier Marin <dkr+ml.git@free.fr> writes:\n\n> Junio C Hamano a écrit :\n>> \n>> all the tests still pass, but we would want extra sets of eyeballs on this\n>> type of change to really make sure.\n>\n> OK, I read the diff and found some trivial quoting issues that will break the\n> following tests if $TEST_DIRECTORY contain a space:\n>\n>>  t/t4101-apply-nonl.sh                    |    2 +-\n>>  t/t5100-mailinfo.sh                      |   18 +++++++++---------\n>>  t/t7500-commit.sh                        |   16 ++++++++--------\n\nAh, GIT_EDITOR is dereferenced twice.  Sheesh.\n\nWe could probably use test_set_editor() function from test-lib.sh, hmm?\n"},{"id":"86637","messageId":"7vvdy92ukh.fsf@gitster.siamese.dyndns.org","threadId":"14883","inReplyTo":"489E1FDB.5070700@free.fr","subject":"Re: [PATCH] tests: use $TEST_DIRECTORY to refer to the t/ directory","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-10T07:33:18Z","receivedAt":"2008-08-10T07:33:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"> OK, I read the diff and found some trivial quoting issues that will break the\n> following tests if $TEST_DIRECTORY contain a space:\n\nThanks.  I think this should catch all of them.  I've run the tests in a\nclone that has SP in it.\n\n t/t4101-apply-nonl.sh |    7 ++++---\n t/t5100-mailinfo.sh   |   17 +++++++++--------\n t/t7500-commit.sh     |   39 +++++++++++++++++++++++++++++----------\n 3 files changed, 42 insertions(+), 21 deletions(-)\n\ndiff --git a/t/t4101-apply-nonl.sh b/t/t4101-apply-nonl.sh\nindex 1391d20..e3443d0 100755\n--- a/t/t4101-apply-nonl.sh\n+++ b/t/t4101-apply-nonl.sh\n@@ -21,9 +21,10 @@ do\n   do\n     test $i -eq $j && continue\n     cat frotz.$i >frotz\n-    test_expect_success \\\n-        \"apply diff between $i and $j\" \\\n-\t\"git apply <\"$TEST_DIRECTORY\"/t4101/diff.$i-$j && diff frotz.$j frotz\"\n+    test_expect_success \"apply diff between $i and $j\" '\n+\tgit apply <\"$TEST_DIRECTORY\"/t4101/diff.$i-$j &&\n+\ttest_cmp frotz.$j frotz\n+    '\n   done\n done\n \ndiff --git a/t/t5100-mailinfo.sh b/t/t5100-mailinfo.sh\nindex a40d48b..c3ab881 100755\n--- a/t/t5100-mailinfo.sh\n+++ b/t/t5100-mailinfo.sh\n@@ -15,20 +15,21 @@ test_expect_success 'split sample box' \\\n \n for mail in `echo 00*`\n do\n-\ttest_expect_success \"mailinfo $mail\" \\\n-\t\t\"git mailinfo -u msg$mail patch$mail <$mail >info$mail &&\n+\ttest_expect_success \"mailinfo $mail\" '\n+\t\tgit mailinfo -u msg$mail patch$mail <$mail >info$mail &&\n \t\techo msg &&\n-\t\tdiff \"$TEST_DIRECTORY\"/t5100/msg$mail msg$mail &&\n+\t\ttest_cmp \"$TEST_DIRECTORY\"/t5100/msg$mail msg$mail &&\n \t\techo patch &&\n-\t\tdiff \"$TEST_DIRECTORY\"/t5100/patch$mail patch$mail &&\n+\t\ttest_cmp \"$TEST_DIRECTORY\"/t5100/patch$mail patch$mail &&\n \t\techo info &&\n-\t\tdiff \"$TEST_DIRECTORY\"/t5100/info$mail info$mail\"\n+\t\ttest_cmp \"$TEST_DIRECTORY\"/t5100/info$mail info$mail\n+\t'\n done\n \n test_expect_success 'respect NULs' '\n \n \tgit mailsplit -d3 -o. \"$TEST_DIRECTORY\"/t5100/nul-plain &&\n-\tcmp \"$TEST_DIRECTORY\"/t5100/nul-plain 001 &&\n+\ttest_cmp \"$TEST_DIRECTORY\"/t5100/nul-plain 001 &&\n \t(cat 001 | git mailinfo msg patch) &&\n \ttest 4 = $(wc -l < patch)\n \n@@ -37,9 +38,9 @@ test_expect_success 'respect NULs' '\n test_expect_success 'Preserve NULs out of MIME encoded message' '\n \n \tgit mailsplit -d5 -o. \"$TEST_DIRECTORY\"/t5100/nul-b64.in &&\n-\tcmp \"$TEST_DIRECTORY\"/t5100/nul-b64.in 00001 &&\n+\ttest_cmp \"$TEST_DIRECTORY\"/t5100/nul-b64.in 00001 &&\n \tgit mailinfo msg patch <00001 &&\n-\tcmp \"$TEST_DIRECTORY\"/t5100/nul-b64.expect patch\n+\ttest_cmp \"$TEST_DIRECTORY\"/t5100/nul-b64.expect patch\n \n '\n \ndiff --git a/t/t7500-commit.sh b/t/t7500-commit.sh\nindex 86c1647..7ae0bd0 100755\n--- a/t/t7500-commit.sh\n+++ b/t/t7500-commit.sh\n@@ -46,15 +46,24 @@ test_expect_success 'unedited template with comments should not commit' '\n '\n \n test_expect_success 'a Signed-off-by line by itself should not commit' '\n-\t! GIT_EDITOR=\"$TEST_DIRECTORY\"/t7500/add-signed-off git commit --template \"$TEMPLATE\"\n+\t(\n+\t\ttest_set_editor \"$TEST_DIRECTORY\"/t7500/add-signed-off &&\n+\t\ttest_must_fail git commit --template \"$TEMPLATE\"\n+\t)\n '\n \n test_expect_success 'adding comments to a template should not commit' '\n-\t! GIT_EDITOR=\"$TEST_DIRECTORY\"/t7500/add-comments git commit --template \"$TEMPLATE\"\n+\t(\n+\t\ttest_set_editor \"$TEST_DIRECTORY\"/t7500/add-comments &&\n+\t\ttest_must_fail git commit --template \"$TEMPLATE\"\n+\t)\n '\n \n test_expect_success 'adding real content to a template should commit' '\n-\tGIT_EDITOR=\"$TEST_DIRECTORY\"/t7500/add-content git commit --template \"$TEMPLATE\" &&\n+\t(\n+\t\ttest_set_editor \"$TEST_DIRECTORY\"/t7500/add-content &&\n+\t\tgit commit --template \"$TEMPLATE\"\n+\t) &&\n \tcommit_msg_is \"template linecommit message\"\n '\n \n@@ -62,7 +71,10 @@ test_expect_success '-t option should be short for --template' '\n \techo \"short template\" > \"$TEMPLATE\" &&\n \techo \"new content\" >> foo &&\n \tgit add foo &&\n-\tGIT_EDITOR=\"$TEST_DIRECTORY\"/t7500/add-content git commit -t \"$TEMPLATE\" &&\n+\t(\n+\t\ttest_set_editor \"$TEST_DIRECTORY\"/t7500/add-content &&\n+\t\tgit commit -t \"$TEMPLATE\"\n+\t) &&\n \tcommit_msg_is \"short templatecommit message\"\n '\n \n@@ -71,7 +83,10 @@ test_expect_success 'config-specified template should commit' '\n \tgit config commit.template \"$TEMPLATE\" &&\n \techo \"more content\" >> foo &&\n \tgit add foo &&\n-\tGIT_EDITOR=\"$TEST_DIRECTORY\"/t7500/add-content git commit &&\n+\t(\n+\t\ttest_set_editor \"$TEST_DIRECTORY\"/t7500/add-content &&\n+\t\tgit commit\n+\t) &&\n \tgit config --unset commit.template &&\n \tcommit_msg_is \"new templatecommit message\"\n '\n@@ -88,8 +103,10 @@ test_expect_success 'commit message from file should override template' '\n \techo \"content galore\" >> foo &&\n \tgit add foo &&\n \techo \"standard input msg\" |\n-\t\tGIT_EDITOR=\"$TEST_DIRECTORY\"/t7500/add-content git commit \\\n-\t\t\t--template \"$TEMPLATE\" --file - &&\n+\t(\n+\t\ttest_set_editor \"$TEST_DIRECTORY\"/t7500/add-content &&\n+\t\tgit commit --template \"$TEMPLATE\" --file -\n+\t) &&\n \tcommit_msg_is \"standard input msg\"\n '\n \n@@ -132,10 +149,12 @@ EOF\n \n test_expect_success '--signoff' '\n \techo \"yet another content *narf*\" >> foo &&\n-\techo \"zort\" |\n-\t\tGIT_EDITOR=\"$TEST_DIRECTORY\"/t7500/add-content git commit -s -F - foo &&\n+\techo \"zort\" | (\n+\t\ttest_set_editor \"$TEST_DIRECTORY\"/t7500/add-content &&\n+\t\tgit commit -s -F - foo\n+\t) &&\n \tgit cat-file commit HEAD | sed \"1,/^$/d\" > output &&\n-\tdiff expect output\n+\ttest_cmp expect output\n '\n \n test_expect_success 'commit message from file (1)' '\n-- \n1.6.0.rc2.22.g71b99\n"}]}