Merge branch 'sb/http-flaky-test-fix' into maint
authorJunio C Hamano <gitster@pobox.com>
Fri, 16 Oct 2015 21:32:49 +0000 (14:32 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 16 Oct 2015 21:32:49 +0000 (14:32 -0700)
A test script for the HTTP service had a timing dependent bug,
which was fixed.

* sb/http-flaky-test-fix:
t5561: get rid of racy appending to logfile

1  2 
t/t5560-http-backend-noserver.sh
t/t5561-http-backend.sh
index aa73eeaef82adff56083fdc2d5d35d599b73edee,9d54ef478c24c9062d181a086e0a2a929600c3e3..9fafcf194589218e28b894a7bd9e83c9a1893fbf
@@@ -5,11 -5,7 +5,11 @@@ test_description='test git-http-backend
  
  HTTPD_DOCUMENT_ROOT_PATH="$TRASH_DIRECTORY"
  
 -test_have_prereq GREP_STRIPS_CR && export GREP_OPTIONS=-U
 +if test_have_prereq GREP_STRIPS_CR
 +then
 +      GREP_OPTIONS=-U
 +      export GREP_OPTIONS
 +fi
  
  run_backend() {
        echo "$2" |
@@@ -44,10 -40,6 +44,6 @@@ POST() 
        test_cmp exp act
  }
  
- log_div() {
-       return 0
- }
  . "$TEST_DIRECTORY"/t556x_common
  
  expect_aliased() {
diff --combined t/t5561-http-backend.sh
index 19afe966986cdc72cf8fc23f113bd77a8128f382,13f91d7d5a9d7c36499d169d91d9754859d34f97..90e0d6f0fe935970c0941bfef2af39bb15d2f959
@@@ -2,6 -2,12 +2,6 @@@
  
  test_description='test git-http-backend'
  . ./test-lib.sh
 -
 -if test -n "$NO_CURL"; then
 -      skip_all='skipping test, git built without http support'
 -      test_done
 -fi
 -
  . "$TEST_DIRECTORY"/lib-httpd.sh
  start_httpd
  
@@@ -29,15 -35,9 +29,9 @@@ POST() 
        test_cmp exp act
  }
  
- log_div() {
-       echo >>"$HTTPD_ROOT_PATH"/access.log
-       echo "###  $1" >>"$HTTPD_ROOT_PATH"/access.log
-       echo "###" >>"$HTTPD_ROOT_PATH"/access.log
- }
  . "$TEST_DIRECTORY"/t556x_common
  
cat >exp <<EOF
grep '^[^#]' >exp <<EOF
  
  ###  refs/heads/master
  ###