Re: [PATCH 2/3] submodule tests: reset "trace.out" between "grep" invocations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 29, 2022 at 04:59:46AM +0200, Ævar Arnfjörð Bjarmason wrote:
> diff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh
> index 75da8acf8f4..b9546ef8e5e 100755
> --- a/t/t5526-fetch-submodules.sh
> +++ b/t/t5526-fetch-submodules.sh
> @@ -178,6 +178,7 @@ test_expect_success "submodule.recurse option triggers recursive fetch" '
>  '
>
>  test_expect_success "fetch --recurse-submodules -j2 has the same output behaviour" '
> +	test_when_finished "rm -f trace.out" &&
>  	add_submodule_commits &&
>  	(
>  		cd downstream &&
> @@ -705,15 +706,22 @@ test_expect_success "'fetch.recurseSubmodules=on-demand' works also without .git
>
>  test_expect_success 'fetching submodules respects parallel settings' '
>  	git config fetch.recurseSubmodules true &&
> +	test_when_finished "rm -f downstream/trace.out" &&

These two seem OK to me, but...

>  	(
>  		cd downstream &&
>  		GIT_TRACE=$(pwd)/trace.out git fetch &&
>  		grep "1 tasks" trace.out &&
> +		>trace.out &&
> +

I fail to see why these hunks are necessary. If we specify GIT_TRACE,
and don't have a test_must_fail around the execution, then why should we
feel obligated to clean up the trace.out after every execution?

If we really are concerned about not cleaning up after ourselves, how
about writing to a separate file each time?

Thanks,
Taylor



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux