Re: [RFC PATCH 1/4] t0080: turn t-basic unit test into a helper
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 16, 2024, 22:54 UTC
- Message-ID
- <xmqqa5p4yjmq.fsf@gitster.g>
- In-Reply-To
- <a9f67ed703c8314f0f0507ffb83b503717b846b3.1705443632.git.steadmon@google.com>
Josh Steadmon <steadmon@google.com> writes:
> As such, it makes more sense for t-basic to be a helper item for > t0080-unit-test-output.sh, ...
Up to this part was very understandable and agreeable, but I was surprised to see ...
> ... so let's move it to t/t0080/t-basic.c and > adjust Makefiles and .gitignores as necessary.
... this conclusion. I somehow thought that t-basic part would be a good test-tool subcommand, as it is run from the suite of shell scripts for end-to-end testing CLI interaction.
Do we have any precedent to place programs placed under t/tXXXX/ and get them compiled?
> This has the additional benefit that test harnesses seeking to run all > unit tests can find them with a simple glob of "t/unit-tests/bin/t-*", > with no exceptions needed.
And this motivation is very much understandable, and for that, as long as it is outside t/unit-tests/, it would be good. I just did not expect it to hang under t/t0080/, inviting more unit test pieces that are triggerable from the numberd shell scripts to hang under random t/t[0-9][0-9][0-9][0-9]/ directories.