Subject: Re: [RFC PATCH v2 6/6] t/Makefile: run unit tests alongside shell tests

From: Junio C Hamano <[email-masked]>
Date: Wed, 07 Feb 2024 15:26:28 -0800

Jeff King <[email-masked]> writes:

> Not if they share the same command-line options. If you use something
> like "--state=slow,save", then the first run will write the list of all
> tests to ".prove", and then the second will run every test mentioned in
> .prove (in addition to the unit-tests provided on the command-line).
>
> You should be able to work around it by passing "--statefile". I _think_
> it might be OK to just do that unconditionally. Something like:
>
>   prove --exec $(TEST_SHELL_PATH $(GIT_PROVE_OPTS) $(T) :: $(GIT_TEST_OPTS)
>   prove --statefile=.prove-unit-tests $(GIT_PROVE_OPTS) $(UNIT_TESTS) :: $(GIT_TEST_OPTS)
>
> and then it's just a noop if GIT_PROVE_OPTS doesn't use --state. But I
> haven't played with it myself.

I do not think it warrants such complexity.  The wrapper script is
fine.