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

How to run make test equivilent after buiilding wih scikit build core #830

Closed
shimwell opened this issue Jul 26, 2024 · 3 comments
Closed

Comments

@shimwell
Copy link

I'm attempting to make use of scikit build core on openmc which currently has a two stage build process (cmake and pip)

Currently in the CI the package is build with cmake .. then tested with make test

Is there a way of running the equivalent of this make test command when the package has been built with scikit build core?

@LecrisUT
Copy link
Collaborator

I would first question what is make test supposed to test. If you run it inside the build environment it does not pick up the post installation files (e.g. the python files), and by the time you make it work without it, you end up being able to simply run ctest without scikit-build-core. If you run it outside than you can simply run pip install -e and then do some standard pytest.

My approach is to have both a ctest and a pytest runner that complement each other, rather than trying to maneuver around having everything in one.

@henryiii
Copy link
Collaborator

henryiii commented Jul 26, 2024

I would second that, if you have pure compiled tests, you should probably build outside of scikit-build-core and run those tests. You should also have pytest tests that run with the installed package.

But yes, what you are describing is actually a build target named test, and we support specifying build targets.

@shimwell
Copy link
Author

many thanks for the pointers much appreciated

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