diff options
author | don <don@lyubov.(none)> | 2011-12-14 21:02:55 (GMT) |
---|---|---|
committer | don <don@lyubov.(none)> | 2011-12-14 21:02:55 (GMT) |
commit | 1f790437ea8992b996cac2e1399af9ae62291115 (patch) | |
tree | 02271676ec1e79dbaec7fc12709ffac660a9dc2a /tests/test_pretty_print.py | |
parent | 21c4bbe7d46c19efe4d49d58c5fb11492275e4fe (diff) |
fix freebsd build, improve test_pretty_print error handle, improve documentation
Diffstat (limited to 'tests/test_pretty_print.py')
-rwxr-xr-x | tests/test_pretty_print.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/test_pretty_print.py b/tests/test_pretty_print.py index d0c24c6..6fdc663 100755 --- a/tests/test_pretty_print.py +++ b/tests/test_pretty_print.py @@ -33,19 +33,16 @@ # 3. save the wikified data to disk # todo +# deal better with the situation where Offscreen rendering fails # do something if tests for GL extensions for OpenCSG fail (test fail, no image production) # copy all images, sysinfo.txt to bundle for html/upload (images # can be altered by subsequent runs) -# figure out hwo to make the thing run after the test -# figure out how CTEST treats the logfiles. # why is hash differing -# instead of having special '-info' prerun, put it as yet-another-test -# and parse the log # fix windows so that it won't keep asking 'this program crashed' over and over. # (you can set this in the registry to never happen, but itd be better if the program # itself was able to disable that temporarily in it's own process) -import string,sys,re,os,hashlib,subprocess,textwrap,time +import string,sys,re,os,hashlib,subprocess,textwrap,time,platform def tryread(filename): data = None @@ -88,7 +85,12 @@ def read_gitinfo(): def read_sysinfo(filename): data = tryread(filename) - if not data: return 'sysinfo: unknown' + if not data: + sinfo = platform.sys.platform + sinfo += '\nsystem cannot create offscreen GL framebuffer object' + sinfo += '\nsystem cannot create images' + sysid = platform.sys.platform+'_no_images' + return sinfo, sysid machine = ezsearch('Machine:(.*?)\n',data) machine = machine.replace(' ','-').replace('/','-') @@ -468,7 +470,7 @@ def main(): if verbose: print 'erasing files in',wikidir try: map(lambda x:os.remove(os.path.join(wikidir,x)), os.listdir(wikidir)) except: pass - print 'writing',len(imgs),'images and',len(txtpages),'text pages to:\n', ' .'+wikidir.replace(os.getcwd(),'') + print 'writing',len(imgs),'images, ',len(txtpages)-1,'text pages, and index.html to:\n', ' .'+wikidir.replace(os.getcwd(),'') for pgname in sorted(imgs): trysave( os.path.join(wikidir,pgname), imgs[pgname]) for pgname in sorted(txtpages): trysave( os.path.join(wikidir,pgname), txtpages[pgname]) |