summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/testing.txt31
-rw-r--r--tests/CMakeLists.txt8
-rw-r--r--tests/FindGLEW.cmake6
3 files changed, 30 insertions, 15 deletions
diff --git a/doc/testing.txt b/doc/testing.txt
index 403ef4a..d44d801 100644
--- a/doc/testing.txt
+++ b/doc/testing.txt
@@ -33,7 +33,7 @@ $ ctest -C <configs> Adds extended tests belonging to configs.
Examples - test all examples
All - test everything
-Adding a new regression test:
+Adding a new regression test:
------------------------------
1) create a test file at an appropriate location under testdata/
@@ -58,15 +58,19 @@ $ DISPLAY=:5 ctest
1. Trouble finding libraries
To help CMAKE find eigen2, OpenCSG, CGAL, Boost, and GLEW, you can use
- the -D option. See CMakeLists.txt for more information. Examples:
+ environment variables, just like for the main qmake & openscad.pro. Examples:
- cmake . -DOPENCSG_DIR=~/OpenCSG-1.3.2
- cmake . -DCGAL_DIR=c:\CGAL-3.7 -DBOOST_DIR=c:\boost_1_46_0
+ OPENCSGDIR=~/OpenCSG-1.3.2 EIGEN2DIR=~/eigen2 cmake .
+ CGALDIR=c:\CGAL-3.7 BOOSTDIR=c:\boost_1_46_0 cmake .
+
+ Valid variables are as follows (see CMakeLists.txt for more info):
+
+ BOOSTDIR, CGALDIR, EIGEN2DIR, GLEWDIR, OPENCSGDIR, MACOSX_DEPLOY_DIR
2. Logs
Logs of test runs are found in tests/build/Testing/Temporary
-Pretty-printed html output is in a subdir of tests/build/Testing/Temporary
+Pretty-printed index.html is in a subdir of tests/build/Testing/Temporary
Expected results are found in tests/regression/*
Actual results are found in tests/build/testname-output/*
@@ -74,17 +78,22 @@ Actual results are found in tests/build/testname-output/*
Cross-compiling of tests has not been automated nor tested
-4. Testing images takes forever, they fail, and it says 'return -11'
+4. Image-based tests takes a long time, they fail, and it says 'return -11'
-Imagemagick may have crashed. You can try using the alternate comparison
+Imagemagick may have crashed. You can try using the alternate IM comparator
based on Normalized Cross Correlation. Pass -DCOMPARATOR=ncc to cmake
5. Testing images fails with 'morphology' not found for ImageMagick
-Your version of imagemagick is old. Upgrade, or pass -DCOMPARATOR=old to cmake.
-The comparison will be of lowered reliability.
+Your version of imagemagick is old. Upgrade, or pass -DCOMPARATOR=old to
+cmake. The comparison will be of lowered reliability.
-6. Many cgalpngtests are failing with weird assertion errors.
+6. Unexplained or bizarre errors.
-Edit CMakeCache.txt and replace '-DNDEBUG' or '/D NDEBUG' with blank spaces
+This can happen on dynamic-library systems (linux) where you try to use
+your own version of a library while the system still has another version
+under the system paths. You can diagnose this by looking at your cmake
+log as well as your sysinfo.txt file, as well as running 'ldd' against
+your binaries, to make sure that the proper versions of libraries are
+getting compiled and linked with the test binaries.
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index d795951..6f776d2 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
@@ -125,11 +127,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)
contact: Jan Huwald // Impressum