diff options
author | chrysn <chrysn@fsfe.org> | 2013-06-24 18:16:13 (GMT) |
---|---|---|
committer | chrysn <chrysn@fsfe.org> | 2013-06-25 11:41:49 (GMT) |
commit | 1d17e623db4ceb5c353233b21a4aff9e352b1e4d (patch) | |
tree | 68fbaa2e853eed833078c5493913f0133238a55c /tests/test_pretty_print.py | |
parent | 2006824c24fe5611fe6f2cbb5453f43b0066f0a9 (diff) |
make test_pretty_print.py work with .csg and .ast too
file results that were neither txt nor png used to be ignored silently;
now, unknown extensions produce errors, and csg and ast are known.
Diffstat (limited to 'tests/test_pretty_print.py')
-rwxr-xr-x | tests/test_pretty_print.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_pretty_print.py b/tests/test_pretty_print.py index 3f4f1c9..988503c 100755 --- a/tests/test_pretty_print.py +++ b/tests/test_pretty_print.py @@ -266,7 +266,7 @@ TESTLOG s = s.replace(key,str(dic[key])) for t in tests_to_report: - if t.type=='txt': + if t.type in ('txt', 'ast', 'csg'): newchunk = re.sub('FTESTNAME',t.fullname,repeat2) newchunk = newchunk.replace('TESTLOG',t.fulltestlog) s = s.replace(repeat2, newchunk+repeat2) @@ -288,6 +288,8 @@ TESTLOG newchunk = newchunk.replace('EXPECTEDFILE',wikiname_e) newchunk = newchunk.replace('TESTLOG',t.fulltestlog) s = s.replace(repeat1, newchunk+repeat1) + else: + raise Exception("Unknown test type %r"%t.type) makefiles_wikinames = {} for mf in sorted(makefiles.keys()): @@ -367,7 +369,7 @@ def tohtml(wiki_rootpath, startdate, tests, enddate, sysinfo, sysid, makefiles): s+= '<p>none</p>' for t in tests_to_report: - if t.type=='txt': + if t.type in ('txt', 'ast', 'csg'): s+='\n<pre>'+t.fullname+'</pre>\n' s+='<p><pre>'+t.fulltestlog+'</pre>\n\n' elif t.type=='png': @@ -388,6 +390,8 @@ def tohtml(wiki_rootpath, startdate, tests, enddate, sysinfo, sysid, makefiles): s+='\n<pre>' s+=t.fulltestlog s+='\n</pre>' + else: + raise Exception("Unknown test type %r"%t.type) s+='\n\n<p>\n\n' |