summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2012-07-04 08:28:04 +0200
committerFlorian Bruhin <me@the-compiler.org>2012-07-04 08:28:04 +0200
commitb09c7484c57b69b004d3d8dae8c2665218b2a9c5 (patch)
tree2db9c10613cd8c8d318ea9162ea6d01f647abe54
parent543768d654c5e05b982ce22d5ff429ea0b5cc7bb (diff)
downloadxdd2esi-b09c7484c57b69b004d3d8dae8c2665218b2a9c5.tar.gz
xdd2esi-b09c7484c57b69b004d3d8dae8c2665218b2a9c5.zip
Add fail/pass/exception counters to test.py
-rw-r--r--test.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test.py b/test.py
index 52514cb..15b4a81 100644
--- a/test.py
+++ b/test.py
@@ -48,6 +48,9 @@ def main():
xdds = glob.glob('*.xdd')
if len(xdds) == 0:
raise IOError("xddfolder does not contain any XDD files!")
+ failcnt = 0
+ passcnt = 0
+ exceptioncnt = 0
for xdd in xdds:
with warnings.catch_warnings(record=True) as w:
try:
@@ -94,6 +97,14 @@ def main():
os.path.join(options.xddfolder, options.schema),
os.path.join(options.xddfolder, xdd)))
print()
+ if failpass == "FAIL":
+ failcnt += 1
+ elif failpass == "PASS":
+ passcnt += 1
+ elif failpass == "EXCEPTION":
+ exceptioncnt += 1
+ print("Finished, {} PASS, {} FAIL, {} EXCEPTION".format(passcnt, failcnt,
+ exceptioncnt))
if __name__ == '__main__':
main()