* [PATCH 1/2] t7005-editor: Use $SHELL_PATH in the editor scripts
@ 2009-03-25 20:31 Johannes Sixt
2009-03-25 20:33 ` [PATCH 2/2] t7502-commit: Skip SIGTERM test on Windows Johannes Sixt
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Sixt @ 2009-03-25 20:31 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
The test sets up various shell scripts and uses them as commit message
editors. On Windows, we need a shebang line in order to recognize the
files as executable shell scripts. This adds it.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
This one and the next patch can go on top of js/windows-tests.
Or you again pull from
git://repo.or.cz/git/mingw/j6t.git for-junio
-- Hannes
t/t7005-editor.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/t/t7005-editor.sh b/t/t7005-editor.sh
index 2f8404a..e83bc8f 100755
--- a/t/t7005-editor.sh
+++ b/t/t7005-editor.sh
@@ -7,6 +7,7 @@ test_description='GIT_EDITOR, core.editor, and stuff'
for i in GIT_EDITOR core_editor EDITOR VISUAL vi
do
cat >e-$i.sh <<-EOF
+ #!$SHELL_PATH
echo "Edited by $i" >"\$1"
EOF
chmod +x e-$i.sh
--
1.6.2.1.224.g2225f
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] t7502-commit: Skip SIGTERM test on Windows
2009-03-25 20:31 [PATCH 1/2] t7005-editor: Use $SHELL_PATH in the editor scripts Johannes Sixt
@ 2009-03-25 20:33 ` Johannes Sixt
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Sixt @ 2009-03-25 20:33 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
The implementation of exec on Windows is just a rough approximation of the
POSIX behavior. In particular, no real process "overlay" happens (a new
process is spawned instead and the parent process waits until the child
terminates). In particular, the process ID cannot be taken by the exec'd
process. But there is one test in t7502-commit.sh that depends on this.
We have to skip it on Windows.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
t/t7502-commit.sh | 2 +-
t/test-lib.sh | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index ad42c78..56cd866 100755
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
@@ -234,7 +234,7 @@ cat >.git/FAKE_EDITOR <<EOF
# kill -TERM command added below.
EOF
-test_expect_success 'a SIGTERM should break locks' '
+test_expect_success EXECKEEPSPID 'a SIGTERM should break locks' '
echo >>negative &&
! "$SHELL_PATH" -c '\''
echo kill -TERM $$ >> .git/FAKE_EDITOR
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 8de5ee1..2979e8e 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -697,10 +697,12 @@ case $(uname -s) in
}
# no POSIX permissions
# backslashes in pathspec are converted to '/'
+ # exec does not inherit the PID
;;
*)
test_set_prereq POSIXPERM
test_set_prereq BSLASHPSPEC
+ test_set_prereq EXECKEEPSPID
;;
esac
--
1.6.2.1.224.g2225f
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-25 20:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-25 20:31 [PATCH 1/2] t7005-editor: Use $SHELL_PATH in the editor scripts Johannes Sixt
2009-03-25 20:33 ` [PATCH 2/2] t7502-commit: Skip SIGTERM test on Windows Johannes Sixt
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 NNTP newsgroup(s).