Skip to content

Commit 07679be

Browse files
committed
Use legacy runfiles to better support ruby
1 parent b3f6718 commit 07679be

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

.bazelrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ try-import %workspace%/.bazelrc.windows.local
77
# pieces.
88
# https://github.com/bazelbuild/bazel/issues/20369
99
# https://github.com/bazelbuild/bazel/issues/21491
10-
1110
common --lockfile_mode=off
1211

1312
# We need this for rust and closure targets
1413
common --enable_workspace
1514
common --noincompatible_disallow_struct_provider_syntax
1615

16+
# This is required by the ruby targets
17+
common --legacy_external_runfiles
18+
1719
# Ensure Windows support is accurate.
1820

1921
startup --windows_enable_symlinks

rb/spec/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,6 @@ genrule(
123123
srcs = [],
124124
outs = ["java-location.txt"],
125125
cmd = "echo $(JAVA) > $@",
126-
toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
126+
toolchains = ["@rules_java//toolchains:current_java_runtime"],
127127
visibility = ["//rb/spec:__subpackages__"],
128128
)

rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,13 @@ def remote_server
112112
def bazel_java
113113
return unless ENV.key?('WD_BAZEL_JAVA_LOCATION')
114114

115-
File.expand_path(File.read(File.expand_path(ENV.fetch('WD_BAZEL_JAVA_LOCATION'))).chomp)
115+
path = File.expand_path(File.read(File.expand_path(ENV.fetch('WD_BAZEL_JAVA_LOCATION'))).chomp)
116+
117+
if !File.exist?(path)
118+
raise "Java not found at #{path}"
119+
end
120+
121+
path
116122
end
117123

118124
def rbe?

rb/spec/tests.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ def rb_integration_test(name, srcs, deps = [], data = [], browsers = BROWSERS.ke
174174
data = BROWSERS[browser]["data"] + data + [
175175
"//common/src/web",
176176
"//java/src/org/openqa/selenium/grid:selenium_server_deploy.jar",
177+
"//java/src/org/openqa/selenium/grid:selenium_server",
177178
"//rb/spec:java-location",
178179
"@bazel_tools//tools/jdk:current_java_runtime",
179180
],

0 commit comments

Comments
 (0)