Skip to content

Commit

Permalink
[build] implement bazel targets for running ruby tests with BiDi
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Jun 5, 2024
1 parent 44a00c8 commit 7297ba0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ build --enable_runfiles

build --flag_alias=pin_browsers=//common:pin_browsers
build --flag_alias=headless=//common:headless
build --flag_alias=bidi=//common:bidi

# Set the default java toolchain

Expand Down
15 changes: 15 additions & 0 deletions rb/spec/tests.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,21 @@ def rb_integration_test(name, srcs, deps = [], data = [], browsers = BROWSERS.ke
target_compatible_with = BROWSERS[browser]["target_compatible_with"],
)

# Generate a test target for bidi browser execution.
rb_test(
name = "{}-{}-bidi".format(name, browser),
size = "large",
srcs = srcs,
args = ["rb/spec/"],
data = BROWSERS[browser]["data"] + data + ["//common/src/web"],
env = BROWSERS[browser]["env"] | {"WEBDRIVER_BIDI": "true"},
main = "@bundle//bin:rspec",
tags = COMMON_TAGS + BROWSERS[browser]["tags"] + tags + ["%s-bidi" % browser],
deps = ["//rb/spec/integration/selenium/webdriver:spec_helper"] + BROWSERS[browser]["deps"] + deps,
visibility = ["//rb:__subpackages__"],
target_compatible_with = BROWSERS[browser]["target_compatible_with"],
)

def rb_unit_test(name, srcs, deps, data = []):
rb_test(
name = name,
Expand Down

0 comments on commit 7297ba0

Please sign in to comment.