{"thread":{"id":"47360","subject":"[PATCH v2 2/2] t/lib-git-svn.sh: improve svnserve tests with parallel make test","startedAt":"2017-12-01T15:57:09Z","lastAt":"2017-12-01T20:06:21Z","messageCount":3,"participants":["Todd Zullinger","Jonathan Nieder"],"isPatch":true,"patchVersion":2,"patchTotal":2},"messages":[{"id":"333916","messageId":"20171201155653.29553-2-tmz@pobox.com","threadId":"47360","inReplyTo":"20171201155653.29553-1-tmz@pobox.com","subject":"[PATCH v2 2/2] t/lib-git-svn.sh: improve svnserve tests with parallel make test","fromName":"Todd Zullinger","fromEmail":"tmz@pobox.com","sentAt":"2017-12-01T15:56:53Z","receivedAt":"2017-12-01T15:57:09Z","isPatch":true,"sender":{"key":"tmz@pobox.com","avatar":"https://avatars.githubusercontent.com/u/806319?v=4"},"body":"Setting SVNSERVE_PORT enables several tests which require a local\nsvnserve daemon to be run (in t9113 & t9126).  The tests share setup of\nthe local svnserve via `start_svnserve()`.  The function uses svnserve's\n`--listen-once` option, which causes svnserve to accept one connection\non the port, serve it, and exit.  When running the tests in parallel\nthis fails if one test tries to start svnserve while the other is still\nrunning.\n\nUse the test number as the svnserve port (similar to httpd tests) to\navoid port conflicts.  Developers can set GIT_TEST_SVNSERVE to any value\nother than 'false' or 'auto' to enable these tests.\n\nAcked-by: Eric Wong <e@80x24.org>\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Todd Zullinger <tmz@pobox.com>\n---\n t/lib-git-svn.sh | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh\nindex 84366b2624..4c1f81f167 100644\n--- a/t/lib-git-svn.sh\n+++ b/t/lib-git-svn.sh\n@@ -110,14 +110,16 @@ EOF\n }\n \n require_svnserve () {\n-\tif test -z \"$SVNSERVE_PORT\"\n+\ttest_tristate GIT_TEST_SVNSERVE\n+\tif ! test \"$GIT_TEST_SVNSERVE\" = true\n \tthen\n-\t\tskip_all='skipping svnserve test. (set $SVNSERVE_PORT to enable)'\n+\t\tskip_all='skipping svnserve test. (set $GIT_TEST_SVNSERVE to enable)'\n \t\ttest_done\n \tfi\n }\n \n start_svnserve () {\n+\tSVNSERVE_PORT=${SVNSERVE_PORT-${this_test#t}}\n \tsvnserve --listen-port $SVNSERVE_PORT \\\n \t\t --root \"$rawsvnrepo\" \\\n \t\t --listen-once \\\n-- \n2.15.1\n\n"},{"id":"333917","messageId":"20171201155653.29553-1-tmz@pobox.com","threadId":"47360","inReplyTo":"20171201041133.GF3693@zaya.teonanacatl.net","subject":"[PATCH v2 1/2] t/lib-git-svn: cleanup inconsistent tab/space usage","fromName":"Todd Zullinger","fromEmail":"tmz@pobox.com","sentAt":"2017-12-01T15:56:52Z","receivedAt":"2017-12-01T15:57:11Z","isPatch":true,"sender":{"key":"tmz@pobox.com","avatar":"https://avatars.githubusercontent.com/u/806319?v=4"},"body":"Acked-by: Eric Wong <e@80x24.org>\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Todd Zullinger <tmz@pobox.com>\n---\n t/lib-git-svn.sh | 22 +++++++++++-----------\n 1 file changed, 11 insertions(+), 11 deletions(-)\n\ndiff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh\nindex 688313ed5c..84366b2624 100644\n--- a/t/lib-git-svn.sh\n+++ b/t/lib-git-svn.sh\n@@ -17,8 +17,8 @@ SVN_TREE=$GIT_SVN_DIR/svn-tree\n svn >/dev/null 2>&1\n if test $? -ne 1\n then\n-    skip_all='skipping git svn tests, svn not found'\n-    test_done\n+\tskip_all='skipping git svn tests, svn not found'\n+\ttest_done\n fi\n \n svnrepo=$PWD/svnrepo\n@@ -110,18 +110,18 @@ EOF\n }\n \n require_svnserve () {\n-    if test -z \"$SVNSERVE_PORT\"\n-    then\n-\tskip_all='skipping svnserve test. (set $SVNSERVE_PORT to enable)'\n-        test_done\n-    fi\n+\tif test -z \"$SVNSERVE_PORT\"\n+\tthen\n+\t\tskip_all='skipping svnserve test. (set $SVNSERVE_PORT to enable)'\n+\t\ttest_done\n+\tfi\n }\n \n start_svnserve () {\n-    svnserve --listen-port $SVNSERVE_PORT \\\n-             --root \"$rawsvnrepo\" \\\n-             --listen-once \\\n-             --listen-host 127.0.0.1 &\n+\tsvnserve --listen-port $SVNSERVE_PORT \\\n+\t\t --root \"$rawsvnrepo\" \\\n+\t\t --listen-once \\\n+\t\t --listen-host 127.0.0.1 &\n }\n \n prepare_a_utf8_locale () {\n-- \n2.15.1\n\n"},{"id":"333937","messageId":"20171201200613.GC18220@aiede.mtv.corp.google.com","threadId":"47360","inReplyTo":"20171201155653.29553-2-tmz@pobox.com","subject":"Re: [PATCH v2 2/2] t/lib-git-svn.sh: improve svnserve tests with parallel make test","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2017-12-01T20:06:13Z","receivedAt":"2017-12-01T20:06:21Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Todd Zullinger wrote:\n\n> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n> Signed-off-by: Todd Zullinger <tmz@pobox.com>\n> ---\n>  t/lib-git-svn.sh | 6 ++++--\n>  1 file changed, 4 insertions(+), 2 deletions(-)\n\nThis and the previous one are indeed still\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n\nThanks.\n"}]}