diff options
-rw-r--r-- | tests/CMakeLists.txt | 9 | ||||
-rw-r--r-- | tests/csgtestcore.cc | 2 | ||||
-rwxr-xr-x | tests/test_cmdline_tool.py | 11 | ||||
-rwxr-xr-x | tests/test_pretty_print.py | 2 |
4 files changed, 17 insertions, 7 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index fe3fe34..f604f73 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -143,10 +143,10 @@ if (NOT OPENCSG_INCLUDE_DIR) message(STATUS "OPENCSG_DIR: " ${OPENCSG_DIR}) find_path(OPENCSG_INCLUDE_DIR opencsg.h - PATHS ${OPENCSG_DIR}/include) + HINTS ${OPENCSG_DIR}/include) find_library(OPENCSG_LIBRARY opencsg - PATHS ${OPENCSG_DIR}/lib) + HINTS ${OPENCSG_DIR}/lib) if (NOT OPENCSG_INCLUDE_DIR OR NOT OPENCSG_LIBRARY) message(FATAL_ERROR "OpenCSG not found") else() @@ -189,11 +189,14 @@ set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/parser_yacc.c PROPERTIES # CGAL -if (NOT $ENV{MACOSX_DEPLOY_DIR} STREQUAL "") +if (NOT $ENV{CGAL_DIR} STREQUAL "") + set(CGAL_DIR "$ENV{CGAL_DIR}") +elseif (NOT $ENV{MACOSX_DEPLOY_DIR} STREQUAL "") set(CGAL_DIR "$ENV{MACOSX_DEPLOY_DIR}/lib/CGAL") set(CMAKE_MODULE_PATH "${CGAL_DIR}") endif() find_package(CGAL REQUIRED) +message(STATUS "CGAL found in ${CGAL_USE_FILE} ${CGAL_INCLUDE_DIRS} ${CGAL_LIBRARIES_DIR}") if("${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}" VERSION_LESS 3.6) message(FATAL_ERROR "CGAL >= 3.6 required") endif() diff --git a/tests/csgtestcore.cc b/tests/csgtestcore.cc index a3d5097..c962023 100644 --- a/tests/csgtestcore.cc +++ b/tests/csgtestcore.cc @@ -95,7 +95,7 @@ string info_dump(OffscreenView *glview) << "\nBoost version: " << BOOST_LIB_VERSION << "\nEigen version: " << EIGEN_WORLD_VERSION << "." << EIGEN_MAJOR_VERSION << "." << EIGEN_MINOR_VERSION - // << "\nCGAL version: " << CGAL_VERSION ??? + << "\nCGAL version: " << TOSTRING(CGAL_VERSION) // << "\nOpenCSG" << ??? << "\n" << glview->getInfo() << "\n"; diff --git a/tests/test_cmdline_tool.py b/tests/test_cmdline_tool.py index 43ceda0..ebe802e 100755 --- a/tests/test_cmdline_tool.py +++ b/tests/test_cmdline_tool.py @@ -76,8 +76,15 @@ def compare_default(resultfilename): return True def compare_png(resultfilename): -# args = [expectedfilename, resultfilename, "-alpha", "Off", "-compose", "difference", "-composite", "-threshold", "10%", "-blur", "2", "-threshold", "30%", "-format", "%[fx:w*h*mean]", "info:"] - args = [expectedfilename, resultfilename, "-alpha", "Off", "-compose", "difference", "-composite", "-threshold", "10%", "-morphology", "Erode", "Square", "-format", "%[fx:w*h*mean]", "info:"] + #args = [expectedfilename, resultfilename, "-alpha", "Off", "-compose", "difference", "-composite", "-threshold", "10%", "-blur", "2", "-threshold", "30%", "-format", "%[fx:w*h*mean]", "info:"] + #args = [expectedfilename, resultfilename, "-alpha", "Off", "-compose", "difference", "-composite", "-threshold", "10%", "-morphology", "Erode", "Square", "-format", "%[fx:w*h*mean]", "info:"] + # 'morphology' is only available in newer versions of ImageMagick. + # http://www.imagemagick.org/Usage/morphology/#alturnative + args = [expectedfilename, resultfilename, "-alpha", "Off", + "-compose", "difference", "-composite", "-threshold", "10%", + #"-morphology", "Erode", "Square", + "-gaussian-blur","3x65535", "-threshold","99.999%", + "-format", "%[fx:w*h*mean]", "info:"] print >> sys.stderr, 'ImageMagick image comparison: convert ', ' '.join(args[2:]) print >> sys.stderr, ' expected image: ', expectedfilename if not resultfilename: diff --git a/tests/test_pretty_print.py b/tests/test_pretty_print.py index fc22908..4dd614b 100755 --- a/tests/test_pretty_print.py +++ b/tests/test_pretty_print.py @@ -177,7 +177,7 @@ end time : ENDDATE <br> |} <pre> - TESTLOG +TESTLOG </pre> |