tests: catch non-bool GIT_TEST_* values
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | t/lib-git-svn.sh: check GIT_TEST_SVN_HTTPD when running SVN HTTP testst/ | +1 | 0 replies | |
| 1/2 | tests: add 'test_bool_env' to catch non-bool GIT_TEST_* valuest/ t/ t/ +5 more | +82 | 1 reply | |
| 2/2 | ci: restore running httpd testsci/ | +1 | 3 replies | |
| 2/2 | t5608-clone-2gb.sh: turn GIT_TEST_CLONE_2GB into a boolci/ t/ | +2 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] tests: catch non-bool GIT_TEST_* values
Quoted 2 lines · SZEDER Gábor
Quoted 1 line · Jeff King
I wonder if it would be possible for the test suite to catch this.
[i.e. to catch a non-boolean value of a supposedly boolean GIT_TEST_* environment variable]
Quoted 1 line
Quoted 1 line
Not sure if it's worth it.
[...]
Quoted 3 lines
Anyway, this is just a long-winded way to say that I think we should validate those bools properly and error loudly on an invalid value even if it doesn't seem to worth it.
I was playing with a new GIT_TEST boolean environment variable, mistyped it's value, and then it took me surprisingly long to figure out why the damn tests were not doing what I thought they should.
So now I'm fairly convinced that it's definitely worth doing. And the callsites look much nicer, too.
These patches should apply cleanly both on current 'master' or on 'sg/git-test-boolean' (i.e. the email thread I'm replying to). We haven't introduced any new 'git env--helper' invocations in the test suite/framework since then.
SZEDER Gábor (2):
tests: add 'test_bool_env' to catch non-bool GIT_TEST_* values t5608-clone-2gb.sh: turn GIT_TEST_CLONE_2GB into a bool
ci/lib.sh | 2 +- t/README | 9 +++++++++ t/lib-git-daemon.sh | 2 +- t/lib-git-svn.sh | 4 ++-- t/lib-httpd.sh | 2 +- t/t0000-basic.sh | 34 ++++++++++++++++++++++++++++++++++ t/t5512-ls-remote.sh | 2 +- t/t5608-clone-2gb.sh | 2 +- t/test-lib-functions.sh | 30 +++++++++++++++++++++++++++++- t/test-lib.sh | 10 +++++----- 10 files changed, 84 insertions(+), 13 deletions(-)
Signature · 1 line
2.24.0.532.ge18579ded8