summaryrefslogtreecommitdiff
path: root/t/t7104-reset-hard.sh
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2020-03-26 15:35:27 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-03-26 13:36:54 -0700
commitb417ec5f22e05e4320b338cd48b280008314a691 (patch)
treea94a7508ae30e3d6370ad6dd6d683f5dd4b926cf /t/t7104-reset-hard.sh
parenttests: do not let lazy prereqs inside `test_expect_*` turn off tracing (diff)
downloadtgif-b417ec5f22e05e4320b338cd48b280008314a691.tar.xz
tests: turn GPG, GPGSM and RFC1991 into lazy prereqs
The code to set those prereqs is executed completely outside of any `test_eval_` block. As a consequence, its output had to be suppressed so that it does not clutter the output of a regular test script run. Unfortunately, the output *stays* suppressed even when the `--verbose` option is in effect. This hid important output when debugging why the GPG prereq was not enabled in the Windows part of our CI builds. In preparation for fixing that, let's move all of this code into lazy prereqs. The only slightly tricky part is the global environment variable `GNUPGHOME`. Originally, it was configured only when we verified that there is a `gpg` in the `PATH` that we can use. This is now no longer possible, as lazy prereqs are evaluated in a subshell that changes the working directory to a temporary one. Therefore, we simply _always_ set that environment variable: it does not hurt anything because it does not indicate the presence of a working GPG. Side note: it was quite tempting to use a hack that is possible because we do not validate what is passed to `test_lazy_prereq` (and it is therefore possible to "break out" of the lazy_prereq subshell: test_lazy_prereq GPG '...) && GNUPGHOME=... && (...' However, this is rather tricksy hobbitses code, and the current patch is _much_ easier to understand. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7104-reset-hard.sh')
0 files changed, 0 insertions, 0 deletions