git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] t1800: correct test to handle Cygwin
@ 2022-09-01 17:39 Adam Dinwoodie
  2022-09-01 18:32 ` Junio C Hamano
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Adam Dinwoodie @ 2022-09-01 17:39 UTC (permalink / raw)
  To: Git Mailing List
  Cc: Ævar Arnfjörð Bjarmason,
	Đoàn Trần Công Danh, Emily Shaffer

On Cygwin, when failing to spawn a process using start_command, Git
outputs the same error as on Linux systems, rather than using the
GIT_WINDOWS_NATIVE-specific error output.  The WINDOWS test prerequisite
is set in both Cygwin and native Windows environments, which means it's
not appropriate to use to anticipate the error output from
start_command.  Instead, use the MINGW test prerequisite, which is only
set for Git in native Windows environments, and not for Cygwin.

Signed-off-by: Adam Dinwoodie <adam@dinwoodie.org>
---

The job of setting Cygwin up to get Git CI builds, either as part of the
main CI builds or as something using separate automation, is rapidly
rising up my when-I-have-the-time to-do list...

 t/t1800-hook.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t1800-hook.sh b/t/t1800-hook.sh
index 64096adac7..fae8b2faf9 100755
--- a/t/t1800-hook.sh
+++ b/t/t1800-hook.sh
@@ -159,7 +159,7 @@ test_expect_success 'git hook run a hook with a bad shebang' '
 	# TODO: We should emit the same (or at least a more similar)
 	# error on Windows and !Windows. See the OS-specific code in
 	# start_command()
-	if test_have_prereq !WINDOWS
+	if test_have_prereq !MINGW
 	then
 		cat >expect <<-\EOF
 		fatal: cannot run bad-hooks/test-hook: ...
-- 
2.37.2

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

end of thread, other threads:[~2022-09-15  8:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-01 17:39 [PATCH] t1800: correct test to handle Cygwin Adam Dinwoodie
2022-09-01 18:32 ` Junio C Hamano
2022-09-02  1:55   ` Đoàn Trần Công Danh
2022-09-02 12:22 ` Johannes Schindelin
2022-09-07 20:49   ` Junio C Hamano
2022-09-07 20:57     ` rsbecker
2022-09-13 21:08     ` Adam Dinwoodie
2022-09-13 21:33       ` Junio C Hamano
2022-09-15  7:57 ` [PATCH v2] " Adam Dinwoodie
2022-09-15  8:51   ` rsbecker

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).