mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
tests: fix test-profile to not depend on HGPROF environment variable
The test-profile test would fail if the user had HGPROF set to another profiler in their environment. This fix makes the test independent of that environment variable. Reverts the previous attempt to fix this, which was not cross platoform.
This commit is contained in:
parent
6c6b0d29a3
commit
47346e366e
@ -1277,6 +1277,9 @@ def main():
|
||||
# can't remove on solaris
|
||||
os.environ['HG'] = ''
|
||||
del os.environ['HG']
|
||||
if 'HGPROF' in os.environ:
|
||||
os.environ['HGPROF'] = ''
|
||||
del os.environ['HGPROF']
|
||||
|
||||
global TESTDIR, HGTMP, INST, BINDIR, PYTHONDIR, COVERAGE_FILE
|
||||
TESTDIR = os.environ["TESTDIR"] = os.getcwd()
|
||||
|
@ -8,8 +8,6 @@ test --time
|
||||
|
||||
test --profile
|
||||
|
||||
$ export -n HGPROF
|
||||
|
||||
$ hg --profile st 2>../out
|
||||
$ grep CallCount ../out > /dev/null || cat ../out
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user