changeset 47065:a12819559ccb stable

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
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 02 May 2021 19:54:08 -0400
parents 7383df4f6e19
children 9e3979a25bfe
files tests/test-racy-mutations.t
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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)