summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-12-07 20:36:29 (GMT)
committerMarius Kintel <marius@kintel.net>2011-12-07 20:36:29 (GMT)
commit2e3ea0a64fe4b098bf09c6c09fcf3f63a4849d18 (patch)
tree4b9bf56f11d35d565e4b8f2061d92ec1cd2f7a0a /doc
parent577359073769db76d174284f490de96046abb428 (diff)
parentfaae7882e26c048b0ae2bf7a54065d31d0edbc31 (diff)
Merge branch 'cakebaby' of https://github.com/donbright/openscad into donbright-cakebaby
Diffstat (limited to 'doc')
-rw-r--r--doc/testing.txt66
1 files changed, 39 insertions, 27 deletions
diff --git a/doc/testing.txt b/doc/testing.txt
index 66ceac2..403ef4a 100644
--- a/doc/testing.txt
+++ b/doc/testing.txt
@@ -1,7 +1,7 @@
Running regression tests:
-------------------------
-Prerequisites: cmake, python
+Prerequisites: cmake, python, ImageMagick 6.5.9.3 or newer
A) Building test environment
@@ -16,25 +16,14 @@ First, get a normal build working by following instructions at
http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Windows
Then, from the QT command prompt:
-$ cd tests
-$ cmake . -DCMAKE_BUILD_TYPE=Release
-$ sed -i s/\/MD/\/MT/ CMakeCache.txt
-$ cmake .
-$ nmake -f Makefile
+> cd tests
+> cmake . -DCMAKE_BUILD_TYPE=Release
+> sed -i s/\/MD/\/MT/ CMakeCache.txt
+> cmake .
+> nmake -f Makefile
B) Running tests
-Easy version:
-$ make test
-
-Windows:
-$ nmake -f Makefile test
-
-Headless servers (no X11):
-$ Xvnc :5 -screen 0 800x600x24 &
-$ DISPLAY=:5 make test
-
-Partial or extended test runs:
$ ctest Runs tests enabled by default
$ ctest -R <regex> Runs only matching tests, e.g. ctest -R dxf
$ ctest -C <configs> Adds extended tests belonging to configs.
@@ -44,7 +33,6 @@ $ ctest -C <configs> Adds extended tests belonging to configs.
Examples - test all examples
All - test everything
-
Adding a new regression test:
------------------------------
@@ -59,20 +47,44 @@ Adding a new regression test:
7) run the test normally and verify that it passes:
$ ctest -R mytest
-Troubleshooting a failed test:
+Troubleshooting:
------------------------------
-You can run a single test by passing the test name to ctest:
- $ ctest -R throwntogethertest_sphere
+0. Headless unix servers (no X11)
+
+$ Xvfb :5 -screen 0 800x600x24 &
+$ DISPLAY=:5 ctest
+
+1. Trouble finding libraries
-You can run a series of tests by passing part of a name to ctest:
- $ ctest -R cgalpng # runs all cgalpng tests
- $ ctest -R sphere # runs all sphere tests
-
+ To help CMAKE find eigen2, OpenCSG, CGAL, Boost, and GLEW, you can use
+ the -D option. See CMakeLists.txt for more information. Examples:
+
+ cmake . -DOPENCSG_DIR=~/OpenCSG-1.3.2
+ cmake . -DCGAL_DIR=c:\CGAL-3.7 -DBOOST_DIR=c:\boost_1_46_0
+
+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
Expected results are found in tests/regression/*
Actual results are found in tests/build/testname-output/*
-You can also compile a single test program:
+3. Cross-compiling
+
+Cross-compiling of tests has not been automated nor tested
+
+4. Testing images takes forever, they fail, and it says 'return -11'
+
+Imagemagick may have crashed. You can try using the alternate comparison
+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.
+
+6. Many cgalpngtests are failing with weird assertion errors.
+
+Edit CMakeCache.txt and replace '-DNDEBUG' or '/D NDEBUG' with blank spaces
- $ make cgalpngtest
contact: Jan Huwald // Impressum