All of lore.kernel.org
 help / color / mirror / Atom feed
* t7610-mergetool.sh test failure
@ 2016-05-24 16:44 Armin Kunaschik
  2016-05-24 16:45 ` Junio C Hamano
  0 siblings, 1 reply; 13+ messages in thread
From: Armin Kunaschik @ 2016-05-24 16:44 UTC (permalink / raw)
  To: Git List

t7610-mergetool.sh fails on systems without mktemp.

mktemp is used in git-mergetool.sh and throws an error when it's not available.
error: mktemp is needed when 'mergetool.writeToTemp' is true

I see 2 options:
1. code around it, write an own mktemp, maybe use the test-mktemp as a basis.
2. disable the test when mktemp is not available

>From my point of view option 2 would be enough.
Any opinions about that?

Peff suggested something like this... works for me.
This patch is probably whitespace damaged... I could not yet figure out a way
to use and preserve tabs with Google mail.

---
diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh
index 76306cf..9279bf5 100755
--- a/t/t7610-mergetool.sh
+++ b/t/t7610-mergetool.sh
@@ -589,7 +589,12 @@ test_expect_success 'filenames seen by tools
start with ./' '
        git reset --hard master >/dev/null 2>&1
 '

-test_expect_success 'temporary filenames are used with mergetool.writeToTemp' '
+test_lazy_prereq MKTEMP '
+       tempdir=$(mktemp -d -t foo.XXX) &&
+       test -d "$tempdir"
+'
+
+test_expect_success MKTEMP 'temporary filenames are used with
mergetool.writeToTemp' '
        git checkout -b test16 branch1 &&
        test_config mergetool.writeToTemp true &&
        test_config mergetool.myecho.cmd "echo \"\$LOCAL\"" &&

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-06-22 17:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-24 16:44 t7610-mergetool.sh test failure Armin Kunaschik
2016-05-24 16:45 ` Junio C Hamano
2016-05-24 16:53   ` Armin Kunaschik
2016-05-25 23:16   ` Jeff King
2016-05-26  1:51     ` Jeff King
2016-05-27  4:40       ` David Aguilar
2016-05-27  5:00         ` Jeff King
2016-05-27  6:33           ` Junio C Hamano
2016-05-27 18:24             ` Jeff King
2016-05-27 19:58               ` Junio C Hamano
2016-05-27 20:01                 ` Jeff King
2016-06-22 16:53                   ` Armin Kunaschik
2016-06-22 17:12                     ` Jeff King

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.