Re: [PATCH 2/2] ci: restore running httpd tests
- From
Jeff King <peff@peff.net>
- Date
- Sep 6, 2019, 19:13 UTC
- Message-ID
- <20190906191300.GA10769@sigill.intra.peff.net>
- In-Reply-To
- <20190906121326.23056-2-szeder.dev@gmail.com>
On Fri, Sep 06, 2019 at 02:13:26PM +0200, SZEDER Gábor wrote:
> Once upon a time GIT_TEST_HTTPD was a tristate variable and we > exported 'GIT_TEST_HTTPD=YesPlease' in our CI scripts to make sure > that we run the httpd tests in the Linux Clang and GCC build jobs, or > error out if they can't be run for any reason [1].
Yikes, good catch.
I wonder if it would be possible for the test suite to catch this. I think env--helper would have written a message to stderr, but because we use --exit-code, we can't tell the difference between that and "false".
I think we'd have go back to something more like:
test_tristate () {
bool=$(git env--helper --type=bool --default=true "$1") ||
eval "error \"$1 is not a bool: \$$1\""
test "$bool" = "true"
}
...
if test_tristate GIT_TEST_HTTPD
then
... use httpd ...
fiNot sure if it's worth it.
-Peff