Skip to content

Commit c331228

Browse files
authored
[build] Support bazel test on Windows for .NET (#15923)
1 parent 8f65de2 commit c331228

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

dotnet/test/common/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ csharp_library(
5151
],
5252
deps = [
5353
"//dotnet/src/webdriver:webdriver-net8.0",
54-
"@rules_dotnet//tools/runfiles",
5554
framework("nuget", "Newtonsoft.Json"),
5655
framework("nuget", "NUnit"),
56+
framework("nuget", "Runfiles"),
5757
],
5858
)
5959

@@ -92,5 +92,6 @@ dotnet_nunit_test_suite(
9292
framework("nuget", "BenderProxy"),
9393
framework("nuget", "Newtonsoft.Json"),
9494
framework("nuget", "NUnit"),
95+
framework("nuget", "Runfiles"),
9596
],
9697
)

dotnet/test/common/Environment/TestWebServer.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,15 @@ public async Task StartAsync()
5252
try
5353
{
5454
var runfiles = Runfiles.Create();
55-
standaloneAppserverPath = runfiles.Rlocation(@"_main/java/test/org/openqa/selenium/environment/appserver");
55+
56+
var standaloneAppserverProbingPath = @"_main/java/test/org/openqa/selenium/environment/appserver";
57+
58+
if (OperatingSystem.IsWindows())
59+
{
60+
standaloneAppserverProbingPath += ".exe";
61+
}
62+
63+
standaloneAppserverPath = runfiles.Rlocation(standaloneAppserverProbingPath);
5664
}
5765
catch (FileNotFoundException)
5866
{

0 commit comments

Comments
 (0)