tests: optionally skip git rebase -p
tests
The `--preserve-merges` mode of the `rebase` command is slated to be deprecated soon, as the more powerful `--rebase-merges` mode is available now, and the latter was designed with the express intent to address the shortcomings of `--preserve-merges`' design (e.g. the inability to reorder commits in an interactive rebase). As such, we will eventually even remove the `--preserve-merges` support, and along with it, its tests. In preparation for this, and also to allow the Windows phase of our automated tests to save some well-needed time when running the test suite, this commit introduces a new prerequisite REBASE_P, which can be forced to being unmet by setting the environment variable `GIT_TEST_SKIP_REBASE_P` to any non-empty string. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
5ee4ef8bda
commit
11aad46432
@ -86,14 +86,14 @@ test_expect_success 'pre-rebase got correct input (4)' '
|
||||
test "z$(cat .git/PRE-REBASE-INPUT)" = z--root,work4
|
||||
'
|
||||
|
||||
test_expect_success 'rebase -i -p with linear history' '
|
||||
test_expect_success REBASE_P 'rebase -i -p with linear history' '
|
||||
git checkout -b work5 other &&
|
||||
git rebase -i -p --root --onto master &&
|
||||
git log --pretty=tformat:"%s" > rebased5 &&
|
||||
test_cmp expect rebased5
|
||||
'
|
||||
|
||||
test_expect_success 'pre-rebase got correct input (5)' '
|
||||
test_expect_success REBASE_P 'pre-rebase got correct input (5)' '
|
||||
test "z$(cat .git/PRE-REBASE-INPUT)" = z--root,
|
||||
'
|
||||
|
||||
@ -120,7 +120,7 @@ commit work6~4
|
||||
1
|
||||
EOF
|
||||
|
||||
test_expect_success 'rebase -i -p with merge' '
|
||||
test_expect_success REBASE_P 'rebase -i -p with merge' '
|
||||
git checkout -b work6 other &&
|
||||
git rebase -i -p --root --onto master &&
|
||||
log_with_names work6 > rebased6 &&
|
||||
@ -155,7 +155,7 @@ commit work7~5
|
||||
1
|
||||
EOF
|
||||
|
||||
test_expect_success 'rebase -i -p with two roots' '
|
||||
test_expect_success REBASE_P 'rebase -i -p with two roots' '
|
||||
git checkout -b work7 other &&
|
||||
git rebase -i -p --root --onto master &&
|
||||
log_with_names work7 > rebased7 &&
|
||||
@ -261,7 +261,7 @@ commit conflict3~6
|
||||
1
|
||||
EOF
|
||||
|
||||
test_expect_success 'rebase -i -p --root with conflict (first part)' '
|
||||
test_expect_success REBASE_P 'rebase -i -p --root with conflict (first part)' '
|
||||
git checkout -b conflict3 other &&
|
||||
test_must_fail git rebase -i -p --root --onto master &&
|
||||
git ls-files -u | grep "B$"
|
||||
@ -272,7 +272,7 @@ test_expect_success 'fix the conflict' '
|
||||
git add B
|
||||
'
|
||||
|
||||
test_expect_success 'rebase -i -p --root with conflict (second part)' '
|
||||
test_expect_success REBASE_P 'rebase -i -p --root with conflict (second part)' '
|
||||
git rebase --continue &&
|
||||
log_with_names conflict3 >out &&
|
||||
test_cmp expect-conflict-p out
|
||||
|
Reference in New Issue
Block a user