Subject: Re: [PATCH v10 00/15] Upstreaming the Scalar command

From: Junio C Hamano <[email-masked]>
Date: Wed, 08 Dec 2021 11:55:18 -0800

Ævar Arnfjörð Bjarmason <[email-masked]> writes:

> It was just broken because it added a test run to the "pedantic" run,
> and didn't properly integrate with the multi-"make test" runs on
> "master" , both of which are addressed by the patch below.
>
> diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh
> index 2ef9fbfdd38..af99699f82b 100755
> --- a/ci/run-build-and-tests.sh
> +++ b/ci/run-build-and-tests.sh
> @@ -15,6 +15,26 @@ then
>  	export DEVOPTS=pedantic
>  fi
>  
> +make() {
> +	scalar_tests=
> +	for target
> +	do
> +		if test $target = "test"
> +		then
> +			scalar_tests=t
> +		fi
> +	done
> +
> +	# Do whatever we would have done with "make"
> +	command make "$@"
> +
> +	# Running tests? Run scalar tests too
> +	if test -n "$scalar_tests"
> +	then
> +		command make -C contrib/scalar test
> +	fi
> +}
> +
>  make
>  case "$jobname" in
>  linux-gcc)
> @@ -52,6 +72,4 @@ esac
>  
>  check_unignored_build_artifacts
>  
> -make && make -C contrib/scalar test
> -
>  save_good_tree

That is an interesting way to demonstrate how orthogonal the issues
are, which in turn means that it is not such a big deal to add back
the coverage to the part that goes to contrib/scalar/.  As the actual
implementation, it is a bit too icky, though.