##// END OF EJS Templates
tests: unify test-profile
Matt Mackall -
r12478:bb665db4 default
parent child Browse files
Show More
@@ -1,32 +1,31 b''
1 #!/bin/sh
1 test --time
2
3 echo % test --time
4 hg --time help -q help 2>&1 | grep Time > /dev/null || echo --time failed
5
2
6 hg init a
3 $ hg --time help -q help 2>&1 | grep Time > /dev/null
7 cd a
4 $ hg init a
5 $ cd a
8
6
9 echo % test --profile
7 test --profile
10 if "$TESTDIR/hghave" -q lsprof; then
11 hg --profile st 2>../out || echo --profile failed
12 grep CallCount < ../out > /dev/null || echo wrong --profile
13
8
14 hg --profile --config profiling.output=../out st 2>&1 \
9 $ if "$TESTDIR/hghave" -q lsprof; then
15 || echo --profile + output to file failed
10 > hg --profile st 2>../out || echo --profile failed
16 grep CallCount < ../out > /dev/null \
11 > grep CallCount < ../out > /dev/null || echo wrong --profile
17 || echo wrong --profile output when saving to a file
12 >
18
13 > hg --profile --config profiling.output=../out st 2>&1 \
19 hg --profile --config profiling.format=text st 2>&1 \
14 > || echo --profile + output to file failed
20 | grep CallCount > /dev/null || echo --profile format=text failed
15 > grep CallCount < ../out > /dev/null \
21
16 > || echo wrong --profile output when saving to a file
22 echo "[profiling]" >> $HGRCPATH
17 >
23 echo "format=kcachegrind" >> $HGRCPATH
18 > hg --profile --config profiling.format=text st 2>&1 \
24
19 > | grep CallCount > /dev/null || echo --profile format=text failed
25 hg --profile st 2>../out || echo --profile format=kcachegrind failed
20 >
26 grep 'events: Ticks' < ../out > /dev/null || echo --profile output is wrong
21 > echo "[profiling]" >> $HGRCPATH
27
22 > echo "format=kcachegrind" >> $HGRCPATH
28 hg --profile --config profiling.output=../out st 2>&1 \
23 >
29 || echo --profile format=kcachegrind + output to file failed
24 > hg --profile st 2>../out || echo --profile format=kcachegrind failed
30 grep 'events: Ticks' < ../out > /dev/null \
25 > grep 'events: Ticks' < ../out > /dev/null || echo --profile output is wrong
31 || echo --profile output is wrong
26 >
32 fi
27 > hg --profile --config profiling.output=../out st 2>&1 \
28 > || echo --profile format=kcachegrind + output to file failed
29 > grep 'events: Ticks' < ../out > /dev/null \
30 > || echo --profile output is wrong
31 > fi
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now