Skip to content

Fix tests when CMAKE_BUILD_TYPE is not set

Marco Clemencic requested to merge 326-add-default-build-type into master

As agreed in #326 (closed), I modified the logic used to select the needed reference file variant so that an empty CMAKE_BUILD_TYPE picks up the reference file used for Debug builds (because it is most likely that the difference in the out put comes from the presence or not of -DNDEBUG on the compiler command line).

I also fixed a small bug in !1605 (merged): we were not recording correctly the actual reference file used for the test (done by means of a pytest fixture to avoid duplication).

While fixing the behavior of the tests I realized that a test was enabled for Debug builds, because it depends on NDEBUG. Now it is enabled for empty CMAKE_BUILD_TYPE too.

Closes #326 (closed)

Edited by Marco Clemencic

Merge request reports

Loading