Patchwork D10635: tests: invoke some shell scripts through the shell interpreter for Windows

login
register
mail settings
Submitter phabricator
Date May 3, 2021, 6:22 p.m.
Message ID <differential-rev-PHID-DREV-5bgdody6b2rh7rynef2r-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48952/
State Superseded
Headers show

Comments

phabricator - May 3, 2021, 6:22 p.m.
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Otherwise, Windows was prompting what program to use to open the file (or just
  opening it if there was a file association configured).

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D10635

AFFECTED FILES
  tests/test-racy-mutations.t

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-racy-mutations.t b/tests/test-racy-mutations.t
--- a/tests/test-racy-mutations.t
+++ b/tests/test-racy-mutations.t
@@ -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)