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

[PATCH 2/3] t7800: cleanup cruft left behind by tests

From
David Aguilar <davvid@gmail.com>
Date
Mar 15, 2017, 06:54 UTC
Message-ID
<20170315065406.6739-2-davvid@gmail.com>
In-Reply-To
<20170315065406.6739-1-davvid@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
---
More cleanup, this is needed because the final patch adds a test
to t7800 that was sensitive to the cruft left behind.
 t/t7800-difftool.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index e1ec292718..e0e65df8de 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -591,6 +591,7 @@ test_expect_success 'difftool --no-symlinks detects conflict ' '
 '
 
 test_expect_success 'difftool properly honors gitlink and core.worktree' '
+	test_when_finished rm -rf submod/ule &&
 	git submodule add ./. submod/ule &&
 	test_config -C submod/ule diff.tool checktrees &&
 	test_config -C submod/ule difftool.checktrees.cmd '\''
@@ -600,11 +601,13 @@ test_expect_success 'difftool properly honors gitlink and core.worktree' '
 		cd submod/ule &&
 		echo good >expect &&
 		git difftool --tool=checktrees --dir-diff HEAD~ >actual &&
-		test_cmp expect actual
+		test_cmp expect actual &&
+		rm -f expect actual
 	)
 '
 
 test_expect_success SYMLINKS 'difftool --dir-diff symlinked directories' '
+	test_when_finished git reset --hard &&
 	git init dirlinks &&
 	(
 		cd dirlinks &&
-- 
2.12.0.309.gffef9e61c2
Previous: David AguilarNext: David Aguilar
Message 2 of 4 in “t7800: remove whitespace before redirect”
  1. 1/3 t7800: remove whitespace before redirectDavid Aguilar, Mar 15, 2017
  2. 2/3 t7800: cleanup cruft left behind by testsDavid Aguilar, Mar 15, 2017
  3. 3/3 difftool: handle modified symlinks in dir-diff modeDavid Aguilar, Mar 15, 2017
  4. Johannes SchindelinMar 15, 2017

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.