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

[PATCH] rebase: mark a test as failing with rebase.useBuiltin=false

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Nov 20, 2018, 11:42 UTC
Message-ID
<20181120114208.14251-1-avarab@gmail.com>
In-Reply-To
<nycvar.QRO.7.76.6.1811201157170.41@tvgsbejvaqbjf.bet>

Mark a test added in 04519d7201 ("rebase: validate -C<n> and --whitespace=<mode> parameters early", 2018-11-14) as only succeeding with the builtin version of rebase. It would be nice if the shellscript version had the same fix, but it's on its way out, and the author is not interested in fixing it[1].

This makes the entire test suite pass again with the GIT_TEST_REBASE_USE_BUILTIN=false mode added in my 62c23938fa ("tests: add a special setup where rebase.useBuiltin is off", 2018-11-14).

1. https://public-inbox.org/git/nycvar.QRO.7.76.6.1811201157170.41@tvgsbejvaqbjf.bet/
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
On Tue, Nov 20 2018, Johannes Schindelin wrote:
Show 6 quoted lines
> [...]
> Maybe you can concoct a prereq for this test? Something like
>
> test_lazy_prereq BUILTIN_REBASE '
>       test true = "${GIT_TEST_REBASE_USE_BUILTIN:-true}"
> '

It's better to just mark the test as needing the prereq turned off. E.g. this is what we do for the split index tests & now for the gettext tests. That way we always run the test, but just indicate that it relies on GIT_TEST_REBASE_USE_BUILTIN being unset.

 t/t3406-rebase-message.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh
index 38bd876cab..77e5bbb3d5 100755
--- a/t/t3406-rebase-message.sh
+++ b/t/t3406-rebase-message.sh
@@ -84,7 +84,8 @@ test_expect_success 'rebase --onto outputs the invalid ref' '
 	test_i18ngrep "invalid-ref" err
 '
 
-test_expect_success 'error out early upon -C<n> or --whitespace=<bad>' '
+test_expect_success 'builtin rebase: error out early upon -C<n> or --whitespace=<bad>' '
+	sane_unset GIT_TEST_REBASE_USE_BUILTIN &&
 	test_must_fail git rebase -Cnot-a-number HEAD 2>err &&
 	test_i18ngrep "numerical value" err &&
 	test_must_fail git rebase --whitespace=bad HEAD 2>err &&
-- 
2.20.0.rc0.387.gc7a69e6b6c
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 25 of 26 in “rebase: understand -C again, refactor”
  1. 0/1 rebase: understand -C again, refactorJohannes Schindelin via GitGitGadget, Nov 13, 2018
  2. 1/1 rebase: really just passthru the `git am` optionsJohannes Schindelin via GitGitGadget, Nov 13, 2018
  3. Junio C HamanoNov 13, 2018
  4. Phillip WoodNov 13, 2018
  5. Johannes SchindelinNov 13, 2018
  6. Phillip WoodNov 13, 2018
  7. rebase-in-C stability for 2.20Ævar Arnfjörð Bjarmason, Nov 13, 2018
  8. Stefan BellerNov 14, 2018
  9. 0/2 rebase.useBuiltin doc & test modeÆvar Arnfjörð Bjarmason, Nov 14, 2018
  10. Johannes SchindelinNov 14, 2018
  11. 1/2 rebase doc: document rebase.useBuiltinÆvar Arnfjörð Bjarmason, Nov 14, 2018
  12. 2/2 tests: add a special setup where rebase.useBuiltin is offÆvar Arnfjörð Bjarmason, Nov 14, 2018
  13. Elijah NewrenNov 14, 2018
  14. Junio C HamanoNov 14, 2018
  15. Johannes SchindelinNov 14, 2018
  16. Jeff KingNov 14, 2018
  17. Johannes SchindelinNov 14, 2018
  18. 0/2 rebase: understand -C again, refactorJohannes Schindelin via GitGitGadget, Nov 14, 2018
  19. 1/2 rebase: really just passthru the `git am` optionsJohannes Schindelin via GitGitGadget, Nov 14, 2018
  20. 2/2 rebase: validate -C<n> and --whitespace=<mode> parameters earlyJohannes Schindelin via GitGitGadget, Nov 14, 2018
  21. Phillip WoodNov 14, 2018
  22. Johannes SchindelinNov 14, 2018
  23. Ævar Arnfjörð BjarmasonNov 19, 2018
  24. Johannes SchindelinNov 20, 2018
  25. rebase: mark a test as failing with rebase.useBuiltin=falseÆvar Arnfjörð Bjarmason, Nov 20, 2018
  26. Johannes SchindelinNov 20, 2018

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.