Re: [RFC PATCH 0/3] Introduce clar testing framework
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 31, 2024, 15:51 UTC
- Message-ID
- <xmqq7cd18srf.fsf@gitster.g>
- In-Reply-To
- <cover.1722415748.git.ps@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
> - The clar gives us the ability to pick which tests to run via command > line parameters, which I personally like more than picking the > specific binary to run.
One thing I am very unhappy about the current t/unit-tests/ is that the GIT_SKIP_TESTS mechanism is not effective at all. If we can wrap clar's test selection syntax inside t/Makefile to work with GIT_SKIP_TESTS (or its superset equivalent), that would be a great plus.
> - The clar replaces some test assertions that we already have. They > feel a bit more mature, but overall there aren't all that many > assertions available. If we wanted to pick it up, then we'd likely > have to add some more wrappers.
That is a slight bummer, as importing an externally developed one is with the hope that we won't have to enhance or maintain it, but we'll see how much burden it will be.
Show 11 quoted lines
> - The clar uses longjmp instead of manually having to `return` from > functions in case there was an assertion failure. This is easier to > work with in my opinion. > > Also, note that I only tested this on my Linux machine. I have no clue > whether this works as-is on Windows, but I do know that libgit2 tests > run on Linux, macOS and Windows. So it should work in theory, it's just > a matter of polishing this series. > > I'm happy to hear your thoughts on this, even if it ultimately ends up > being shot down.
Thanks for getting the ball going. Let's see how fast and far it rolls.