tests/test-profile
author Nicolas Dumazet <nicdumz.commits@gmail.com>
Wed, 08 Apr 2009 14:19:41 +0200
changeset 8022 4f3fdfaa3874
parent 8021 1c2cf2e5dc9b
child 8023 fd9debb3ea1b
permissions -rwxr-xr-x
profiling: Adding profiling.output config variable If specified, outputs profiling data to the said file. Prints to stderr by default

#!/bin/sh

echo % test --time
hg --time help -q help 2>&1 | grep Time > /dev/null || echo --time failed

hg init a
cd a

echo % test --profile
if "$TESTDIR/hghave" -q lsprof; then
    hg --profile st 2>../out || echo --profile failed
    grep CallCount < ../out > /dev/null || echo wrong --profile

    hg --profile --config profiling.output=../out st 2>&1 \
        || echo --profile + output to file failed
    grep CallCount < ../out > /dev/null \
        || echo wrong --profile output when saving to a file
fi