Merge branch 'jk/t5561-missing-curl'
authorJunio C Hamano <gitster@pobox.com>
Wed, 25 Apr 2018 04:28:53 +0000 (13:28 +0900)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 Apr 2018 04:28:53 +0000 (13:28 +0900)
Test fixes.

* jk/t5561-missing-curl:
t5561: skip tests if curl is not available
t5561: drop curl stderr redirects

1  2 
t/test-lib.sh
diff --combined t/test-lib.sh
index 483c8d6d7cd9734c04552043b5ff0cb7d1b0af3a,db918752977b80940a7f8fd259c7ae9bc3c072e8..ea2bbaaa7ab4dc77d0ef13cafbe45d1b12bd67e8
                GIT_TEST_CHAIN_LINT=0
                shift ;;
        -x)
 -              trace=t
 +              # Some test scripts can't be reliably traced  with '-x',
 +              # unless the test is run with a Bash version supporting
 +              # BASH_XTRACEFD (introduced in Bash v4.1).  Check whether
 +              # this test is marked as such, and ignore '-x' if it
 +              # isn't executed with a suitable Bash version.
 +              if test -z "$test_untraceable" || {
 +                   test -n "$BASH_VERSION" && {
 +                     test ${BASH_VERSINFO[0]} -gt 4 || {
 +                       test ${BASH_VERSINFO[0]} -eq 4 &&
 +                       test ${BASH_VERSINFO[1]} -ge 1
 +                     }
 +                   }
 +                 }
 +              then
 +                      trace=t
 +              else
 +                      echo >&2 "warning: ignoring -x; '$0' is untraceable without BASH_XTRACEFD"
 +              fi
                shift ;;
        --verbose-log)
                verbose_log=t
@@@ -957,16 -940,16 +957,16 @@@ the
        fi
  fi
  
 -GITPERLLIB="$GIT_BUILD_DIR"/perl/blib/lib:"$GIT_BUILD_DIR"/perl/blib/arch/auto/Git
 +GITPERLLIB="$GIT_BUILD_DIR"/perl/build/lib
  export GITPERLLIB
  test -d "$GIT_BUILD_DIR"/templates/blt || {
        error "You haven't built things yet, have you?"
  }
  
 -if ! test -x "$GIT_BUILD_DIR"/t/helper/test-chmtime
 +if ! test -x "$GIT_BUILD_DIR"/t/helper/test-tool
  then
 -      echo >&2 'You need to build test-chmtime:'
 -      echo >&2 'Run "make t/helper/test-chmtime" in the source (toplevel) directory'
 +      echo >&2 'You need to build test-tool:'
 +      echo >&2 'Run "make t/helper/test-tool" in the source (toplevel) directory'
        exit 1
  fi
  
@@@ -1124,10 -1107,6 +1124,10 @@@ test_lazy_prereq EXPENSIVE 
        test -n "$GIT_TEST_LONG"
  '
  
 +test_lazy_prereq EXPENSIVE_ON_WINDOWS '
 +      test_have_prereq EXPENSIVE || test_have_prereq !MINGW,!CYGWIN
 +'
 +
  test_lazy_prereq USR_BIN_TIME '
        test -x /usr/bin/time
  '
@@@ -1206,5 -1185,9 +1206,9 @@@ test_lazy_prereq LONG_IS_64BIT 
        test 8 -le "$(build_option sizeof-long)"
  '
  
 -test_lazy_prereq TIME_IS_64BIT 'test-date is64bit'
 -test_lazy_prereq TIME_T_IS_64BIT 'test-date time_t-is64bit'
 +test_lazy_prereq TIME_IS_64BIT 'test-tool date is64bit'
 +test_lazy_prereq TIME_T_IS_64BIT 'test-tool date time_t-is64bit'
+ test_lazy_prereq CURL '
+       curl --version
+ '