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

TST Improve xbuildenv and emscripten mocks #4741

Merged
merged 8 commits into from
May 22, 2024

Conversation

ryanking13
Copy link
Member

Description

The goal of this PR is to reduce the dependency on pyodide for testing pyodide-build. The main changes are:

  1. Add a new fixture: mock_emscripten for mocking emscripten compiler toolchain. This fixture will create a dummy emcc (+ other toolchains) to the PATH. When running tests, all emcc calls will be intercepted by this command.

  2. Improve xbuildenv fixture. Previously, this fixture actually created an xbuildenv from the Pyodide artifacts. So, we had to have Pyodide already built before running the tests. In this PR, this fixture now uses a pre-built minimum xbuildenv.

As a result, now all tests in pyodide-build run without building Pyodide. The only exception is test_xbuildenv_create which test pyodide xbuildenv create command. In a follow-up, I am planning to migrate the provide venv tests, which are in test_cmdline_runner.py.

Checklists

  • Add / update tests

Copy link
Member

@hoodmane hoodmane left a comment

Choose a reason for hiding this comment

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

Thanks @ryanking13!

@hoodmane hoodmane merged commit c3d1eff into pyodide:main May 22, 2024
43 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants