summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-04-05 03:28:51 (GMT)
committerSteven Knight <knight@baldmt.com>2002-04-05 03:28:51 (GMT)
commit863885a0df1f83b7e5b29f0370a865b4da330e24 (patch)
tree8733e9467a47c940d64b4940c21a763a9278af3e /test
parent3df4ee57235d30950d07b0b498387d5e16e67e6d (diff)
downloadSCons-863885a0df1f83b7e5b29f0370a865b4da330e24.zip
SCons-863885a0df1f83b7e5b29f0370a865b4da330e24.tar.gz
SCons-863885a0df1f83b7e5b29f0370a865b4da330e24.tar.bz2
Fix various problems with --profile (Anthony Roach)
Diffstat (limited to 'test')
-rw-r--r--test/option--profile.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/option--profile.py b/test/option--profile.py
index 4b8fd37..6d7efe4 100644
--- a/test/option--profile.py
+++ b/test/option--profile.py
@@ -53,5 +53,27 @@ test.fail_test(string.find(s, 'option_v') == -1)
test.fail_test(string.find(s, 'SCons.Script.main()') == -1)
test.fail_test(string.find(s, 'getopt.py') == -1)
+
+scons_prof = test.workpath('scons2.prof')
+
+test.run(arguments = "--profile %s -v " % scons_prof)
+test.fail_test(string.find(test.stdout(), 'SCons by ') == -1)
+test.fail_test(string.find(test.stdout(), 'Copyright') == -1)
+
+stats = pstats.Stats(scons_prof)
+stats.sort_stats('time')
+
+sys.stdout = StringIO.StringIO()
+
+stats.strip_dirs().print_stats()
+
+s = sys.stdout.getvalue()
+
+test.fail_test(string.find(s, '__init__.py') == -1)
+test.fail_test(string.find(s, 'option_v') == -1)
+test.fail_test(string.find(s, 'SCons.Script.main()') == -1)
+test.fail_test(string.find(s, 'getopt.py') == -1)
+
+
test.pass_test()