summaryrefslogtreecommitdiffstats
path: root/test/option/debug-count.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2005-06-02 13:40:28 (GMT)
committerSteven Knight <knight@baldmt.com>2005-06-02 13:40:28 (GMT)
commit8281e43014e93d8a8e674902410ba42e38355405 (patch)
tree70e700745fd48c5a42731cd63626b74f51e2ec8e /test/option/debug-count.py
parent1d3c36ee983d5f26bbd9cf9733a8084eced1b2c4 (diff)
downloadSCons-8281e43014e93d8a8e674902410ba42e38355405.zip
SCons-8281e43014e93d8a8e674902410ba42e38355405.tar.gz
SCons-8281e43014e93d8a8e674902410ba42e38355405.tar.bz2
Print statistics even when we terminate early (e.g. using -h).
Diffstat (limited to 'test/option/debug-count.py')
-rw-r--r--test/option/debug-count.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/test/option/debug-count.py b/test/option/debug-count.py
index ca627e8..3cb924b 100644
--- a/test/option/debug-count.py
+++ b/test/option/debug-count.py
@@ -56,11 +56,9 @@ test.write('file.in', "file.in\n")
# Just check that object counts for some representative classes
# show up in the output.
-test.run(arguments = "--debug=count")
-stdout = test.stdout()
def find_object_count(s, stdout):
- re_string = '\d+ +\d+ +\d+ +\d+ %s' % re.escape(s)
+ re_string = '\d+ +\d+ %s' % re.escape(s)
return re.search(re_string, stdout)
objects = [
@@ -73,14 +71,18 @@ objects = [
'Node.Node',
]
-missing = filter(lambda o: find_object_count(o, stdout) is None, objects)
+for args in ['-h --debug=count', '--debug=count']:
+ test.run(arguments = args)
+ stdout = test.stdout()
-if missing:
- print "Missing the following object lines:"
- print "\t", string.join(missing)
- print "STDOUT =========="
- print stdout
- test.fail_test(1)
+ missing = filter(lambda o: find_object_count(o, stdout) is None, objects)
+
+ if missing:
+ print "Missing the following object lines from '%s' output:" % args
+ print "\t", string.join(missing)
+ print "STDOUT =========="
+ print stdout
+ test.fail_test(1)
test.pass_test()