Merge branch 'mg/name-rev-tests-with-short-stack'
authorJunio C Hamano <gitster@pobox.com>
Mon, 25 Sep 2017 06:24:05 +0000 (15:24 +0900)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Sep 2017 06:24:05 +0000 (15:24 +0900)
A handful of tests to demonstrates a recursive implementation of
"name-rev" hurts.

* mg/name-rev-tests-with-short-stack:
t6120: test describe and name-rev with deep repos
t6120: clean up state after breaking repo
t6120: test name-rev --all and --stdin
t7004: move limited stack prereq to test-lib

1  2 
t/test-lib.sh
diff --combined t/test-lib.sh
index a738540ef2582654faee4cf24769800d24eac3ac,f22c1b260aa10e521930eb6f786f294a8aca3a74..83f5d3dd21bbb7cae8b41bf2404f97bb43979d2c
@@@ -44,11 -44,6 +44,11 @@@ GIT_BUILD_DIR="$TEST_DIRECTORY"/.
  : ${ASAN_OPTIONS=detect_leaks=0:abort_on_error=1}
  export ASAN_OPTIONS
  
 +# If LSAN is in effect we _do_ want leak checking, but we still
 +# want to abort so that we notice the problems.
 +: ${LSAN_OPTIONS=abort_on_error=1}
 +export LSAN_OPTIONS
 +
  ################################################################
  # It appears that people try to run tests without building...
  "$GIT_BUILD_DIR/git" >/dev/null
@@@ -279,7 -274,7 +279,7 @@@ the
        test -z "$verbose" && verbose_only="$valgrind_only"
  elif test -n "$valgrind"
  then
 -      verbose=t
 +      test -z "$verbose_log" && verbose=t
  fi
  
  if test -n "$color"
@@@ -1172,6 -1167,12 +1172,12 @@@ run_with_limited_cmdline () 
  
  test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true'
  
+ run_with_limited_stack () {
+       (ulimit -s 128 && "$@")
+ }
+ test_lazy_prereq ULIMIT_STACK_SIZE 'run_with_limited_stack true'
  build_option () {
        git version --build-options |
        sed -ne "s/^$1: //p"