more fixes
diff --git a/rb/lib/selenium/webdriver/common/platform.rb b/rb/lib/selenium/webdriver/common/platform.rb index 30519dd..e7e6308 100644 --- a/rb/lib/selenium/webdriver/common/platform.rb +++ b/rb/lib/selenium/webdriver/common/platform.rb
@@ -120,7 +120,7 @@ end def unix_path(path) - path.tr(File::ALT_SEPARATOR, File::SEPARATOR) + File::ALT_SEPARATOR.nil? ? path : path.tr(File::ALT_SEPARATOR, File::SEPARATOR) end def windows_path(path) @@ -128,9 +128,10 @@ end def includes_path?(path, root) - path_name = Pathname.new(unix_path(path)).cleanpath - root_name = Pathname.new(unix_path(root)).cleanpath - path_name.ascend.any?(root_name) + path_name = unix_path(path) + root_name = unix_path(root) + WebDriver.logger.debug("Checking if #{path_name} includes #{root_name}", id: :platform) + unix_path(path).include?("/#{unix_path(root)}/") end def make_writable(file)
diff --git a/rb/spec/tests.bzl b/rb/spec/tests.bzl index ab19dfc..fb55e91 100644 --- a/rb/spec/tests.bzl +++ b/rb/spec/tests.bzl
@@ -195,27 +195,29 @@ ) # Generate a test target for remote browser execution (Grid). - rb_test( - name = "{}-{}-remote".format(name, browser), - size = "large", - srcs = srcs, - args = ["rb/spec/"], - data = BROWSERS[browser]["data"] + data + [ - "//common/src/web", - "//java/src/org/openqa/selenium/grid:selenium_server_deploy.jar", - "//rb/spec:java-location", - "@bazel_tools//tools/jdk:current_java_runtime", - ], - env = BROWSERS[browser]["env"] | { - "WD_BAZEL_JAVA_LOCATION": "$(rootpath //rb/spec:java-location)", - "WD_SPEC_DRIVER": "remote", - }, - main = "@bundle//bin:rspec", - tags = COMMON_TAGS + BROWSERS[browser]["tags"] + tags + ["{}-remote".format(browser)], - deps = ["//rb/spec/integration/selenium/webdriver:spec_helper"] + BROWSERS[browser]["deps"] + deps, - visibility = ["//rb:__subpackages__"], - target_compatible_with = BROWSERS[browser]["target_compatible_with"], - ) + # Skip remote targets for manager tests (no Grid session needed). + if "manager" not in tags: + rb_test( + name = "{}-{}-remote".format(name, browser), + size = "large", + srcs = srcs, + args = ["rb/spec/"], + data = BROWSERS[browser]["data"] + data + [ + "//common/src/web", + "//java/src/org/openqa/selenium/grid:selenium_server_deploy.jar", + "//rb/spec:java-location", + "@bazel_tools//tools/jdk:current_java_runtime", + ], + env = BROWSERS[browser]["env"] | { + "WD_BAZEL_JAVA_LOCATION": "$(rootpath //rb/spec:java-location)", + "WD_SPEC_DRIVER": "remote", + }, + main = "@bundle//bin:rspec", + tags = COMMON_TAGS + BROWSERS[browser]["tags"] + tags + ["{}-remote".format(browser)], + deps = ["//rb/spec/integration/selenium/webdriver:spec_helper"] + BROWSERS[browser]["deps"] + deps, + visibility = ["//rb:__subpackages__"], + target_compatible_with = BROWSERS[browser]["target_compatible_with"], + ) # Generate a test target for bidi browser execution if there is a matching tag if "bidi" in tags: