changeset 47562:17fde6763286

windows: use shell function instead of variable substitution This makes it compatible with Windows Differential Revision: https://phab.mercurial-scm.org/D11002
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 24 Jun 2021 12:51:53 +0200
parents 8e9295912573
children dc3f7aa15423
files tests/test-profile.t
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-profile.t	Tue Jul 06 10:51:41 2021 +0200
+++ b/tests/test-profile.t	Thu Jun 24 12:51:53 2021 +0200
@@ -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