diff options
-rw-r--r-- | tests/CMakeLists.txt | 15 | ||||
-rwxr-xr-x | tests/test_pretty_print.py | 16 |
2 files changed, 19 insertions, 12 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6f776d2..5be321d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -59,16 +59,11 @@ if(WIN32) # you have to pass -DCMAKE_VERBOSE_MAKEFILE=ON to cmake when you run it. endif() - # # Build test apps # # Boost -# -# usually it's found automatically, but some systems may need a custom install. -# in that case, run cmake with -DBOOST_ROOT=/path/to/boost/install -# (being the same path you passed to boost's --prefix when you built it) if (NOT $ENV{MACOSX_DEPLOY_DIR} STREQUAL "") set(BOOST_ROOT "$ENV{MACOSX_DEPLOY_DIR}") endif() @@ -111,10 +106,20 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # Qt4 + +if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + # make /usr/local/include/qt4 come before /usr/local/include (QT4 vs QT3) + set(CMAKE_INCLUDE_DIRECTORIES_BEFORE ON) +endif() + find_package(OpenGL) find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGL REQUIRED) include(${QT_USE_FILE}) +if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + set(CMAKE_INCLUDE_DIRECTORIES_BEFORE OFF) +endif() + # Eigen2 # Turn off Eigen SIMD optimization 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]) |