Subject: Re: [PATCH 1/5] cmake: align CTest definition with Git's CI runs

From: Junio C Hamano <[email-masked]>
Date: Wed, 10 Aug 2022 10:48:16 -0700

"Johannes Schindelin via GitGitGadget" <[email-masked]>
writes:

> While at it, enable the command trace via `-x` and verbose output via
> `-v`, otherwise it would be near impossible to diagnose any problems.

This sounds like a completely unrelated change.  Do the tests behave
so differently here, compared to how they are run in t/Makefile,
where -vx is not the default?

The only plausible reason I can think of that this change "while at
it" is justifiable as part of the other change is if this is only
ever used in the CI environment and no interactive human would be
sitting in front of the session that runs tests here.  If that is
the case, I do agree it would make sense, since it would be much
less convenient to go back to a failing test and rerun it with -v
or -x or whatever.  But that needs to be explained in the proposed
log message.

Thanks.

> Signed-off-by: Johannes Schindelin <[email-masked]>
> ---
>  contrib/buildsystems/CMakeLists.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt
> index 1b23f2440d8..4aee1e24342 100644
> --- a/contrib/buildsystems/CMakeLists.txt
> +++ b/contrib/buildsystems/CMakeLists.txt
> @@ -1088,7 +1088,7 @@ file(GLOB test_scipts "${CMAKE_SOURCE_DIR}/t/t[0-9]*.sh")
>  #test
>  foreach(tsh ${test_scipts})
>  	add_test(NAME ${tsh}
> -		COMMAND ${SH_EXE} ${tsh}
> +		COMMAND ${SH_EXE} ${tsh} --no-bin-wrappers --no-chain-lint -vx
>  		WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/t)
>  endforeach()