summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-02-02 22:25:13 (GMT)
committerMarius Kintel <marius@kintel.net>2013-02-02 22:25:13 (GMT)
commite5448f5e69f6d59256ba1816acf2647e808e10db (patch)
tree565c87e051833daa1c0eed7ffe45533fcf05c2fb /tests
parenteb30d42b5dd3ed5bb37336ed46a59eabaca81e06 (diff)
parent18e3a7d9ad8e052d626ac250a9c9d5f36f29a54d (diff)
Merge pull request #270 from openscad/misc_updates
Big Endian binary STL fix + misc updates
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt5
-rw-r--r--tests/CTestCustom.template6
-rwxr-xr-xtests/test_cmdline_tool.py2
-rwxr-xr-xtests/virtualfb.sh5
4 files changed, 13 insertions, 5 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index d2daf43..fcf7d08 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -179,6 +179,11 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_INCLUDE_DIRECTORIES_BEFORE ON)
find_package(OpenGL REQUIRED)
+if ( "${OPENGL_glu_LIBRARY}" MATCHES "NOTFOUND" )
+ # GLU and Mesa split in late 2012 so some systems dont have GLU
+ find_library(OPENGL_glu_LIBRARY GLU HINTS "$ENV{OPENSCAD_LIBRARIES}/lib" REQUIRED)
+ set( OPENGL_LIBRARY ${OPENGL_glu_LIBRARY} ${OPENGL_LIBRARY} )
+endif()
if (MINGW_CROSS_ENV_DIR)
mingw_cross_env_find_qt()
diff --git a/tests/CTestCustom.template b/tests/CTestCustom.template
index 72e6443..0e51e21 100644
--- a/tests/CTestCustom.template
+++ b/tests/CTestCustom.template
@@ -37,8 +37,10 @@ if( __cmake_system_name__ MATCHES "Linux|BSD")
message("Process ID of vfb: ${VFB_PID}")
endif()
if ("${VFB_DISPLAY}" STREQUAL "" OR "${VFB_PID}" STREQUAL "")
- message("Virtual framebuffer had a problem starting.")
- execute_process("cat virtualfblog")
+ set(VFBLOG "virtualfb.log")
+ message("Virtual framebuffer had a problem starting. Printing ${VFBLOG}")
+ execute_process(COMMAND cat virtualfb.log OUTPUT_VARIABLE VFBLOGTXT)
+ message("Log: ${VFBLOGTXT}")
else()
message("Virtual framebuffer started. DISPLAY=${VFB_DISPLAY}, PID=${VFB_PID}")
endif()
diff --git a/tests/test_cmdline_tool.py b/tests/test_cmdline_tool.py
index f29acc0..889c429 100755
--- a/tests/test_cmdline_tool.py
+++ b/tests/test_cmdline_tool.py
@@ -101,7 +101,7 @@ def compare_png(resultfilename):
msg += '\n expected image: ' + expectedfilename + '\n'
print >> sys.stderr, msg
if not resultfilename:
- print >> sys.stderr, "Error: OpenSCAD did not generate an image to test"
+ print >> sys.stderr, "Error: OpenSCAD error during test image generation"
return False
print >> sys.stderr, ' actual image: ', resultfilename
diff --git a/tests/virtualfb.sh b/tests/virtualfb.sh
index 3c0cf0e..e745765 100755
--- a/tests/virtualfb.sh
+++ b/tests/virtualfb.sh
@@ -13,8 +13,9 @@ if [ ! $VFB_BINARY ]; then
exit 1
fi
-DISPLAY=:98
-$VFB_BINARY $DISPLAY -screen 0 800x600x24 &> virtualfblog &
+DISPLAY=`echo | awk 'BEGIN{srand();} {printf ":%.0f", rand()*1000+100};'`
+#DISPLAY=:98
+$VFB_BINARY $DISPLAY -screen 0 800x600x24 &> virtualfb.log &
echo PID=$! " "
echo DISPLAY=$DISPLAY
# trap "kill -KILL $xpid ||:" EXIT
contact: Jan Huwald // Impressum