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

TestFrameworks: Add Boost.Test support for discovering test cases #746

Merged
merged 10 commits into from
Oct 20, 2020

Conversation

jnohlgard
Copy link
Contributor

@jnohlgard jnohlgard commented Sep 1, 2020

Add heuristics for guessing available test cases for Boost.Test binaries. This uses the symbol naming and namespaces to make a best guess of the available test cases, which works fine as long as the developer is using the boost provided macros for defining test cases and suites. Doing a real detection that covers all corner cases around manually registered tests would pretty much require running the test binary and extracting the list from internals after the program has started.

To do:

  • add unit test
  • remove some debug spam
  • Handle templated test cases (might be affected by -fno-rtti)

@AlexDenisov
Copy link
Member

Doing a real detection that covers all corner cases around manually registered tests would pretty much require running the test binary and extracting the list from internals after the program has started.

There is exactly the same problem with GoogleTest: if it's not a simple or more-or-less simple test, then we are screwed. So far the strategy was to ignore such edge cases, but it may change :)

@AlexDenisov AlexDenisov mentioned this pull request Oct 16, 2020
8 tasks
@AlexDenisov AlexDenisov added this to the v1.0 milestone Oct 16, 2020
@jnohlgard jnohlgard force-pushed the boost-test branch 2 times, most recently from 171bbbc to 22f1ad7 Compare October 20, 2020 12:03
@jnohlgard jnohlgard marked this pull request as ready for review October 20, 2020 13:30
@jnohlgard
Copy link
Contributor Author

I think this is ready for review now.

Copy link
Member

@AlexDenisov AlexDenisov left a comment

Choose a reason for hiding this comment

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

I really like the idea of faking the test framework here. I think this is a great way to adopt more test frameworks in the future, especially if we want to support many versions of the same test framework.
Thank you, @gebart!

@AlexDenisov AlexDenisov merged commit 3611654 into mull-project:master Oct 20, 2020
@jnohlgard
Copy link
Contributor Author

TBH the effort to fake the test framework was a lot bigger than I originally expected. I believe that other frameworks may be lower effort though because, Boost...

@jnohlgard jnohlgard deleted the boost-test branch October 21, 2020 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants