aboutsummaryrefslogtreecommitdiffstats
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-04-22 13:42:42 -0700
committerJunio C Hamano <gitster@pobox.com>2020-04-22 13:42:43 -0700
commitd82c528fc197691e21f51a8783685471b2640dad (patch)
tree915acaee3b479063399baa804f30b732a62fe690 /t/test-lib.sh
parent21e3bb1299468341a78149bf970842283ff8d9e2 (diff)
parent2b60649113b50d8dd288f4416d234ca27d31565f (diff)
downloadgit-d82c528fc197691e21f51a8783685471b2640dad.tar.gz
Merge branch 'js/tests-gpg-integration-on-windows'
Enable tests that require GnuPG on Windows. * js/tests-gpg-integration-on-windows: tests: increase the verbosity of the GPG-related prereqs tests: turn GPG, GPGSM and RFC1991 into lazy prereqs tests: do not let lazy prereqs inside `test_expect_*` turn off tracing t/lib-gpg.sh: stop pretending to be a stand-alone script tests(gpg): allow the gpg-agent to start on Windows
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 9fe390bd5a..b831e1d252 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -867,6 +867,7 @@ maybe_setup_valgrind () {
fi
}
+trace_level_=0
want_trace () {
test "$trace" = t && {
test "$verbose" = t || test "$verbose_log" = t
@@ -880,7 +881,7 @@ want_trace () {
test_eval_inner_ () {
# Do not add anything extra (including LF) after '$*'
eval "
- want_trace && set -x
+ want_trace && trace_level_=$(($trace_level_+1)) && set -x
$*"
}
@@ -911,7 +912,8 @@ test_eval_ () {
test_eval_ret_=$?
if want_trace
then
- set +x
+ test 1 = $trace_level_ && set +x
+ trace_level_=$(($trace_level_-1))
fi
} 2>/dev/null 4>&2