Skip to content

Commit e7416fe

Browse files
authored
[py]: enable chrome beta tests for CI-RBE (#16125)
1 parent 66e4787 commit e7416fe

File tree

2 files changed

+47
-2
lines changed

2 files changed

+47
-2
lines changed

py/BUILD.bazel

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,8 @@ BIDI_TESTS = glob(["test/selenium/webdriver/common/**/*bidi*_tests.py"])
441441
"test/selenium/webdriver/common/**/*.py",
442442
"test/selenium/webdriver/support/**/*.py",
443443
],
444-
exclude = BIDI_TESTS + ["test/selenium/webdriver/common/print_pdf_tests.py"],
444+
exclude = BIDI_TESTS + ["test/selenium/webdriver/common/print_pdf_tests.py"] +
445+
(["test/selenium/webdriver/common/devtools_tests.py"] if browser == "chrome-beta" else []),
445446
),
446447
args = [
447448
"--instafail",
@@ -467,7 +468,8 @@ BIDI_TESTS = glob(["test/selenium/webdriver/common/**/*bidi*_tests.py"])
467468
"test/selenium/webdriver/common/**/*.py",
468469
"test/selenium/webdriver/support/**/*.py",
469470
],
470-
exclude = ["test/selenium/webdriver/common/print_pdf_tests.py"],
471+
exclude = ["test/selenium/webdriver/common/print_pdf_tests.py"] +
472+
(["test/selenium/webdriver/common/devtools_tests.py"] if browser == "chrome-beta" else []),
471473
),
472474
args = [
473475
"--instafail",
@@ -534,6 +536,29 @@ py_test_suite(
534536
] + TEST_DEPS,
535537
)
536538

539+
py_test_suite(
540+
name = "test-chrome-beta",
541+
size = "large",
542+
srcs = glob(
543+
[
544+
"test/selenium/webdriver/chrome/**/*.py",
545+
],
546+
),
547+
args = [
548+
"--instafail",
549+
] + BROWSERS["chrome-beta"]["args"],
550+
data = BROWSERS["chrome-beta"]["data"],
551+
env_inherit = ["DISPLAY"],
552+
tags = [
553+
"no-sandbox",
554+
] + BROWSERS["chrome-beta"]["tags"],
555+
deps = [
556+
":init-tree",
557+
":selenium",
558+
":webserver",
559+
] + TEST_DEPS,
560+
)
561+
537562
py_test_suite(
538563
name = "test-edge",
539564
size = "large",

py/private/browsers.bzl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
load(
22
"//common:browsers.bzl",
33
"COMMON_TAGS",
4+
"chrome_beta_data",
45
"chrome_data",
56
"edge_data",
67
"firefox_data",
@@ -27,6 +28,20 @@ chrome_args = select({
2728
"//conditions:default": [],
2829
}) + headless_args
2930

31+
chrome_beta_args = select({
32+
"@selenium//common:use_pinned_linux_chrome": [
33+
"--driver-binary=$(location @linux_beta_chromedriver//:chromedriver)",
34+
"--browser-binary=$(location @linux_beta_chrome//:chrome-linux64/chrome)",
35+
"--browser-args=--disable-dev-shm-usage",
36+
"--browser-args=--no-sandbox",
37+
],
38+
"@selenium//common:use_pinned_macos_chrome": [
39+
"--driver-binary=$(location @mac_beta_chromedriver//:chromedriver)",
40+
"--browser-binary=$(location @mac_beta_chrome//:Chrome.app)/Contents/MacOS/Chrome",
41+
],
42+
"//conditions:default": [],
43+
}) + headless_args
44+
3045
edge_args = select({
3146
"@selenium//common:use_pinned_linux_edge": [
3247
"--driver-binary=$(location @linux_edgedriver//:msedgedriver)",
@@ -59,6 +74,11 @@ BROWSERS = {
5974
"data": chrome_data,
6075
"tags": COMMON_TAGS + ["chrome"],
6176
},
77+
"chrome-beta": {
78+
"args": ["--driver=chrome"] + chrome_beta_args,
79+
"data": chrome_beta_data,
80+
"tags": COMMON_TAGS + ["chrome"],
81+
},
6282
"edge": {
6383
"args": ["--driver=edge"] + edge_args,
6484
"data": edge_data,

0 commit comments

Comments
 (0)