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

marking cpp test targets. #20

Open
aselus-hub opened this issue Oct 29, 2015 · 5 comments
Open

marking cpp test targets. #20

aselus-hub opened this issue Oct 29, 2015 · 5 comments

Comments

@aselus-hub
Copy link

Is there any way to mark tests (whether through ini, filename or otherwise) so that py.test -m=system_test or -m=unittest works with the tests?

@aselus-hub aselus-hub changed the title mark marking cpp test targets. Oct 29, 2015
@nicoddemus
Copy link
Member

Not currently, but I'm open to suggestions. 😄

What's your use case exactly?

@aselus-hub
Copy link
Author

currently the use case would be to mark by feature set, types of tests and target module. i.e.: if i have a camera_lib .so being built from n classes, someone can run all the unittests for camera by running -m="unittest,camera_lib". Or someone can run all RPC interface tests that are marked as rpctest, endtoend and using_camera_lib. we have multiple test types/categories, these are just examples I brainstormed.

@nicoddemus
Copy link
Member

I see, thanks. Out of curiosity, do you use Boost.Python or Google Tests?

One option which is straightforward would be to automatically mark tests with the name of their executable, so all tests collected from camera_lib would have a camera_lib mark. Do you have other suggestions on how you would like to add some other custom marks?

@nrbnlulu
Copy link

nrbnlulu commented Apr 27, 2023

Maybe if we could generate pytest (real) tests and each test would run the cpp test by command line then we could mark tests and have fixtures for them as well.

@nicoddemus
Copy link
Member

@nrbnlulu at runtime you mean? That's a possibility, but would require a significant rewrite of the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants