summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt23
-rw-r--r--tests/FindGLEW.cmake6
-rwxr-xr-xtests/test_pretty_print.py16
3 files changed, 29 insertions, 16 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index d795951..d79925a 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,3 +1,5 @@
+# instructions - see ../doc/testing.txt
+
cmake_minimum_required(VERSION 2.8)
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
# Explicitly use new include policy to avoid globally shadowing included modules
@@ -57,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()
@@ -109,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
@@ -125,11 +132,13 @@ endif()
if (NOT EIGEN2_INCLUDE_DIR)
find_path(EIGEN2_INCLUDE_DIR
Eigen/Core
- PATHS ENV EIGEN2DIR /opt/local/include/eigen2 /usr/include/eigen2)
+ HINTS $ENV{EIGEN2DIR}
+ PATHS /opt/local/include/eigen2 /usr/include/eigen2)
if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
find_path(EIGEN2_INCLUDE_DIR
Eigen/Core
- PATHS ENV EIGEN2DIR /usr/local/include/eigen2 )
+ HINTS $ENV{EIGEN2DIR}
+ PATHS /usr/local/include/eigen2 )
endif()
if (NOT EIGEN2_INCLUDE_DIR)
message(FATAL_ERROR "Eigen2 not found")
diff --git a/tests/FindGLEW.cmake b/tests/FindGLEW.cmake
index 8093ed3..fa3071f 100644
--- a/tests/FindGLEW.cmake
+++ b/tests/FindGLEW.cmake
@@ -32,12 +32,14 @@ IF (WIN32)
ELSE (WIN32)
message(STATUS "GLEW_DIR: " ${GLEW_DIR})
FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h
- PATHS ${GLEW_DIR}/include /usr/include /usr/local/include
+ HINTS ${GLEW_DIR}/include
+ PATHS /usr/include /usr/local/include
NO_DEFAULT_PATH
DOC "The directory where GL/glew.h resides")
FIND_LIBRARY( GLEW_LIBRARY
NAMES GLEW glew
- PATHS ${GLEW_DIR}/lib /usr/lib /usr/local/lib
+ HINTS ${GLEW_DIR}/lib
+ PATHS /usr/lib /usr/local/lib
NO_DEFAULT_PATH
DOC "The GLEW library")
ENDIF (WIN32)
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])
contact: Jan Huwald // Impressum