Skip to content

Commit

Permalink
[rb] Support running Ruby tests in RBE for Chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
p0deje committed Mar 11, 2024
1 parent a66db94 commit eae8507
Show file tree
Hide file tree
Showing 29 changed files with 246 additions and 334 deletions.
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ build:remote --remote_cache=grpcs://gypsum.cluster.engflow.com
build:remote -j 50

# Build Without The Bytes
build:remote --remote_download_outputs=minimal
build:remote --remote_download_minimal

build:remote --define=EXECUTOR=remote
build:remote --experimental_inmemory_dotd_files
Expand Down
3 changes: 3 additions & 0 deletions .skipped-tests
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@
-//py:test-chrome-test/selenium/webdriver/chrome/chrome_service_tests.py
-//py:test-chrome-test/selenium/webdriver/chrome/proxy_tests.py
-//py:unit-test/unit/selenium/webdriver/common/cdp_module_fallback_tests.py
-//rb/spec/integration/selenium/webdriver/chrome:service
-//rb/spec/integration/selenium/webdriver/edge:service
-//rb/spec/integration/selenium/webdriver/firefox:service
83 changes: 80 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,9 @@ pin_browsers()

http_archive(
name = "rules_ruby",
sha256 = "9bfab76e1272dae72355c65cc858ede68b659716381485baa4c8e7a70ddc38a6",
strip_prefix = "rules_ruby-0.5.0",
url = "https://github.com/bazel-contrib/rules_ruby/releases/download/v0.5.0/rules_ruby-v0.5.0.tar.gz",
sha256 = "9ff781fd8180c2be8b3ab0f16d1d88d618c3b1bc4d502dcb914591886da40014",
strip_prefix = "rules_ruby-0.8.1",
url = "https://github.com/bazel-contrib/rules_ruby/releases/download/v0.8.1/rules_ruby-v0.8.1.tar.gz",
)

load(
Expand All @@ -367,6 +367,83 @@ rb_bundle_fetch(
"//:rb/selenium-devtools.gemspec",
"//:rb/selenium-webdriver.gemspec",
],
gem_checksums = {
"abbrev-0.1.2": "ad1b4eaaaed4cb722d5684d63949e4bde1d34f2a95e20db93aecfe7cbac74242",
"activesupport-7.1.3": "fbfc137f1ab0e3909bd3de3e2a965245abf0381a2a7e283fa766cee6f5e0f927",
"addressable-2.8.6": "798f6af3556641a7619bad1dce04cdb6eb44b0216a991b0396ea7339276f2b47",
"ast-2.4.2": "1e280232e6a33754cde542bc5ef85520b74db2aac73ec14acef453784447cc12",
"base64-0.2.0": "0f25e9b21a02a0cc0cea8ef92b2041035d39350946e8789c562b2d1a3da01507",
"bigdecimal-3.1.6": "bcbc27d449cf8ed1b1814d21308f49c9d22ce73e33fff0d228e38799c02eab01",
"bigdecimal-3.1.6-java": "2ef0e13a578e2411123254273f8b34c47ff9d45de91a6f64465fb217de8d5d04",
"concurrent-ruby-1.2.3": "82fdd3f8a0816e28d513e637bb2b90a45d7b982bdf4f3a0511722d2e495801e2",
"connection_pool-2.4.1": "0f40cf997091f1f04ff66da67eabd61a9fe0d4928b9a3645228532512fab62f4",
"crack-1.0.0": "c83aefdb428cdc7b66c7f287e488c796f055c0839e6e545fec2c7047743c4a49",
"csv-3.2.8": "2f5e11e8897040b97baf2abfe8fa265b314efeb8a9b7f756db9ebcf79e7db9fe",
"debug-1.9.1": "86f1a6d4a299184f1a1f7ae4c2fe80f178beed55cdf608f83b49d7bdefa3ffda",
"diff-lcs-1.5.1": "273223dfb40685548436d32b4733aa67351769c7dea621da7d9dd4813e63ddfe",
"drb-2.2.0": "e9e4af1cded3306cfe37e064a0086e302d5f40df9cb4d161d059a6bb3a75d40f",
"ffi-1.16.3": "6d3242ff10c87271b0675c58d68d3f10148fabc2ad6da52a18123f06078871fb",
"ffi-1.16.3-x64-mingw32": "6ec709011e3955e97033fa77907a8ab89a9150137d4c45c82c77399b909c9259",
"fileutils-1.7.2": "36a0fb324218263e52b486ad7408e9a295378fe8edc9fd343709e523c0980631",
"git-1.19.1": "b0a422d9f6517353c48a330d6114de4db9e0c82dbe7202964a1d9f1fbc827d70",
"hashdiff-1.1.0": "b5465f0e7375f1ee883f53a766ece4dbc764b7674a7c5ffd76e79b2f5f6fc9c9",
"i18n-1.14.1": "9d03698903547c060928e70a9bc8b6b87fda674453cda918fc7ab80235ae4a61",
"io-console-0.7.2": "f0dccff252f877a4f60d04a4dc6b442b185ebffb4b320ab69212a92b48a7a221",
"io-console-0.7.2-java": "73aa382f8832b116613ceaf57b8ff5bf73dfedcaf39f0aa5420e10f63a4543ed",
"irb-1.11.2": "a05f07e81d32dc79d78b0019283b9877463da0d40253774d1fe89f9586ae1cb9",
"jar-dependencies-0.4.1": "b2df2f1ecbff15334ce20ea7fdd5b8d8161faab67761ff72c7647d728e40d387",
"json-2.7.1": "187ea312fb58420ff0c40f40af1862651d4295c8675267c6a1c353f1a0ac3265",
"json-2.7.1-java": "bfd628c0f8357058c2cf848febfa6f140f70f94ec492693a31a0a1933038a61b",
"language_server-protocol-3.17.0.3": "3d5c58c02f44a20d972957a9febe386d7e7468ab3900ce6bd2b563dd910c6b3f",
"listen-3.8.0": "9679040ac6e7845ad9f19cf59ecde60861c78e2fae57a5c20fe35e94959b2f8f",
"logger-1.6.0": "0ab7c120262dd8de2a18cb8d377f1f318cbe98535160a508af9e7710ff43ef3e",
"minitest-5.22.2": "c5a5003fc2114a3fde506e87f377f32a0882b41d944d7b90cf4cd1f781dbc718",
"mutex_m-0.2.0": "b6ef0c6c842ede846f2ec0ade9e266b1a9dac0bc151682b04835e8ebd54840d5",
"parallel-1.24.0": "5bf38efb9b37865f8e93d7a762727f8c5fc5deb19949f4040c76481d5eee9397",
"parser-3.3.0.5": "7748313e505ca87045dc0465c776c802043f777581796eb79b1654c5d19d2687",
"psych-5.1.2": "337322f58fc2bf24827d2b9bd5ab595f6a72971867d151bb39980060ea40a368",
"psych-5.1.2-java": "1dd68dc609eddbc884e6892e11da942e16f7256bd30ebde9d35449d43043a6fe",
"public_suffix-5.0.4": "35cd648e0d21d06b8dce9331d19619538d1d898ba6d56a6f2258409d2526d1ae",
"racc-1.7.3": "b785ab8a30ec43bce073c51dbbe791fd27000f68d1c996c95da98bf685316905",
"racc-1.7.3-java": "b2ad737e788cfa083263ce7c9290644bb0f2c691908249eb4f6eb48ed2815dbf",
"rack-2.2.8": "7b83a1f1304a8f5554c67bc83632d29ecd2ed1daeb88d276b7898533fde22d97",
"rainbow-3.1.1": "039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a",
"rake-13.1.0": "be6a3e1aa7f66e6c65fa57555234eb75ce4cf4ada077658449207205474199c6",
"rb-fsevent-0.11.2": "43900b972e7301d6570f64b850a5aa67833ee7d87b458ee92805d56b7318aefe",
"rb-inotify-0.10.1": "050062d4f31d307cca52c3f6a7f4b946df8de25fc4bd373e1a5142e41034a7ca",
"rbs-3.4.4": "1376d2604a00832641bb47521595e63a1c0d1cc241ded383ba48ddb4396de5a8",
"rchardet-1.8.0": "693acd5253d5ade81a51940697955f6dd4bb2f0d245bda76a8e23deec70a52c7",
"rdoc-6.6.2": "f763dbec81079236bcccded19d69680471bd55da8f731ea6f583d019dacd9693",
"regexp_parser-2.9.0": "81a00ba141cec0d4b4bf58cb80cd9193e5180836d3fa6ef623f7886d3ba8bdd9",
"reline-0.4.2": "14042962b71d4cf52cc7d348f411886e2df54fc9d434d69b0b0bff84786d1c3a",
"rexml-3.2.6": "e0669a2d4e9f109951cb1fde723d8acd285425d81594a2ea929304af50282816",
"rspec-3.13.0": "d490914ac1d5a5a64a0e1400c1d54ddd2a501324d703b8cfe83f458337bab993",
"rspec-core-3.13.0": "557792b4e88da883d580342b263d9652b6a10a12d5bda9ef967b01a48f15454c",
"rspec-expectations-3.13.0": "621d48c62262f955421eaa418130744760802cad47e781df70dba4d9f897102e",
"rspec-mocks-3.13.0": "735a891215758d77cdb5f4721fffc21078793959d1f0ee4a961874311d9b7f66",
"rspec-support-3.13.0": "0e725f53b8c20ce75913a5da7bf06bf90698266951f3b1e3ae7bcd9612775257",
"rubocop-1.60.2": "000da0bffba2da48efdab233b13085afc3fabad2aa17ef0470cbaa0fd7cbc76c",
"rubocop-ast-1.30.0": "faad6452b1018fee0dd9e21a44445908e94ee2a4435932a9dae0e0740b6349b3",
"rubocop-capybara-2.20.0": "2a6844b942921f230ee3ab8c94fe77f41a9406096a140245270c0e11624bb938",
"rubocop-factory_bot-2.25.1": "62751bde7af789878b8a31cbd2a82e69515ce7b23a2ad1820cb0fcc3e0150134",
"rubocop-performance-1.20.2": "1bb1fa8c427fac7ba3c8dd2decb9860f23cb2d6c40350bedc88538de8875c731",
"rubocop-rspec-2.26.1": "da00a2794c35c6df9d013621fe9d8340ef9717dba746eb4aa69f414d86e74458",
"ruby-progressbar-1.13.0": "80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33",
"ruby2_keywords-0.0.5": "ffd13740c573b7301cf7a2e61fc857b2a8e3d3aff32545d6f8300d8bae10e3ef",
"rubyzip-2.3.2": "3f57e3935dc2255c414484fbf8d673b4909d8a6a57007ed754dde39342d2373f",
"securerandom-0.3.1": "98f0450c0ea46d2f9a4b6db4f391dbd83dc08049592eada155739f40e0341bde",
"steep-1.5.3": "7c6302a4d5932d0a46176ebc79766e52b853c223a85525aa2f8911e345123b85",
"stringio-3.1.0": "c1f6263ae03a15025e51194ab19b06b15e06adcaaedb7f5f6c06ab60f5d67718",
"strscan-3.1.0": "01b8a81d214fbf7b5308c6fb51b5972bbfc4a6aa1f166fd3618ba97e0fcd5555",
"strscan-3.1.0-java": "8645aa76e017e21764c6df572d2d79fcc1672284014f5bdbd806278cdbcd11b0",
"terminal-table-3.0.2": "f951b6af5f3e00203fb290a669e0a85c5dd5b051b3b023392ccfd67ba5abae91",
"tzinfo-2.0.6": "8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b",
"unicode-display_width-2.5.0": "7e7681dcade1add70cb9fda20dd77f300b8587c81ebbd165d14fd93144ff0ab4",
"webmock-3.21.0": "6609ab365daa85d203fcc297d1fffdbc8fc4216308b7c77d620af7d1261e2fd2",
"webrick-1.8.1": "19411ec6912911fd3df13559110127ea2badd0c035f7762873f58afc803e158f",
"websocket-1.2.10": "2cc1a4a79b6e63637b326b4273e46adcddf7871caa5dc5711f2ca4061a629fa8",
"yard-0.9.36": "5505736c1b00c926f71053a606ab75f02070c5960d0778b901fe9d8b0a470be4",
},
gemfile = "//:rb/Gemfile",
gemfile_lock = "//:rb/Gemfile.lock",
)
Expand Down
1 change: 1 addition & 0 deletions common/src/web/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ filegroup(
"//java/test/org/openqa/selenium/environment:__pkg__",
"//javascript/node/selenium-webdriver:__pkg__",
"//py:__pkg__",
"//rb/spec:__subpackages__",
],
)
42 changes: 0 additions & 42 deletions rb/spec/integration/configuration.bzl

This file was deleted.

49 changes: 10 additions & 39 deletions rb/spec/integration/selenium/webdriver/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
load("@rules_ruby//ruby:defs.bzl", "rb_library", "rb_test")
load("//rb/spec/integration:configuration.bzl", "ENV", "TAGS")

package(default_visibility = ["//rb:__subpackages__"])
load("@rules_ruby//ruby:defs.bzl", "rb_library")
load("//rb/spec:tests.bzl", "rb_integration_test")

rb_library(
name = "spec_helper",
Expand All @@ -18,6 +16,7 @@ rb_library(
"//rb/spec/integration:remote": ["//java/src/org/openqa/selenium/grid:selenium_server_deploy.jar"],
"//conditions:default": [],
}),
visibility = ["//rb/spec:__subpackages__"],
deps = [
"//rb/lib:selenium-webdriver",
"//rb/lib/selenium:devtools",
Expand All @@ -39,16 +38,10 @@ rb_library(
)

[
rb_test(
rb_integration_test(
name = file[:-8],
size = "large",
srcs = [file],
args = ["rb/spec/"],
env = ENV,
main = "@bundle//bin:rspec",
tags = TAGS,
deps = [
":spec_helper",
"//rb/lib/selenium/webdriver:common",
],
)
Expand All @@ -63,46 +56,30 @@ rb_library(
)
]

rb_test(
rb_integration_test(
name = "bidi",
size = "large",
srcs = ["bidi_spec.rb"],
args = ["rb/spec/"],
env = ENV,
main = "@bundle//bin:rspec",
tags = TAGS + ["exclusive-if-local"],
tags = ["exclusive-if-local"],
deps = [
":spec_helper",
"//rb/lib/selenium/devtools",
"//rb/lib/selenium/webdriver:bidi",
],
)

rb_test(
rb_integration_test(
name = "devtools",
size = "large",
srcs = ["devtools_spec.rb"],
args = ["rb/spec/"],
env = ENV,
main = "@bundle//bin:rspec",
tags = TAGS + ["exclusive-if-local"],
tags = ["exclusive-if-local"],
deps = [
":spec_helper",
"//rb/lib/selenium/devtools",
"//rb/lib/selenium/webdriver:bidi",
],
)

rb_test(
rb_integration_test(
name = "driver",
size = "large",
srcs = ["driver_spec.rb"],
args = ["rb/spec/"],
env = ENV,
main = "@bundle//bin:rspec",
tags = TAGS,
deps = [
":spec_helper",
"//rb/lib/selenium/webdriver:chrome",
"//rb/lib/selenium/webdriver:edge",
"//rb/lib/selenium/webdriver:firefox",
Expand All @@ -112,16 +89,10 @@ rb_test(
],
)

rb_test(
rb_integration_test(
name = "element",
size = "large",
srcs = ["element_spec.rb"],
args = ["rb/spec/"],
env = ENV,
main = "@bundle//bin:rspec",
tags = TAGS,
deps = [
":spec_helper",
"//rb/lib/selenium/webdriver:chrome",
"//rb/lib/selenium/webdriver:edge",
"//rb/lib/selenium/webdriver:firefox",
Expand Down
14 changes: 3 additions & 11 deletions rb/spec/integration/selenium/webdriver/bidi/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
load("@rules_ruby//ruby:defs.bzl", "rb_test")
load("//rb/spec/integration:configuration.bzl", "ENV", "TAGS")

package(default_visibility = ["//rb:__subpackages__"])
load("//rb/spec:tests.bzl", "rb_integration_test")

[
rb_test(
rb_integration_test(
name = file[:-8],
size = "large",
srcs = [file],
args = ["rb/spec/"],
env = ENV,
main = "@bundle//bin:rspec",
tags = TAGS + ["exclusive-if-local"],
tags = ["exclusive-if-local"],
deps = [
"//rb/lib/selenium/devtools",
"//rb/lib/selenium/webdriver:bidi",
"//rb/spec/integration/selenium/webdriver:spec_helper",
],
)
for file in glob(["*_spec.rb"])
Expand Down
17 changes: 3 additions & 14 deletions rb/spec/integration/selenium/webdriver/chrome/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
load("@rules_ruby//ruby:defs.bzl", "rb_test")
load("//rb/spec/integration:configuration.bzl", "ENV", "TAGS")

package(default_visibility = ["//rb:__subpackages__"])
load("//rb/spec:tests.bzl", "rb_integration_test")

[
rb_test(
rb_integration_test(
name = file[:-8],
size = "large",
srcs = [file],
args = ["rb/spec/"],
env = ENV,
main = "@bundle//bin:rspec",
tags = TAGS,
deps = [
"//rb/lib/selenium/webdriver:chrome",
"//rb/spec/integration/selenium/webdriver:spec_helper",
],
deps = ["//rb/lib/selenium/webdriver:chrome"],
)
for file in glob(["*_spec.rb"])
]
17 changes: 3 additions & 14 deletions rb/spec/integration/selenium/webdriver/edge/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
load("@rules_ruby//ruby:defs.bzl", "rb_test")
load("//rb/spec/integration:configuration.bzl", "ENV", "TAGS")

package(default_visibility = ["//rb:__subpackages__"])
load("//rb/spec:tests.bzl", "rb_integration_test")

[
rb_test(
rb_integration_test(
name = file[:-8],
size = "large",
srcs = [file],
args = ["rb/spec/"],
env = ENV,
main = "@bundle//bin:rspec",
tags = TAGS,
deps = [
"//rb/lib/selenium/webdriver:edge",
"//rb/spec/integration/selenium/webdriver:spec_helper",
],
deps = ["//rb/lib/selenium/webdriver:edge"],
)
for file in glob(["*_spec.rb"])
]
17 changes: 3 additions & 14 deletions rb/spec/integration/selenium/webdriver/firefox/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
load("@rules_ruby//ruby:defs.bzl", "rb_test")
load("//rb/spec/integration:configuration.bzl", "ENV", "TAGS")

package(default_visibility = ["//rb:__subpackages__"])
load("//rb/spec:tests.bzl", "rb_integration_test")

[
rb_test(
rb_integration_test(
name = file[:-8],
size = "large",
srcs = [file],
args = ["rb/spec/"],
env = ENV,
main = "@bundle//bin:rspec",
tags = TAGS,
deps = [
"//rb/lib/selenium/webdriver:firefox",
"//rb/spec/integration/selenium/webdriver:spec_helper",
],
deps = ["//rb/lib/selenium/webdriver:firefox"],
)
for file in glob(["*_spec.rb"])
]
17 changes: 3 additions & 14 deletions rb/spec/integration/selenium/webdriver/remote/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
load("@rules_ruby//ruby:defs.bzl", "rb_test")
load("//rb/spec/integration:configuration.bzl", "ENV", "TAGS")

package(default_visibility = ["//rb:__subpackages__"])
load("//rb/spec:tests.bzl", "rb_integration_test")

[
rb_test(
rb_integration_test(
name = file[:-8],
size = "large",
srcs = [file],
args = ["rb/spec/"],
env = ENV,
main = "@bundle//bin:rspec",
tags = TAGS,
deps = [
"//rb/lib/selenium/webdriver:remote",
"//rb/spec/integration/selenium/webdriver:spec_helper",
],
deps = ["//rb/lib/selenium/webdriver:remote"],
)
for file in glob(["*_spec.rb"])
]
Loading

0 comments on commit eae8507

Please sign in to comment.