Bug 217650 - REGRESSION(r268267) [webkitpy] Add missing deps for pytest when running webdriver tests
Summary: REGRESSION(r268267) [webkitpy] Add missing deps for pytest when running webdr...
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-10-12 20:35 PDT by Lauro Moura
Modified: 2020-10-16 16:51 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.55 KB, patch)
2020-10-12 20:47 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-10-12 20:35:35 PDT
Sample trace from https://build.webkit.org/builders/GTK-Linux-64-bit-Release-WebDriver-Tests/builds/3122/steps/webdriver-test/logs/stdio:

Using port gtk
Test configuration: <, x86, release>
Using display server xvfb
Using driver at /app/webkit/WebKitBuild/Release/bin/WebKitWebDriver
Browser: MiniBrowser
Parsing expectations
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 pytest
  File "/app/webkit/Tools/Scripts/libraries/autoinstalled/python-2/pytest.py", line 8, in <module>
    from _pytest.assertion import register_assert_rewrite
  File "/app/webkit/Tools/Scripts/libraries/autoinstalled/python-2/_pytest/assertion/__init__.py", line 13, in <module>
    from _pytest.assertion import rewrite
  File "/app/webkit/Tools/Scripts/libraries/autoinstalled/python-2/_pytest/assertion/rewrite.py", line 24, in <module>
    from _pytest.assertion import util
  File "/app/webkit/Tools/Scripts/libraries/autoinstalled/python-2/_pytest/assertion/util.py", line 11, in <module>
    import _pytest._code
  File "/app/webkit/Tools/Scripts/libraries/autoinstalled/python-2/_pytest/_code/__init__.py", line 7, in <module>
    from .code import Code  # noqa
  File "/app/webkit/Tools/Scripts/libraries/autoinstalled/python-2/_pytest/_code/code.py", line 15, in <module>
    import pluggy
  File "/app/webkit/Tools/Scripts/libraries/autoinstalled/python-2/pluggy/__init__.py", line 16, in <module>
    from .manager import PluginManager, PluginValidationError
  File "/app/webkit/Tools/Scripts/libraries/autoinstalled/python-2/pluggy/manager.py", line 11, in <module>
    import importlib_metadata
  File "/app/webkit/Tools/Scripts/libraries/autoinstalled/python-2/importlib_metadata/__init__.py", line 16, in <module>
    from ._compat import (
  File "/app/webkit/Tools/Scripts/libraries/autoinstalled/python-2/importlib_metadata/_compat.py", line 36, in <module>
    import pathlib2 as pathlib
  File "/app/webkit/Tools/Scripts/libraries/autoinstalled/python-2/pathlib2/__init__.py", line 52, in <module>
    from scandir import scandir as os_scandir
ImportError: No module named scandir
program finished with exit code 1
elapsedTime=2.347611
Comment 1 Lauro Moura 2020-10-12 20:47:42 PDT
Created attachment 411195 [details]
Patch

Patch to avoid exceptions when running. Should the scandir autoinstall do some check for versioning?
Comment 2 Jonathan Bedard 2020-10-13 09:07:46 PDT
(In reply to Lauro Moura from comment #1)
> Created attachment 411195 [details]
> Patch
> 
> Patch to avoid exceptions when running. Should the scandir autoinstall do
> some check for versioning?

webkitpy tests would break if scandir couldn't be installed on Python 2, so we don't need to do any version checks here.
Comment 3 EWS 2020-10-13 09:10:24 PDT
Committed r268395: <https://trac.webkit.org/changeset/268395>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 411195 [details].
Comment 4 Radar WebKit Bug Importer 2020-10-13 09:11:21 PDT
<rdar://problem/70254411>