Excerpt |
---|
|
When you run the tests via CMake (which actually runs ctest), you are only told if it passed or failed. After a failure you want to re-run the test and see all of what the test was doing. |
How can I get verbose output when running tests?
Step-by-step guide
When you run the tests via CMake (which actually runs ctest), you are only told if it passed or failed. After a failure you want to re-run the test and see all of what the test was doing.
For example you run the tests first:
Let's assume you see the test "t_bufr_ls" has failed. Now re-run just that test (not everything) with the verbose option:
Code Block |
---|
% ctest -VV -R t_bufr_ls |
The -R option runs tests that match the regular expression.
The -VV switch tells ctest not to suppress its output. Another method is to run all the tests with the "--output-on-failure" option of ctest:
Code Block |
---|
% ctest --output-on-failure |
Now anything which was output by a failing test will be printed. This option can also be enabled by setting the environment variable CTEST_OUTPUT_ON_FAILURE
Related articles
Content by Label |
---|
showLabels | false |
---|
max | 5 |
---|
spaces | ~usa |
---|
showSpace | false |
---|
sort | modified |
---|
reverse | true |
---|
type | page |
---|
cql | label in ("kb-how-to-article","eccodes-faqs","ctest","tests","verbose","debug") and label in ("cmake","ctest","installation") and type = "page" and space = "UDOC" |
---|
labels | kb-how-to-article |
---|
|