Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark all tests as 'notrun' in case of build failure when running CTest #980

Conversation

Morozov-5F
Copy link
Contributor

This changes CTest visible behaviour

The following changes are proposed:

  • Mark all tests as 'notrun' in case of build failure during a CTest run.

The purpose of this change

It can be confusing sometimes that tests are marked as passed when I add new test case into the test code which exercises not yet implemented behaviour. This thing can occur when doing a TDD -- most of the time you end up adding a non-exisiting (yet) function call to the test code and automatically running tests to make sure everything fails as expected. Even though it fails VSCode UI shows that tests are "all green" and it may be confusing.

@Morozov-5F Morozov-5F changed the title Mark all tests as 'notrun' in case of build failure when runnign CTest Mark all tests as 'notrun' in case of build failure when running CTest Dec 25, 2019
@bobbrow bobbrow added this to the 1.3.0 milestone Dec 31, 2019
Copy link
Contributor

@andreeis andreeis left a comment

Choose a reason for hiding this comment

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

Looks good.
One thought for later: maybe mark the tests as not run before the build starts, so that during a long build the CTest button would not reflect the previously passed state. I didn't check what would be needed to be done after the successful build, but if it doesn't happen automatically the 'not run' state of the tests can be reverted back to a run state or eventually a pass state.

@Morozov-5F
Copy link
Contributor Author

Good idea! Propose to make this change in a separate PR.

@bobbrow bobbrow merged commit 5c96734 into microsoft:develop Jan 30, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants