Skip to content

Commit

Permalink
Revert "Switch run_android_wpt to py3"
Browse files Browse the repository at this point in the history
This reverts commit cedeff2.

Reason for revert: dependency on Catapult is reverted

Original change's description:
> Switch run_android_wpt to py3
>
> Bug: 1186789
> Change-Id: I10d4c15a31eb07b8640d27a0919c063dd248e273
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2756969
> Reviewed-by: Dirk Pranke <[email protected]>
> Commit-Queue: Weizhong Xia <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#862530}

Bug: 1186789
Change-Id: I5ce4c4c71f854f3a3ddcefd409fdf0f52b62ccc0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2757455
Bot-Commit: Rubber Stamper <[email protected]>
Commit-Queue: Weizhong Xia <[email protected]>
Cr-Commit-Position: refs/heads/master@{#862604}
  • Loading branch information
WeizhongX authored and Chromium LUCI CQ committed Mar 13, 2021
1 parent 6c2dba3 commit e0b7944
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 41 deletions.
9 changes: 1 addition & 8 deletions .vpython3
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@
# https://chromium.googlesource.com/infra/infra/+/master/doc/users/vpython.md

python_version: "3.8"
# Used by:
# build/android/pylib/local/emulator/avd.py
# components/policy/test_support/policy_testserver.py
wheel: <
name: "infra/python/wheels/protobuf-py2_py3"
version: "version:3.6.1"
>

# TODO(https://crbug.com/898348): Add in necessary wheels as Python3 versions
# become available.
Expand All @@ -40,7 +33,7 @@ wheel: <

# Common utilities.
wheel: <
name: "infra/python/wheels/psutil/${vpython_platform}"
name: "infra/python/wheels/psutil/${platform}_${py_python}_${py_abi}"
version: "version:5.7.2"
>
wheel: <
Expand Down
12 changes: 3 additions & 9 deletions android_webview/test/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,9 @@ python_library("webview_cts_tests") {
data = [ "//android_webview/tools/cts_config/" ]
}

script_test("system_webview_wpt") {
script = "//testing/scripts/run_android_wpt.py"
args = [
"--product=android_webview",
"--webview-provider=apks/SystemWebView.apk",
"--system-webview-shell=apks/SystemWebViewShell.apk",
"--webdriver-binary=clang_x64/chromedriver",
"-v",
]
python_library("system_webview_wpt") {
testonly = true
pydeps_file = "//testing/scripts/run_android_wpt.pydeps"
data_deps = [
"//android_webview:system_webview_apk",
"//android_webview/tools/system_webview_shell:system_webview_shell_layout_test_apk",
Expand Down
11 changes: 3 additions & 8 deletions chrome/android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2949,14 +2949,9 @@ instrumentation_test_runner("trichrome_chrome_bundle_fake_modules_smoke_test") {
_bundle_smoke_test_extra_args + _bundle_fake_modules_smoke_test_extra_args
}

script_test("chrome_public_wpt") {
script = "//testing/scripts/run_android_wpt.py"
args = [
"--product=chrome_android",
"--chrome-apk=apks/ChromePublic.apk",
"--webdriver-binary=clang_x64/chromedriver",
"-v",
]
python_library("chrome_public_wpt") {
testonly = true
pydeps_file = "//testing/scripts/run_android_wpt.pydeps"
data_deps = [
":chrome_public_apk",
"//build/android:test_runner_py",
Expand Down
29 changes: 26 additions & 3 deletions testing/buildbot/gn_isolate_map.pyl
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,14 @@
},
"chrome_public_wpt": {
"label": "//chrome/android:chrome_public_wpt",
"type": "generated_script",
"type": "script",
"script": "//testing/scripts/run_android_wpt.py",
"args": [
"--product=chrome_android",
"--chrome-apk=apks/ChromePublic.apk",
"--webdriver-binary=clang_x64/chromedriver",
"-v",
],
},
"chrome_sandbox": {
"label": "//sandbox/linux:chrome_sandbox",
Expand Down Expand Up @@ -1638,7 +1645,15 @@
},
"system_webview_wpt": {
"label": "//android_webview/test:system_webview_wpt",
"type": "generated_script",
"type": "script",
"script": "//testing/scripts/run_android_wpt.py",
"args": [
"--product=android_webview",
"--webview-provider=apks/SystemWebView.apk",
"--system-webview-shell=apks/SystemWebViewShell.apk",
"--webdriver-binary=clang_x64/chromedriver",
"-v",
],
},
"telemetry_gpu_integration_test": {
"args": [
Expand Down Expand Up @@ -1913,7 +1928,15 @@
},
"weblayer_shell_wpt": {
"label": "//weblayer/shell/android:weblayer_shell_wpt",
"type": "generated_script",
"type": "script",
"script": "//testing/scripts/run_android_wpt.py",
"args": [
"--product=android_weblayer",
"--weblayer-shell=apks/WebLayerShell.apk",
"--weblayer-support=apks/WebLayerSupport.apk",
"--webdriver-binary=clang_x64/chromedriver",
"-v",
],
},
"weblayer_unittests": {
"label": "//weblayer/test:weblayer_unittests",
Expand Down
7 changes: 3 additions & 4 deletions testing/scripts/run_android_wpt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env vpython3
#!/usr/bin/env vpython
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Expand Down Expand Up @@ -120,10 +120,10 @@ def rest_args(self):
rest_args.extend([self.options.wpt_path])

# TODO(crbug.com/1166741): We should be running WPT under Python 3.
rest_args.extend(["--py3"])
rest_args.extend(["--py2"])

# vpython has packages needed by wpt, so force it to skip the setup
rest_args.extend(["--venv=" + SRC_DIR, "--skip-venv-setup"])
rest_args.extend(["--venv=../../", "--skip-venv-setup"])

rest_args.extend(["run",
"--tests=" + wpt_common.EXTERNAL_WPT_TESTS_DIR,
Expand Down Expand Up @@ -177,7 +177,6 @@ def _maybe_build_metadata(self):
self._metadata_dir,
'--additional-expectations',
ANDROID_DISABLED_TESTS,
"--no-process-baselines",
]
metadata_builder_cmd.extend(self._extra_metadata_builder_args())
return common.run_command(metadata_builder_cmd)
Expand Down
12 changes: 3 additions & 9 deletions weblayer/shell/android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -271,15 +271,9 @@ android_apk("weblayer_support_apk") {
shared_libraries = [ "//weblayer:libweblayer_test" ]
}

script_test("weblayer_shell_wpt") {
script = "//testing/scripts/run_android_wpt.py"
args = [
"--product=android_weblayer",
"--weblayer-shell=apks/WebLayerShell.apk",
"--weblayer-support=apks/WebLayerSupport.apk",
"--webdriver-binary=clang_x64/chromedriver",
"-v",
]
python_library("weblayer_shell_wpt") {
testonly = true
pydeps_file = "//testing/scripts/run_android_wpt.pydeps"
data_deps = [
":weblayer_shell_apk",
":weblayer_support_apk",
Expand Down

0 comments on commit e0b7944

Please sign in to comment.