summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1996-12-12 22:34:26 (GMT)
committerBarry Warsaw <barry@python.org>1996-12-12 22:34:26 (GMT)
commitcb17a465eb6230101491cf543745dfb362a8aebc (patch)
treeff9b54ecc93757b2c4556cd3691ffd574c0426b5 /Lib
parent1c92eba2dd586c6448e2f155554b0d5d8c964883 (diff)
downloadcpython-cb17a465eb6230101491cf543745dfb362a8aebc.zip
cpython-cb17a465eb6230101491cf543745dfb362a8aebc.tar.gz
cpython-cb17a465eb6230101491cf543745dfb362a8aebc.tar.bz2
Print final report, either all tests OK, or list of failed and missing
tests.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/autotest.py24
1 files changed, 19 insertions, 5 deletions
diff --git a/Lib/test/autotest.py b/Lib/test/autotest.py
index 0506fa2..060fd82 100644
--- a/Lib/test/autotest.py
+++ b/Lib/test/autotest.py
@@ -46,6 +46,7 @@ from test_support import *
# Exception raised when the test failed (not the same as in test_support)
TestFailed = 'autotest.TestFailed'
+TestMissing = 'autotest.TestMissing'
# defaults
generate = 0
@@ -96,8 +97,7 @@ def do_one_test(t, outdir):
try:
fake_stdout = Compare(filename)
except IOError:
- print 'Could not find output file for test:', t
- return
+ raise TestMissing
try:
sys.stdout = fake_stdout
print t
@@ -139,12 +139,26 @@ def main():
else:
import testall
tests = testall.tests
+ failed = []
+ missing = []
for test in tests:
try:
do_one_test(test, outdir)
except TestFailed, msg:
- print 'Failure of test:', test
traceback.print_exc()
- print 'All tests OK.'
-
+ failed.append(test)
+ except TestMissing:
+ missing.append(test)
+ print '**********\n* Report *\n**********'
+ if not failed and not missing:
+ print 'All tests OK.'
+ if failed:
+ print 'Failed tests:'
+ for t in failed:
+ print ' ', t
+ if missing:
+ print 'Missing tests:'
+ for t in missing:
+ print ' ', t
+
main()