All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Hansen <hansenr@google.com>
To: git@vger.kernel.org
Cc: davvid@gmail.com, j6t@kdbg.org, hansenr@google.com,
	sbeller@google.com, simon@ruderich.org, gitster@pobox.com
Subject: [PATCH v5 03/14] t7610: update branch names to match test number
Date: Tue, 10 Jan 2017 15:41:51 -0500	[thread overview]
Message-ID: <20170110204202.21779-4-hansenr@google.com> (raw)
In-Reply-To: <20170110204202.21779-1-hansenr@google.com>

Rename the testNN branches so that NN matches the test number.  This
should make it easier to troubleshoot test issues.  Use $test_count to
keep this future-proof.

Signed-off-by: Richard Hansen <hansenr@google.com>
---
 t/t7610-mergetool.sh | 82 ++++++++++++++++++++++++++--------------------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh
index 6d9f21511..14090739f 100755
--- a/t/t7610-mergetool.sh
+++ b/t/t7610-mergetool.sh
@@ -94,7 +94,7 @@ test_expect_success 'setup' '
 '
 
 test_expect_success 'custom mergetool' '
-	git checkout -b test1 branch1 &&
+	git checkout -b test$test_count branch1 &&
 	git submodule update -N &&
 	test_must_fail git merge master >/dev/null 2>&1 &&
 	( yes "" | git mergetool both >/dev/null 2>&1 ) &&
@@ -113,7 +113,7 @@ test_expect_success 'custom mergetool' '
 
 test_expect_success 'mergetool crlf' '
 	test_config core.autocrlf true &&
-	git checkout -b test2 branch1 &&
+	git checkout -b test$test_count branch1 &&
 	test_must_fail git merge master >/dev/null 2>&1 &&
 	( yes "" | git mergetool file1 >/dev/null 2>&1 ) &&
 	( yes "" | git mergetool file2 >/dev/null 2>&1 ) &&
@@ -134,7 +134,7 @@ test_expect_success 'mergetool crlf' '
 '
 
 test_expect_success 'mergetool in subdir' '
-	git checkout -b test3 branch1 &&
+	git checkout -b test$test_count branch1 &&
 	git submodule update -N &&
 	(
 		cd subdir &&
@@ -161,7 +161,7 @@ test_expect_success 'mergetool on file in parent dir' '
 '
 
 test_expect_success 'mergetool skips autoresolved' '
-	git checkout -b test4 branch1 &&
+	git checkout -b test$test_count branch1 &&
 	git submodule update -N &&
 	test_must_fail git merge master &&
 	test -n "$(git ls-files -u)" &&
@@ -192,7 +192,7 @@ test_expect_success 'mergetool merges all from subdir' '
 test_expect_success 'mergetool skips resolved paths when rerere is active' '
 	test_config rerere.enabled true &&
 	rm -rf .git/rr-cache &&
-	git checkout -b test5 branch1 &&
+	git checkout -b test$test_count branch1 &&
 	git submodule update -N &&
 	test_must_fail git merge master >/dev/null 2>&1 &&
 	( yes "l" | git mergetool --no-prompt submod >/dev/null 2>&1 ) &&
@@ -233,7 +233,7 @@ test_expect_success 'conflicted stash sets up rerere'  '
 test_expect_success 'mergetool takes partial path' '
 	git reset --hard &&
 	test_config rerere.enabled false &&
-	git checkout -b test12 branch1 &&
+	git checkout -b test$test_count branch1 &&
 	git submodule update -N &&
 	test_must_fail git merge master &&
 
@@ -308,12 +308,12 @@ test_expect_success 'mergetool keeps tempfiles when aborting delete/delete' '
 '
 
 test_expect_success 'deleted vs modified submodule' '
-	git checkout -b test6 branch1 &&
+	git checkout -b test$test_count branch1 &&
 	git submodule update -N &&
 	mv submod submod-movedaside &&
 	git rm --cached submod &&
 	git commit -m "Submodule deleted from branch" &&
-	git checkout -b test6.a test6 &&
+	git checkout -b test$test_count.a test$test_count &&
 	test_must_fail git merge master &&
 	test -n "$(git ls-files -u)" &&
 	( yes "" | git mergetool file1 file2 spaced\ name subdir/file3 >/dev/null 2>&1 ) &&
@@ -329,7 +329,7 @@ test_expect_success 'deleted vs modified submodule' '
 	git commit -m "Merge resolved by keeping module" &&
 
 	mv submod submod-movedaside &&
-	git checkout -b test6.b test6 &&
+	git checkout -b test$test_count.b test$test_count &&
 	git submodule update -N &&
 	test_must_fail git merge master &&
 	test -n "$(git ls-files -u)" &&
@@ -343,9 +343,9 @@ test_expect_success 'deleted vs modified submodule' '
 	git commit -m "Merge resolved by deleting module" &&
 
 	mv submod-movedaside submod &&
-	git checkout -b test6.c master &&
+	git checkout -b test$test_count.c master &&
 	git submodule update -N &&
-	test_must_fail git merge test6 &&
+	test_must_fail git merge test$test_count &&
 	test -n "$(git ls-files -u)" &&
 	( yes "" | git mergetool file1 file2 spaced\ name subdir/file3 >/dev/null 2>&1 ) &&
 	( yes "" | git mergetool both >/dev/null 2>&1 ) &&
@@ -359,9 +359,9 @@ test_expect_success 'deleted vs modified submodule' '
 	git commit -m "Merge resolved by deleting module" &&
 	mv submod.orig submod &&
 
-	git checkout -b test6.d master &&
+	git checkout -b test$test_count.d master &&
 	git submodule update -N &&
-	test_must_fail git merge test6 &&
+	test_must_fail git merge test$test_count &&
 	test -n "$(git ls-files -u)" &&
 	( yes "" | git mergetool file1 file2 spaced\ name subdir/file3 >/dev/null 2>&1 ) &&
 	( yes "" | git mergetool both >/dev/null 2>&1 ) &&
@@ -377,14 +377,14 @@ test_expect_success 'deleted vs modified submodule' '
 '
 
 test_expect_success 'file vs modified submodule' '
-	git checkout -b test7 branch1 &&
+	git checkout -b test$test_count branch1 &&
 	git submodule update -N &&
 	mv submod submod-movedaside &&
 	git rm --cached submod &&
 	echo not a submodule >submod &&
 	git add submod &&
 	git commit -m "Submodule path becomes file" &&
-	git checkout -b test7.a branch1 &&
+	git checkout -b test$test_count.a branch1 &&
 	test_must_fail git merge master &&
 	test -n "$(git ls-files -u)" &&
 	( yes "" | git mergetool file1 file2 spaced\ name subdir/file3 >/dev/null 2>&1 ) &&
@@ -400,7 +400,7 @@ test_expect_success 'file vs modified submodule' '
 	git commit -m "Merge resolved by keeping module" &&
 
 	mv submod submod-movedaside &&
-	git checkout -b test7.b test7 &&
+	git checkout -b test$test_count.b test$test_count &&
 	test_must_fail git merge master &&
 	test -n "$(git ls-files -u)" &&
 	( yes "" | git mergetool file1 file2 spaced\ name subdir/file3 >/dev/null 2>&1 ) &&
@@ -413,11 +413,11 @@ test_expect_success 'file vs modified submodule' '
 	test "$output" = "No files need merging" &&
 	git commit -m "Merge resolved by keeping file" &&
 
-	git checkout -b test7.c master &&
+	git checkout -b test$test_count.c master &&
 	rmdir submod && mv submod-movedaside submod &&
 	test ! -e submod.orig &&
 	git submodule update -N &&
-	test_must_fail git merge test7 &&
+	test_must_fail git merge test$test_count &&
 	test -n "$(git ls-files -u)" &&
 	( yes "" | git mergetool file1 file2 spaced\ name subdir/file3 >/dev/null 2>&1 ) &&
 	( yes "" | git mergetool both >/dev/null 2>&1 ) &&
@@ -430,10 +430,10 @@ test_expect_success 'file vs modified submodule' '
 	test "$output" = "No files need merging" &&
 	git commit -m "Merge resolved by keeping file" &&
 
-	git checkout -b test7.d master &&
+	git checkout -b test$test_count.d master &&
 	rmdir submod && mv submod.orig submod &&
 	git submodule update -N &&
-	test_must_fail git merge test7 &&
+	test_must_fail git merge test$test_count &&
 	test -n "$(git ls-files -u)" &&
 	( yes "" | git mergetool file1 file2 spaced\ name subdir/file3 >/dev/null 2>&1 ) &&
 	( yes "" | git mergetool both>/dev/null 2>&1 ) &&
@@ -448,7 +448,7 @@ test_expect_success 'file vs modified submodule' '
 '
 
 test_expect_success 'submodule in subdirectory' '
-	git checkout -b test10 branch1 &&
+	git checkout -b test$test_count branch1 &&
 	git submodule update -N &&
 	(
 		cd subdir &&
@@ -464,52 +464,52 @@ test_expect_success 'submodule in subdirectory' '
 	git add subdir/subdir_module &&
 	git commit -m "add submodule in subdirectory" &&
 
-	git checkout -b test10.a test10 &&
+	git checkout -b test$test_count.a test$test_count &&
 	git submodule update -N &&
 	(
 	cd subdir/subdir_module &&
 		git checkout -b super10.a &&
-		echo test10.a >file15 &&
+		echo test$test_count.a >file15 &&
 		git add file15 &&
 		git commit -m "on branch 10.a"
 	) &&
 	git add subdir/subdir_module &&
-	git commit -m "change submodule in subdirectory on test10.a" &&
+	git commit -m "change submodule in subdirectory on test$test_count.a" &&
 
-	git checkout -b test10.b test10 &&
+	git checkout -b test$test_count.b test$test_count &&
 	git submodule update -N &&
 	(
 		cd subdir/subdir_module &&
 		git checkout -b super10.b &&
-		echo test10.b >file15 &&
+		echo test$test_count.b >file15 &&
 		git add file15 &&
 		git commit -m "on branch 10.b"
 	) &&
 	git add subdir/subdir_module &&
-	git commit -m "change submodule in subdirectory on test10.b" &&
+	git commit -m "change submodule in subdirectory on test$test_count.b" &&
 
-	test_must_fail git merge test10.a >/dev/null 2>&1 &&
+	test_must_fail git merge test$test_count.a >/dev/null 2>&1 &&
 	(
 		cd subdir &&
 		( yes "l" | git mergetool subdir_module )
 	) &&
-	test "$(cat subdir/subdir_module/file15)" = "test10.b" &&
+	test "$(cat subdir/subdir_module/file15)" = "test$test_count.b" &&
 	git submodule update -N &&
-	test "$(cat subdir/subdir_module/file15)" = "test10.b" &&
+	test "$(cat subdir/subdir_module/file15)" = "test$test_count.b" &&
 	git reset --hard &&
 	git submodule update -N &&
 
-	test_must_fail git merge test10.a >/dev/null 2>&1 &&
+	test_must_fail git merge test$test_count.a >/dev/null 2>&1 &&
 	( yes "r" | git mergetool subdir/subdir_module ) &&
-	test "$(cat subdir/subdir_module/file15)" = "test10.b" &&
+	test "$(cat subdir/subdir_module/file15)" = "test$test_count.b" &&
 	git submodule update -N &&
-	test "$(cat subdir/subdir_module/file15)" = "test10.a" &&
+	test "$(cat subdir/subdir_module/file15)" = "test$test_count.a" &&
 	git commit -m "branch1 resolved with mergetool" &&
 	rm -rf subdir/subdir_module
 '
 
 test_expect_success 'directory vs modified submodule' '
-	git checkout -b test11 branch1 &&
+	git checkout -b test$test_count branch1 &&
 	mv submod submod-movedaside &&
 	git rm --cached submod &&
 	mkdir submod &&
@@ -537,9 +537,9 @@ test_expect_success 'directory vs modified submodule' '
 	test "$(cat submod/bar)" = "master submodule" &&
 	git reset --hard >/dev/null 2>&1 && rm -rf submod-movedaside &&
 
-	git checkout -b test11.c master &&
+	git checkout -b test$test_count.c master &&
 	git submodule update -N &&
-	test_must_fail git merge test11 &&
+	test_must_fail git merge test$test_count &&
 	test -n "$(git ls-files -u)" &&
 	( yes "l" | git mergetool submod ) &&
 	git submodule update -N &&
@@ -547,7 +547,7 @@ test_expect_success 'directory vs modified submodule' '
 
 	git reset --hard >/dev/null 2>&1 &&
 	git submodule update -N &&
-	test_must_fail git merge test11 &&
+	test_must_fail git merge test$test_count &&
 	test -n "$(git ls-files -u)" &&
 	test ! -e submod.orig &&
 	( yes "r" | git mergetool submod ) &&
@@ -559,7 +559,7 @@ test_expect_success 'directory vs modified submodule' '
 '
 
 test_expect_success 'file with no base' '
-	git checkout -b test13 branch1 &&
+	git checkout -b test$test_count branch1 &&
 	test_must_fail git merge master &&
 	git mergetool --no-prompt --tool mybase -- both &&
 	>expected &&
@@ -568,7 +568,7 @@ test_expect_success 'file with no base' '
 '
 
 test_expect_success 'custom commands override built-ins' '
-	git checkout -b test14 branch1 &&
+	git checkout -b test$test_count branch1 &&
 	test_config mergetool.defaults.cmd "cat \"\$REMOTE\" >\"\$MERGED\"" &&
 	test_config mergetool.defaults.trustExitCode true &&
 	test_must_fail git merge master &&
@@ -579,7 +579,7 @@ test_expect_success 'custom commands override built-ins' '
 '
 
 test_expect_success 'filenames seen by tools start with ./' '
-	git checkout -b test15 branch1 &&
+	git checkout -b test$test_count branch1 &&
 	test_config mergetool.writeToTemp false &&
 	test_config mergetool.myecho.cmd "echo \"\$LOCAL\"" &&
 	test_config mergetool.myecho.trustExitCode true &&
@@ -595,7 +595,7 @@ test_lazy_prereq MKTEMP '
 '
 
 test_expect_success MKTEMP 'temporary filenames are used with mergetool.writeToTemp' '
-	git checkout -b test16 branch1 &&
+	git checkout -b test$test_count branch1 &&
 	test_config mergetool.writeToTemp true &&
 	test_config mergetool.myecho.cmd "echo \"\$LOCAL\"" &&
 	test_config mergetool.myecho.trustExitCode true &&
-- 
2.11.0.390.gc69c2f50cf-goog


  parent reply	other threads:[~2017-01-10 20:43 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04  0:50 [PATCH 0/4] fix mergetool+rerere+subdir regression Richard Hansen
2017-01-04  0:50 ` [PATCH 1/4] t7610: update branch names to match test number Richard Hansen
2017-01-04  0:50 ` [PATCH 2/4] t7610: make tests more independent and debuggable Richard Hansen
2017-01-04 20:27   ` Stefan Beller
2017-01-05 15:41     ` Richard Hansen
2017-01-05 15:46     ` Richard Hansen
2017-01-05 12:20   ` Simon Ruderich
2017-01-05 15:48     ` Richard Hansen
2017-01-04  0:50 ` [PATCH 3/4] t7610: add test case for rerere+mergetool+subdir bug Richard Hansen
2017-01-04  0:50 ` [PATCH 4/4] mergetool: fix running in subdir when rerere enabled Richard Hansen
2017-01-06  1:09 ` [PATCH v2 0/4] fix mergetool+rerere+subdir regression Richard Hansen
2017-01-06  1:09   ` [PATCH v2 1/4] t7610: update branch names to match test number Richard Hansen
2017-01-06  1:09   ` [PATCH v2 2/4] t7610: make tests more independent and debuggable Richard Hansen
2017-01-06  1:31     ` Stefan Beller
2017-01-07  1:53       ` Richard Hansen
2017-01-06  1:09   ` [PATCH v2 3/4] t7610: add test case for rerere+mergetool+subdir bug Richard Hansen
2017-01-06  1:09   ` [PATCH v2 4/4] mergetool: fix running in subdir when rerere enabled Richard Hansen
2017-01-06  9:42     ` Johannes Sixt
2017-01-07  2:16       ` Richard Hansen
2017-01-09  5:42   ` [PATCH v3 00/13] fix mergetool+rerere+subdir regression Richard Hansen
2017-01-09  5:42     ` [PATCH v3 01/13] .mailmap: Use my personal email address as my canonical Richard Hansen
2017-01-09  5:42     ` [PATCH v3 02/13] t7610: update branch names to match test number Richard Hansen
2017-01-09  5:42     ` [PATCH v3 03/13] t7610: Move setup code to the 'setup' test case Richard Hansen
2017-01-09  5:42     ` [PATCH v3 04/13] t7610: use test_when_finished for cleanup tasks Richard Hansen
2017-01-09  5:42     ` [PATCH v3 05/13] t7610: don't rely on state from previous test Richard Hansen
2017-01-09  5:42     ` [PATCH v3 06/13] t7610: run 'git reset --hard' after each test to clean up Richard Hansen
2017-01-09  5:42     ` [PATCH v3 07/13] t7610: delete some now-unnecessary 'git reset --hard' lines Richard Hansen
2017-01-09  5:42     ` [PATCH v3 08/13] t7610: always work on a test-specific branch Richard Hansen
2017-01-09  5:42     ` [PATCH v3 09/13] t7610: don't assume the checked-out commit Richard Hansen
2017-01-09  5:42     ` [PATCH v3 10/13] t7610: spell 'git reset --hard' consistently Richard Hansen
2017-01-09  5:42     ` [PATCH v3 11/13] t7610: add test case for rerere+mergetool+subdir bug Richard Hansen
2017-01-09  5:42     ` [PATCH v3 12/13] mergetool: take the "-O" out of $orderfile Richard Hansen
2017-01-09  5:42     ` [PATCH v3 13/13] mergetool: fix running in subdir when rerere enabled Richard Hansen
2017-01-09 18:12       ` Junio C Hamano
2017-01-09 19:05         ` Junio C Hamano
2017-01-09 19:53           ` Johannes Sixt
2017-01-09 22:57           ` Richard Hansen
2017-01-09 23:29           ` Junio C Hamano
2017-01-09 23:32             ` Junio C Hamano
2017-01-09 23:50             ` Richard Hansen
2017-01-09 18:49     ` [PATCH v3 00/13] fix mergetool+rerere+subdir regression Stefan Beller
2017-01-09 23:29     ` [PATCH v4 00/14] " Richard Hansen
2017-01-09 23:29       ` [PATCH v4 01/14] .mailmap: Use my personal email address as my canonical Richard Hansen
2017-01-09 23:29       ` [PATCH v4 02/14] rev-parse doc: use "--" in the --prefix example Richard Hansen
2017-01-09 23:29       ` [PATCH v4 03/14] t7610: update branch names to match test number Richard Hansen
2017-01-09 23:29       ` [PATCH v4 04/14] t7610: Move setup code to the 'setup' test case Richard Hansen
2017-01-09 23:29       ` [PATCH v4 05/14] t7610: use test_when_finished for cleanup tasks Richard Hansen
2017-01-09 23:29       ` [PATCH v4 06/14] t7610: don't rely on state from previous test Richard Hansen
2017-01-09 23:29       ` [PATCH v4 07/14] t7610: run 'git reset --hard' after each test to clean up Richard Hansen
2017-01-09 23:29       ` [PATCH v4 08/14] t7610: delete some now-unnecessary 'git reset --hard' lines Richard Hansen
2017-01-09 23:29       ` [PATCH v4 09/14] t7610: always work on a test-specific branch Richard Hansen
2017-01-09 23:29       ` [PATCH v4 10/14] t7610: don't assume the checked-out commit Richard Hansen
2017-01-09 23:29       ` [PATCH v4 11/14] t7610: spell 'git reset --hard' consistently Richard Hansen
2017-01-09 23:29       ` [PATCH v4 12/14] t7610: add test case for rerere+mergetool+subdir bug Richard Hansen
2017-01-09 23:29       ` [PATCH v4 13/14] mergetool: take the "-O" out of $orderfile Richard Hansen
2017-01-09 23:29       ` [PATCH v4 14/14] mergetool: fix running in subdir when rerere enabled Richard Hansen
2017-01-10  6:17         ` Johannes Sixt
2017-01-10 17:09           ` Richard Hansen
2017-01-10 19:25           ` Junio C Hamano
2017-01-10 20:29             ` Johannes Sixt
2017-01-10 20:41       ` [PATCH v5 00/14] fix mergetool+rerere+subdir regression Richard Hansen
2017-01-10 20:41         ` [PATCH v5 01/14] .mailmap: Use my personal email address as my canonical Richard Hansen
2017-01-10 20:41         ` [PATCH v5 02/14] rev-parse doc: pass "--" to rev-parse in the --prefix example Richard Hansen
2017-01-10 20:41         ` Richard Hansen [this message]
2017-01-10 20:41         ` [PATCH v5 04/14] t7610: Move setup code to the 'setup' test case Richard Hansen
2017-01-10 20:41         ` [PATCH v5 05/14] t7610: use test_when_finished for cleanup tasks Richard Hansen
2017-01-10 20:41         ` [PATCH v5 06/14] t7610: don't rely on state from previous test Richard Hansen
2017-01-10 20:41         ` [PATCH v5 07/14] t7610: run 'git reset --hard' after each test to clean up Richard Hansen
2017-01-10 20:41         ` [PATCH v5 08/14] t7610: delete some now-unnecessary 'git reset --hard' lines Richard Hansen
2017-01-10 20:41         ` [PATCH v5 09/14] t7610: always work on a test-specific branch Richard Hansen
2017-01-10 20:41         ` [PATCH v5 10/14] t7610: don't assume the checked-out commit Richard Hansen
2017-01-10 20:41         ` [PATCH v5 11/14] t7610: spell 'git reset --hard' consistently Richard Hansen
2017-01-10 20:42         ` [PATCH v5 12/14] t7610: add test case for rerere+mergetool+subdir bug Richard Hansen
2017-01-10 20:42         ` [PATCH v5 13/14] mergetool: take the "-O" out of $orderfile Richard Hansen
2017-01-10 20:42         ` [PATCH v5 14/14] mergetool: fix running in subdir when rerere enabled Richard Hansen
2017-01-10  4:36 ` [PATCH 0/4] fix mergetool+rerere+subdir regression David Aguilar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170110204202.21779-4-hansenr@google.com \
    --to=hansenr@google.com \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=sbeller@google.com \
    --cc=simon@ruderich.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.