Merge branch 'jk/tzoffset-fix' into maint
authorJunio C Hamano <gitster@pobox.com>
Fri, 15 Jul 2016 16:43:42 +0000 (09:43 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 15 Jul 2016 16:43:42 +0000 (09:43 -0700)
Skip tests that are unrunnable on platforms without 64-bit long
to avoid unnecessary test failures.

* jk/tzoffset-fix:
t0006: skip "far in the future" test when unsigned long is not long enough

1  2 
t/test-lib.sh
diff --combined t/test-lib.sh
index 0055ebba46d539f30b9484335501571c3b4879bd,4595734f957b7f4e6b40f0024a92b46110a8b7c3..11201e9cf8320a0f90e4848d8bfe4ccd2ba92c88
                }
                run_list=$1; shift ;;
        --run=*)
 -              run_list=$(expr "z$1" : 'z[^=]*=\(.*\)'); shift ;;
 +              run_list=${1#--*=}; shift ;;
        -h|--h|--he|--hel|--help)
                help=t; shift ;;
        -v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
                verbose=t; shift ;;
        --verbose-only=*)
 -              verbose_only=$(expr "z$1" : 'z[^=]*=\(.*\)')
 +              verbose_only=${1#--*=}
                shift ;;
        -q|--q|--qu|--qui|--quie|--quiet)
                # Ignore --quiet under a TAP::Harness. Saying how many tests
                valgrind=memcheck
                shift ;;
        --valgrind=*)
 -              valgrind=$(expr "z$1" : 'z[^=]*=\(.*\)')
 +              valgrind=${1#--*=}
                shift ;;
        --valgrind-only=*)
 -              valgrind_only=$(expr "z$1" : 'z[^=]*=\(.*\)')
 +              valgrind_only=${1#--*=}
                shift ;;
        --tee)
                shift ;; # was handled already
        --root=*)
 -              root=$(expr "z$1" : 'z[^=]*=\(.*\)')
 +              root=${1#--*=}
                shift ;;
        --chain-lint)
                GIT_TEST_CHAIN_LINT=1
@@@ -322,19 -322,6 +322,19 @@@ els
        exec 4>/dev/null 3>/dev/null
  fi
  
 +# Send any "-x" output directly to stderr to avoid polluting tests
 +# which capture stderr. We can do this unconditionally since it
 +# has no effect if tracing isn't turned on.
 +#
 +# Note that this sets up the trace fd as soon as we assign the variable, so it
 +# must come after the creation of descriptor 4 above. Likewise, we must never
 +# unset this, as it has the side effect of closing descriptor 4, which we
 +# use to show verbose tests to the user.
 +#
 +# Note also that we don't need or want to export it. The tracing is local to
 +# this shell, and we would not want to influence any shells we exec.
 +BASH_XTRACEFD=4
 +
  test_failure=0
  test_count=0
  test_fixed=0
@@@ -867,10 -854,10 +867,10 @@@ test -d "$GIT_BUILD_DIR"/templates/blt 
        error "You haven't built things yet, have you?"
  }
  
 -if ! test -x "$GIT_BUILD_DIR"/test-chmtime
 +if ! test -x "$GIT_BUILD_DIR"/t/helper/test-chmtime
  then
        echo >&2 'You need to build test-chmtime:'
 -      echo >&2 'Run "make test-chmtime" in the source (toplevel) directory'
 +      echo >&2 'Run "make t/helper/test-chmtime" in the source (toplevel) directory'
        exit 1
  fi
  
@@@ -1013,7 -1000,7 +1013,7 @@@ test_i18ngrep () 
  test_lazy_prereq PIPE '
        # test whether the filesystem supports FIFOs
        case $(uname -s) in
 -      CYGWIN*)
 +      CYGWIN*|MINGW*)
                false
                ;;
        *)
@@@ -1111,3 -1098,12 +1111,12 @@@ run_with_limited_cmdline () 
  }
  
  test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true'
+ build_option () {
+       git version --build-options |
+       sed -ne "s/^$1: //p"
+ }
+ test_lazy_prereq LONG_IS_64BIT '
+       test 8 -le "$(build_option sizeof-long)"
+ '