CTest: Failure to detect a build error
Bug description
When making a build driven by CTest with ninja as generator and CDash as the results dashboard, we encountered a case when the build would fail, but the build results on CDash would not mention the failure.
The <build dir>/Testing/<TAG>/Build.xml
file, generated by CTest and sent to CDash, does not contain anything related to the error. It only mentions some unrelated warnings, which CTest and CDash treat as they should.
However, there is also a <build dir>/Testing/Temporary/LastBuild_<TAG>.log
file which does contain information on the error. If I make no mistake, this file contains the raw output of the ninja invocation, which CTest uses as input to detect build events I guess.
It therefore seems reasonable to think that CTest fails to properly analyze ninja's output and misses the error. If that is the case, could you please correct this in CTest, else tell me what may be going wrong?
Technical details
The error in question is very likely an out of memory problem which prevents a large compilation unit to be processed.
Here is the relavant section of the <build dir>/Testing/Temporary/LastBuild_<TAG>.log
file (I have removed some references to file paths):
(...)
[2701/3092] Building CXX object binaryldi/plugins/BinaryLDI/CMakeFiles/BinaryLDI.dir/engines/binaryldiextrusion.cpp.o
[2702/3092] Building CXX object SofaVDB/SofaVDB/CMakeFiles/SofaVDB.dir/VDBImageFilter.cpp.o
FAILED: SofaVDB/SofaVDB/CMakeFiles/SofaVDB.dir/VDBImageFilter.cpp.o
/home/<redacted>/ccache_g++.sh -DQT_NO_SIGNALS_SLOTS_KEYWORDS -DSOFA_BUILD_SOFAVDB -DSofaVDB_EXPORTS -Iinclude <redacted> -isystem /usr/include/python2.7 -fsanitize=address -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -Wall -W -O3 -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC -DSOFA_BUILD_SOFAVDB -DSOFA_HAVE_SOFAPYTHON -pthread -std=gnu++14 -MD <redacted>
g++-8: fatal error: Killed signal terminated program cc1plus
compilation terminated.
[2703/3092] Building CXX object SofaVDB/SofaVDB/CMakeFiles/SofaVDB.dir/VDBImageVolume.cpp.o
[2704/3092] Building CXX object SofaVDB/SofaVDB/CMakeFiles/SofaVDB.dir/VDBWaxEngine.cpp.o
(...)