Bug 216879 - REGRESSION(r267368) [webkitpy] autoinstalled pytest raises ImportError in run-webdriver-tests
Summary: REGRESSION(r267368) [webkitpy] autoinstalled pytest raises ImportError in run...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Lauro Moura
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-09-23 07:24 PDT by Lauro Moura
Modified: 2020-09-23 08:58 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.76 KB, patch)
2020-09-23 07:35 PDT, Lauro Moura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lauro Moura 2020-09-23 07:24:53 PDT
After r267368, run-webdriver-tests fails with the following trace:

Traceback (most recent call last):
  File "/app/webkit/Tools/Scripts/run-webdriver-tests", line 85, in <module>
    runner.run(args)
  File "/app/webkit/Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py", line 70, in run
    runner_tests = [runner.collect_tests(tests) for runner in self._runners]
  File "/app/webkit/Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py", line 51, in collect_tests
    executor = WebDriverSeleniumExecutor(self._driver, self._env)
  File "/app/webkit/Tools/Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py", line 57, in __init__
    do_delayed_imports()
  File "/app/webkit/Tools/Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py", line 35, in do_delayed_imports
    import webkitpy.webdriver_tests.pytest_runner as pytest_runner
  File "/app/webkit/Tools/Scripts/webkitpy/webdriver_tests/pytest_runner.py", line 32, in <module>
    import webkitpy.thirdparty.autoinstalled.pytest
  File "/app/webkit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/pytest.py", line 9, in <module>
    from _pytest.config import main, UsageError, cmdline, hookspec, hookimpl
  File "/app/webkit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/_pytest/config/__init__.py", line 10, in <module>
    import py
ImportError: No module named py

Likely because WebDriver's pytest relied on mozlog/mozprocess calls to `self._ensure_autoinstalled_dir_is_in_sys_path()` to inject the autoinstalled path.
Comment 1 Lauro Moura 2020-09-23 07:35:49 PDT
Created attachment 409473 [details]
Patch
Comment 2 Jonathan Bedard 2020-09-23 08:28:49 PDT
Comment on attachment 409473 [details]
Patch

Sorry I broke this!
Comment 3 EWS 2020-09-23 08:57:17 PDT
Committed r267478: <https://trac.webkit.org/changeset/267478>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 409473 [details].
Comment 4 Radar WebKit Bug Importer 2020-09-23 08:58:17 PDT
<rdar://problem/69438604>