colcon / colcon-cmake

Extension for colcon to support CMake packages
http://colcon.readthedocs.io
Apache License 2.0
16 stars 25 forks source link

CTest result files are not in --test-result-base #79

Closed cottsay closed 3 years ago

cottsay commented 4 years ago

Example:

colcon build --test-result-base test_results
colcon test --test-result-base test_results
colcon test-result --test-result-base test_results --all --result-files-only

Expected behavior would be that the CTest Test.xml results from any ctest invocations would be printed. However, those files ended up in the --build-base. This seems to contradict the explicit purpose of --test-result-base, "the base path for all test results".

From the example above, if you run colcon test-result --all --result-files-only so that --test-result-base defaults to be the same as --build-base, the paths to the CTest Test.xml results are printed as expected.

dirk-thomas commented 4 years ago

I am not aware of any way to instruct ctest to place the generated files into a different folder than the build dir. If there is no such option we could copy / symlink th files after the tests finished.

Aposhian commented 3 years ago

The merged PR copies the CTest result Test.xml, but does not copy *xunit.xml files over. This is confusing, since the documentation says that --test-result-base specifies "The base path for all test results."