blob: 26000c6ad007b367bfc96cdde161b92837325990 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
Running regression tests:
-------------------------
Prerequisites: cmake, python
cd tests
mkdir build
cd build
cmake ..
make
make test
Adding a new regression test:
------------------------------
1) create a test file at an appropriate location under testdata/
2) if the test is non-obvious, create a human readable description of the test in the same directory (e.g testdata/scad/mytest.txt)
3) if a new test app was written, this must be added to tests/CMakeLists.txt
4) Add the tests to the test apps for which you want them to run (in tests/CMakeLists.txt)
5) run the test with the environment variable TEST_GENERATE=1, e.g.:
$ TEST_GENERATE=1 ctest -R mytest
(this will generate a mytest-expected.txt file which is used for regression testing)
6) manually verify that the output is correct (tests/regression/<testapp>/mytest-expected.<suffix>)
7) run the test normally and verify that it passes:
$ ctest -R mytest
Note that test files which don't have an *-expected.<suffix> file will
be ignored for the test apps in question.
Troubleshooting a failed test:
------------------------------
You can run a single test by running
$ ctest -R testname
You can run a series by running
$ ctest -R cgalpng # runs all cgalpng tests
$ ctest -R sphere # runs all sphere tests
Logs of test runs are found in tests/build/Testing/Temporary
Expected results are found in tests/regression/*
Actual results are found in tests/build/testname-output/*
|