Skip to content

Enable CTEST_OUTPUT_ON_FAILURE for CMakeMake test_step#2181

Merged
akesandgren merged 1 commit intoeasybuilders:developfrom
Flamefire:ctest_output
Sep 23, 2020
Merged

Enable CTEST_OUTPUT_ON_FAILURE for CMakeMake test_step#2181
akesandgren merged 1 commit intoeasybuilders:developfrom
Flamefire:ctest_output

Conversation

@Flamefire
Copy link
Copy Markdown
Contributor

This allows to see the output of failing tests which might help finding the issue

While being at it: I'd like to provide an easy/easier way to run tests when building with CMake. It really bothers me that we don't test by default with configuremake based ECs (including meson, cmake, ...)

When using CMake the default setting to use is -DBUILD_TESTING=ON, although many projects already set it as default, which enables building the tests. Then you can do make test for makefile generators. Or more generically ctest --build-config <cfg>
So I'm thinking if there should be an option which enables the flag and the test or if a set runtest should automatically add the flag. I think using the ctest command would required adding build_type to iteratable options but that would be a good idea anyway

Copy link
Copy Markdown
Contributor

@akesandgren akesandgren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@akesandgren
Copy link
Copy Markdown
Contributor

And your ideas regarding testing looks sane. The problem with runtest only is that it might be overridden.

@akesandgren
Copy link
Copy Markdown
Contributor

Going in, thanks @Flamefire!

@akesandgren akesandgren merged commit 47013b4 into easybuilders:develop Sep 23, 2020
@Flamefire Flamefire deleted the ctest_output branch September 23, 2020 11:20
@boegel boegel changed the title Enable CTEST_OUTPUT_ON_FAILURE for CMake test_step Enable CTEST_OUTPUT_ON_FAILURE for CMakeMake test_step Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants