git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] add -i tests: mark "TODO" depending on GIT_TEST_ADD_I_USE_BUILTIN

From
Todd Zullinger <tmz@pobox.com>
Date
Jun 15, 2022, 02:47 UTC
Message-ID
<YqlIRveupj6tOO4P@pobox.com>
In-Reply-To
<patch-v2-1.1-13c26e546f6-20220614T153746Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason wrote:
> Fix an issue that existed before 0527ccb1b55 (add -i: default to the
> built-in implementation, 2021-11-30), but which became the default
> with that change, we should not be marking tests that are known to
> pass as "TODO" tests.
[...]
Show 5 quoted lines
> ---
> Just converting it to "test_expect_success" will break CI and other
> setups that are testing with GIT_TEST_ADD_I_USE_BUILTIN=false.
> 
> The below fixes it, however.

Nice catch. FWIW, I tested w/GIT_TEST_ADD_I_USE_BUILTIN=0 and without.

Show 12 quoted lines
> diff --git a/t/t2016-checkout-patch.sh b/t/t2016-checkout-patch.sh
> index bc3f69b4b1d..a5822e41af2 100755
> --- a/t/t2016-checkout-patch.sh
> +++ b/t/t2016-checkout-patch.sh
> @@ -4,7 +4,7 @@ test_description='git checkout --patch'
>  
>  . ./lib-patch-mode.sh
>  
> -if ! test_bool_env GIT_TEST_ADD_I_USE_BUILTIN true && ! test_have_prereq PERL
> +if ! test_have_prereq ADD_I_USE_BUILTIN && ! test_have_prereq PERL
>  then
>  	skip_all='skipping interactive add tests, PERL not set'

It's not the fault of this patch, but it makes it obvious that the `skip_all` message is no longer accurate. Perhaps somethine like this?

    skip_all='skipping interactive add tests, missing ADD_I_USE_BUILTIN or PERL'

Maybe a separate `ADD_I` prereq would be better? Though without looking closer, I don't know if that would end up being clearer to anyone running the tests without either PERL or the add -i builtin enabled.

Thanks for the keen eye and attention to detail, Ævar,
-- 
Todd
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 3 of 16 in “t3701: two subtests are fixed”
  1. t3701: two subtests are fixedMichael J Gruber, Jun 14, 2022
  2. add -i tests: mark "TODO" depending on GIT_TEST_ADD_I_USE_BUILTINÆvar Arnfjörð Bjarmason, Jun 14, 2022
  3. Todd ZullingerJun 15, 2022
  4. Ævar Arnfjörð BjarmasonJun 16, 2022
  5. Todd ZullingerJun 16, 2022
  6. Derrick StoleeJun 14, 2022
  7. Todd ZullingerJun 15, 2022
  8. Taylor BlauJun 15, 2022
  9. Johannes SchindelinJun 15, 2022
  10. Michael J GruberJun 16, 2022
  11. Junio C HamanoJun 16, 2022
  12. Johannes SchindelinJun 18, 2022
  13. Junio C HamanoJun 21, 2022
  14. Michael J GruberJun 22, 2022
  15. Johannes SchindelinJun 23, 2022
  16. Junio C HamanoJun 23, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.