diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | tests/CMingw-cross-env.cmake | 6 | ||||
| -rw-r--r-- | tests/CTestCustom.template | 11 | 
3 files changed, 14 insertions, 7 deletions
| diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 58bf855..1352658 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -850,6 +850,10 @@ add_executable(test_pretty_print test_pretty_print.cc)  set_target_properties(test_pretty_print PROPERTIES COMPILE_FLAGS    "-DPYBIN=${PYTHON_EXECUTABLE} -DPYSRC=test_pretty_print.py -DBUILDDIR=--builddir=${CMAKE_CURRENT_BINARY_DIR}"  ) +if (MINGW_CROSS_ENV_DIR) +  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_pretty_print "wine test_pretty_print.exe") +  execute_process(COMMAND chmod ugo+x ${CMAKE_CURRENT_BINARY_DIR}/test_pretty_print) +endif()  file(READ ${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.template TMP)  string(REPLACE __cmake_current_binary_dir__ ${CMAKE_CURRENT_BINARY_DIR} TMP ${TMP}) diff --git a/tests/CMingw-cross-env.cmake b/tests/CMingw-cross-env.cmake index 1091085..186c35e 100644 --- a/tests/CMingw-cross-env.cmake +++ b/tests/CMingw-cross-env.cmake @@ -19,11 +19,15 @@  #          -DMINGW_CROSS_ENV_DIR=$MXEDIR  # make # (should proceed as normal.)  # now run 'ctest' on your *nix machine. -# The test .exe programs should run under Wine.  +# The test .exe programs should run under wine  # imagemagick's "convert" comparer will be your actual linux version.  # The pretty printer won't automatically work after the tests. You have to run  # it manually by typing 'wine test_pretty_print.exe'  # +# to debug finding MCAD with OPENSCADPATH, try something like this: +#  +#    strace -f ctest -R dumptest.*use 2>&1 | grep servos.scad +#  # See also:  #   # http://lists.gnu.org/archive/html/mingw-cross-env-list/2010-11/threads.html#00078 diff --git a/tests/CTestCustom.template b/tests/CTestCustom.template index 338f4b6..21ba1f3 100644 --- a/tests/CTestCustom.template +++ b/tests/CTestCustom.template @@ -1,5 +1,7 @@  # __header__  # +# Template to build a CTestCustom.cmake file in the build directory. +#  # This template enables ctest to do things before and after the test runs.  # In our case, 1. Setup a virtual framebuffer, 2. pretty-print results  #  @@ -7,13 +9,10 @@  # words (__word__) are replaced with the cmake build dir/etc, at the time that  # cmake itself is run. Typically these are signified by two underscores (__)  # before and after the word in smallcase.  -# -# The file then becomes CTestCustom.cmake inside the cmake build  -# directory. It is 'run' at the time that ctest is run.  - -# Part 0. X11 and Virtual Framebuffer, for Linux/BSD. This is not used by -#  Windows or Mac because they have alternate means of accessing OpenGL.  +# Part 0. X11 and Virtual Framebuffer, for headless Linux/BSD systems.  +# This is not used by Windows or Mac because they have alternate means  +# of accessing OpenGL.  set(debug_openscad_template 0) | 
