Skip to content

Commit 47c76e2

Browse files
committed
Make .NET support test target valid for version of Bazel rules used
1 parent f1e55e6 commit 47c76e2

File tree

3 files changed

+21
-18
lines changed

3 files changed

+21
-18
lines changed

common/src/web/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ filegroup(
55
"**/*",
66
]),
77
visibility = [
8-
"//dotnet/test/common:__pkg__",
8+
"//dotnet/test:__subpackages__",
99
"//java/client/test/org/openqa/selenium/environment:__pkg__",
1010
"//javascript/node/selenium-webdriver:__pkg__",
1111
"//py:__pkg__",

dotnet/test/common/BUILD.bazel

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
load("//dotnet:defs.bzl", "nunit_test")
22

3+
exports_files(["appconfig.json"])
4+
35
SUPPORTED_BROWSERS = [
46
("chrome", "Chrome"),
57
("chromedev", "ChromeDev"),

dotnet/test/support/BUILD.bazel

+18-17
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,31 @@ nunit_test(
1111
]),
1212
out = "WebDriver.Support.Tests.dll",
1313
args = [
14-
"--agents=1",
15-
"--params=ConfigFile=$(location appconfig.json)",
16-
"--params=ActiveWebsiteConfig=HostsFileRedirect",
14+
"--workers=1",
15+
"--params=ConfigFile=$(location //dotnet/test/common:appconfig.json)",
1716
"--params=ActiveDriverConfig={}".format(config_setting),
17+
"--params=ActiveWebsiteConfig=HostsFileRedirect",
1818
],
1919
data = [
20-
"appconfig.json",
20+
"//dotnet/test/common:appconfig.json",
2121
"//common/src/web",
2222
"//java/client/test/org/openqa/selenium/environment:appserver_deploy.jar",
2323
],
24-
dotnet_context_data = "@io_bazel_rules_dotnet//:net_context_data_net47",
24+
is_windows = select({
25+
"@bazel_tools//src/conditions:host_windows": True,
26+
"//conditions:default": False,
27+
}),
28+
tags = [
29+
"no-sandbox",
30+
"requires-network",
31+
],
32+
target_frameworks = ["netcoreapp2.1"],
2533
visibility = ["//visibility:public"],
2634
deps = [
27-
"//dotnet/src/support:net47",
28-
"//dotnet/src/webdriver:net47",
29-
"@castle.core//:net45",
30-
"@io_bazel_rules_dotnet//dotnet/stdlib.net:system.core.dll",
31-
"@io_bazel_rules_dotnet//dotnet/stdlib.net:system.data.dll",
32-
"@io_bazel_rules_dotnet//dotnet/stdlib.net:system.dll",
33-
"@io_bazel_rules_dotnet//dotnet/stdlib.net:system.drawing.dll",
34-
"@io_bazel_rules_dotnet//dotnet/stdlib.net:system.xml.dll",
35-
"@json.net//:net45",
36-
"@moq//:net45",
37-
"@nunit//:net45",
38-
"@system.threading.tasks.extensions//:net45",
35+
"//dotnet/src/support:netstandard2.0",
36+
"//dotnet/src/webdriver:netstandard2.0",
37+
"//dotnet/test/common:firefox",
38+
"@json.net//:Newtonsoft.Json",
39+
"@moq//:Moq",
3940
],
4041
)

0 commit comments

Comments
 (0)