Finding the failure
Note: for this example, we'll use commit 96bcd838.
You build your project and do make check as usual, or you see a failed build in CI. But instead of a success, you get an error:
# make check
[...]
Test project /builds/mpipz/mgx_private/_build/tests
Start 1: attributes
Start 2: cc_index
Start 3: cc_flips
1/3 Test #2: cc_index ......................... Passed 0.01 sec
2/3 Test #1: attributes ....................... Passed 0.02 sec
3/3 Test #3: cc_flips .........................***Failed 0.02 sec
67% tests passed, 1 tests failed out of 3
Total Test time (real) = 0.02 sec
The following tests FAILED:
3 - cc_flips (Failed)
How to test the exact failure?
MorphoGraphX tests are named after a pattern. If test is called cc_flips, then test_cc_flips is the name of the CMake target, and the executable is tests/test_cc_flips in the build directory.
# make test_cc_flips
[...]
[100%] Built target test_cc_flips
# ./tests/test_cc_flips
Running 3 test cases...
/home/dcz/Documents/mgx/mgx_private/tests/CCFlips.cpp(155): error: in "flip_class": check f4 < f5 has failed
/home/dcz/Documents/mgx/mgx_private/tests/CCFlips.cpp(156): error: in "flip_class": check !(f5 < f4) has failed
[...]
*** 11 failures are detected in the test module "Master Test Suite"
Run your test case in a similar way to find errors.
If you can't find your test case, search for its name inside build files.
Writing test cases
TODO
Include the script from ...