Patchwork D11002: windows: use shell function instead of variable substitution

login
register
mail settings
Submitter phabricator
Date July 7, 2021, 1:14 p.m.
Message ID <differential-rev-PHID-DREV-n2yg4p4w3xwsyzbe3pvk-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49315/
State Superseded
Headers show

Comments

phabricator - July 7, 2021, 1:14 p.m.
Alphare created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This makes it compatible with Windows

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/test-profile.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-profile.t b/tests/test-profile.t
--- a/tests/test-profile.t
+++ b/tests/test-profile.t
@@ -23,27 +23,29 @@ 
 
 #if lsprof
 
-  $ prof='hg --config profiling.type=ls --profile'
+  $ prof () {
+  >   hg --config profiling.type=ls --profile $@
+  > }
 
-  $ $prof st 2>../out
+  $ prof st 2>../out
   $ grep CallCount ../out > /dev/null || cat ../out
 
-  $ $prof --config profiling.output=../out st
+  $ prof --config profiling.output=../out st
   $ grep CallCount ../out > /dev/null || cat ../out
 
-  $ $prof --config profiling.output=blackbox --config extensions.blackbox= st
+  $ prof --config profiling.output=blackbox --config extensions.blackbox= st
   $ grep CallCount .hg/blackbox.log > /dev/null || cat .hg/blackbox.log
 
-  $ $prof --config profiling.format=text st 2>../out
+  $ prof --config profiling.format=text st 2>../out
   $ grep CallCount ../out > /dev/null || cat ../out
 
   $ echo "[profiling]" >> $HGRCPATH
   $ echo "format=kcachegrind" >> $HGRCPATH
 
-  $ $prof st 2>../out
+  $ prof st 2>../out
   $ grep 'events: Ticks' ../out > /dev/null || cat ../out
 
-  $ $prof --config profiling.output=../out st
+  $ prof --config profiling.output=../out st
   $ grep 'events: Ticks' ../out > /dev/null || cat ../out
 
 #endif
@@ -52,7 +54,7 @@ 
 
 Profiling of HTTP requests works
 
-  $ $prof --config profiling.format=text --config profiling.output=../profile.log serve -d -p $HGPORT --pid-file ../hg.pid -A ../access.log
+  $ prof --config profiling.format=text --config profiling.output=../profile.log serve -d -p $HGPORT --pid-file ../hg.pid -A ../access.log
   $ cat ../hg.pid >> $DAEMON_PIDS
   $ hg -q clone -U http://localhost:$HGPORT ../clone