[commit: testsuite] master: Count the number of tests that failed due to reqlib() (42b3c45)
Simon Marlow
marlowsd at gmail.com
Fri Jan 6 13:15:48 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/42b3c45cac5241566c731e49025ffddc7c723b2a
>---------------------------------------------------------------
commit 42b3c45cac5241566c731e49025ffddc7c723b2a
Author: Simon Marlow <marlowsd at gmail.com>
Date: Fri Jan 6 09:48:42 2012 +0000
Count the number of tests that failed due to reqlib()
OVERALL SUMMARY for test run started at Fri Jan 6 09:46:46 GMT 2012
82 total tests, which gave rise to
820 test cases, of which
0 caused framework failures
818 were skipped
0 expected passes
2 had missing libraries <---
0 expected failures
0 unexpected passes
0 unexpected failures
>---------------------------------------------------------------
driver/testglobals.py | 2 ++
driver/testlib.py | 23 +++++++++++++++++------
2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/driver/testglobals.py b/driver/testglobals.py
index 3da3774..634792c 100644
--- a/driver/testglobals.py
+++ b/driver/testglobals.py
@@ -123,6 +123,8 @@ class TestRun:
self.expected_passes = {}
self.n_expected_failures = 0
self.expected_failures = {}
+ self.n_missing_libs = 0
+ self.missing_libs = {}
self.n_unexpected_passes = 0
self.unexpected_passes = {}
self.n_unexpected_failures = 0
diff --git a/driver/testlib.py b/driver/testlib.py
index d5e6300..4b905b6 100644
--- a/driver/testlib.py
+++ b/driver/testlib.py
@@ -111,7 +111,7 @@ def _reqlib( opts, lib ):
have_lib[lib] = got_it
if not got_it:
- opts.expect = 'fail'
+ opts.expect = 'missing-lib'
def req_profiling( opts ):
if not config.have_profiling:
@@ -707,7 +707,9 @@ def do_test(name, way, func, args):
if config.use_threads:
t.lock.acquire()
- if getTestOpts().expect != 'pass' and getTestOpts().expect != 'fail':
+ if getTestOpts().expect != 'pass' and \
+ getTestOpts().expect != 'fail' and \
+ getTestOpts().expect != 'missing-lib':
framework_fail(name, way, 'bad expected ' + getTestOpts().expect)
try:
@@ -735,11 +737,18 @@ def do_test(name, way, func, args):
reason = result['reason']
addFailingTestInfo(t.unexpected_failures, getTestOpts().testdir, name, reason, way)
else:
- t.n_expected_failures = t.n_expected_failures + 1
- if name in t.expected_failures:
- t.expected_failures[name].append(way)
+ if getTestOpts().expect == 'missing-lib':
+ t.n_missing_libs = t.n_missing_libs + 1
+ if name in t.missing_libs:
+ t.missing_libs[name].append(way)
+ else:
+ t.missing_libs[name] = [way]
else:
- t.expected_failures[name] = [way]
+ t.n_expected_failures = t.n_expected_failures + 1
+ if name in t.expected_failures:
+ t.expected_failures[name].append(way)
+ else:
+ t.expected_failures[name] = [way]
else:
framework_fail(name, way, 'bad result ' + passFail)
except:
@@ -1982,6 +1991,8 @@ def summary(t, file):
+ ' were skipped\n\n' \
+ string.rjust(`t.n_expected_passes`, 8)
+ ' expected passes\n' \
+ + string.rjust(`t.n_missing_libs`, 8)
+ + ' had missing libraries\n' \
+ string.rjust(`t.n_expected_failures`, 8) \
+ ' expected failures\n' \
+ string.rjust(`t.n_unexpected_passes`, 8) \
More information about the Cvs-ghc
mailing list