diff --git a/.vpython3 b/.vpython3 index 26bd1e56256b6..f293af5f33c43 100644 --- a/.vpython3 +++ b/.vpython3 @@ -23,6 +23,13 @@ # 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. @@ -33,7 +40,7 @@ wheel: < # Common utilities. wheel: < - name: "infra/python/wheels/psutil/${platform}_${py_python}_${py_abi}" + name: "infra/python/wheels/psutil/${vpython_platform}" version: "version:5.7.2" > wheel: < diff --git a/android_webview/test/BUILD.gn b/android_webview/test/BUILD.gn index 8d3a7bb8bfa43..fd0ee6be8976a 100644 --- a/android_webview/test/BUILD.gn +++ b/android_webview/test/BUILD.gn @@ -27,9 +27,15 @@ python_library("webview_cts_tests") { data = [ "//android_webview/tools/cts_config/" ] } -python_library("system_webview_wpt") { - testonly = true - pydeps_file = "//testing/scripts/run_android_wpt.pydeps" +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", + ] data_deps = [ "//android_webview:system_webview_apk", "//android_webview/tools/system_webview_shell:system_webview_shell_layout_test_apk", diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn index bba12ce84b82d..b5e2d62d0cf92 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn @@ -2960,9 +2960,14 @@ instrumentation_test_runner("trichrome_chrome_bundle_fake_modules_smoke_test") { _bundle_smoke_test_extra_args + _bundle_fake_modules_smoke_test_extra_args } -python_library("chrome_public_wpt") { - testonly = true - pydeps_file = "//testing/scripts/run_android_wpt.pydeps" +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", + ] data_deps = [ ":chrome_public_apk", "//build/android:test_runner_py", diff --git a/testing/buildbot/gn_isolate_map.pyl b/testing/buildbot/gn_isolate_map.pyl index 0f2225b138a6d..0575b06c43185 100644 --- a/testing/buildbot/gn_isolate_map.pyl +++ b/testing/buildbot/gn_isolate_map.pyl @@ -509,14 +509,7 @@ }, "chrome_public_wpt": { "label": "//chrome/android:chrome_public_wpt", - "type": "script", - "script": "//testing/scripts/run_android_wpt.py", - "args": [ - "--product=chrome_android", - "--chrome-apk=apks/ChromePublic.apk", - "--webdriver-binary=clang_x64/chromedriver", - "-v", - ], + "type": "generated_script", }, "chrome_sandbox": { "label": "//sandbox/linux:chrome_sandbox", @@ -1652,15 +1645,7 @@ }, "system_webview_wpt": { "label": "//android_webview/test:system_webview_wpt", - "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", - ], + "type": "generated_script", }, "telemetry_gpu_integration_test": { "args": [ @@ -1935,15 +1920,7 @@ }, "weblayer_shell_wpt": { "label": "//weblayer/shell/android:weblayer_shell_wpt", - "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", - ], + "type": "generated_script", }, "weblayer_unittests": { "label": "//weblayer/test:weblayer_unittests", diff --git a/testing/scripts/run_android_wpt.py b/testing/scripts/run_android_wpt.py index 99815b9578213..ef9713359863b 100755 --- a/testing/scripts/run_android_wpt.py +++ b/testing/scripts/run_android_wpt.py @@ -1,4 +1,4 @@ -#!/usr/bin/env vpython +#!/usr/bin/env vpython3 # 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. @@ -120,10 +120,10 @@ class WPTAndroidAdapter(wpt_common.BaseWptScriptAdapter): rest_args.extend([self.options.wpt_path]) # TODO(crbug.com/1166741): We should be running WPT under Python 3. - rest_args.extend(["--py2"]) + rest_args.extend(["--py3"]) # vpython has packages needed by wpt, so force it to skip the setup - rest_args.extend(["--venv=../../", "--skip-venv-setup"]) + rest_args.extend(["--venv=" + SRC_DIR, "--skip-venv-setup"]) rest_args.extend(["run", "--tests=" + wpt_common.EXTERNAL_WPT_TESTS_DIR, @@ -177,6 +177,7 @@ class WPTAndroidAdapter(wpt_common.BaseWptScriptAdapter): 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) diff --git a/weblayer/shell/android/BUILD.gn b/weblayer/shell/android/BUILD.gn index ac38f00804cb1..afd5e489ce404 100644 --- a/weblayer/shell/android/BUILD.gn +++ b/weblayer/shell/android/BUILD.gn @@ -271,9 +271,15 @@ android_apk("weblayer_support_apk") { shared_libraries = [ "//weblayer:libweblayer_test" ] } -python_library("weblayer_shell_wpt") { - testonly = true - pydeps_file = "//testing/scripts/run_android_wpt.pydeps" +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", + ] data_deps = [ ":weblayer_shell_apk", ":weblayer_support_apk",