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

Custom test runner to avoid linking libpython #77

Open
gatesn opened this issue Sep 12, 2023 · 0 comments
Open

Custom test runner to avoid linking libpython #77

gatesn opened this issue Sep 12, 2023 · 0 comments

Comments

@gatesn
Copy link
Contributor

gatesn commented Sep 12, 2023

Currently we link libpython in order to run Zig tests that spawn python.
We then launch these Zig tests from Pytest in order to run all tests together.

This proposal is to invert the control flow by building a custom Zig test runner that gets built as a shared library. This library is then loaded into Pytest as a native extension and executed that way.

This means we can use Pythons that have been statically linked to libpython, and our startup time is probably faster. We should probably still fork/exec in order to isolate segfaults though.

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

1 participant