From 1d17e623db4ceb5c353233b21a4aff9e352b1e4d Mon Sep 17 00:00:00 2001 From: chrysn Date: Mon, 24 Jun 2013 20:16:13 +0200 Subject: 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. 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+= '

none

' for t in tests_to_report: - if t.type=='txt': + if t.type in ('txt', 'ast', 'csg'): s+='\n
'+t.fullname+'
\n' s+='

'+t.fulltestlog+'
\n\n' elif t.type=='png': @@ -388,6 +390,8 @@ def tohtml(wiki_rootpath, startdate, tests, enddate, sysinfo, sysid, makefiles): s+='\n
'
 			s+=t.fulltestlog
 			s+='\n
' + else: + raise Exception("Unknown test type %r"%t.type) s+='\n\n

\n\n' -- cgit v0.10.1