tests: invoke some shell scripts through the shell interpreter for Windows stable
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 02 May 2021 19:54:08 -0400
branchstable
changeset 47065 a12819559ccb
parent 47064 7383df4f6e19
child 47066 9e3979a25bfe
tests: invoke some shell scripts through the shell interpreter for Windows Otherwise, Windows was prompting what program to use to open the file (or just opening it if there was a file association configured). Differential Revision: https://phab.mercurial-scm.org/D10635
tests/test-racy-mutations.t
--- a/tests/test-racy-mutations.t	Sat May 01 13:04:56 2021 -0400
+++ b/tests/test-racy-mutations.t	Sun May 02 19:54:08 2021 -0400
@@ -26,7 +26,6 @@
   >         cat "\$@"
   >     fi
   > EOF
-  $ chmod +x "$TESTTMP/waitlock_editor.sh"
 
 Things behave differently if we don't already have a 00changelog.i file when
 this all starts, so let's make one.
@@ -49,11 +48,11 @@
   $ echo foo > foo
   $ (WAITLOCK_ANNOUNCE="${EDITOR_STARTED}" \
   >      WAITLOCK_FILE="${MISCHIEF_MANAGED}" \
-  >           HGEDITOR="$TESTTMP/waitlock_editor.sh" \
+  >           HGEDITOR="sh $TESTTMP/waitlock_editor.sh" \
   >           hg commit -qAm 'r1 (foo)' --edit foo > .foo_commit_out 2>&1 ; touch "${JOBS_FINISHED}") &
 
 Wait for the "editor" to actually start
-  $ WAITLOCK_FILE="${EDITOR_STARTED}" "$TESTTMP/waitlock_editor.sh"
+  $ WAITLOCK_FILE="${EDITOR_STARTED}" sh "$TESTTMP/waitlock_editor.sh"
 
 Break the locks, and make another commit.
   $ hg debuglocks -LW
@@ -67,7 +66,7 @@
 Awaken the editor from that first commit
   $ touch "${MISCHIEF_MANAGED}"
 And wait for it to finish
-  $ WAITLOCK_FILE="${JOBS_FINISHED}" "$TESTTMP/waitlock_editor.sh"
+  $ WAITLOCK_FILE="${JOBS_FINISHED}" sh "$TESTTMP/waitlock_editor.sh"
 
 #if skip-detection
 (Ensure there was no output)