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

Manage venv in a more consistent way in tools/wpt/tests #24829

Open
Hexcles opened this issue Jul 31, 2020 · 0 comments
Open

Manage venv in a more consistent way in tools/wpt/tests #24829

Hexcles opened this issue Jul 31, 2020 · 0 comments

Comments

@Hexcles
Copy link
Member

Hexcles commented Jul 31, 2020

This is from #24813 (comment)

There are currently at least three different ways venvs are set up:

  1. tools/wpt/tox.ini creates a venv itself that contains the dependencies to run some tests. This kind of defeats the purpose of integration tests as we are not managing the venv in the same way as the wpt command and could hide issues like [DO NOT SUBMIT] Reproduce MacOS + Py3.8 mozinstall failure #24813 .
  2. test_install.py etc. invokes wpt.main which uses the top-level _venv*. This is problematic as we either leak states across tests or purge the top-level venv (slowing down real commands).
  3. test_run.py etc. creates a fresh venv in a temporary directory and passes it to the command functions. This is largely a dummy venv with no-op install methods to test setup_wptrunner.

Maybe we should use a hybrid of 2 and 3: creating a temporary venv and passing it to wpt.main. tox.ini should then only contain dependencies needed by the unit tests themselves, not the wpt commands.

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

No branches or pull requests

1 participant