Skip to content

Commit

Permalink
[bazel]: compile all grid tests using bazel
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed May 13, 2019
1 parent dd00c34 commit e36ca59
Show file tree
Hide file tree
Showing 38 changed files with 545 additions and 45 deletions.
3 changes: 3 additions & 0 deletions java/client/src/org/openqa/selenium/net/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ java_library(
"//java/client/test/org/openqa/selenium/net:__pkg__",
"//java/client/test/org/openqa/selenium/remote/internal:__pkg__",
"//java/client/test/org/openqa/selenium/testing/drivers:__pkg__",
"//java/server/src/org/openqa/selenium/events/zeromq:__pkg__",
"//java/server/src/org/openqa/selenium/grid:__subpackages__",
"//java/server/test/org/openqa/selenium/grid:__subpackages__",
],
deps = [
"//java/client/src/org/openqa/selenium:core",
Expand Down
3 changes: 3 additions & 0 deletions java/client/src/org/openqa/selenium/remote/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ java_library(
exports = [
":api",
":capabilities",
":http-session-id",
":remote-lib",
"//java/client/src/org/openqa/selenium:core",
"//java/client/src/org/openqa/selenium/remote/http",
],
deps = [
":api",
Expand Down
3 changes: 3 additions & 0 deletions java/client/src/org/openqa/selenium/remote/http/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ java_library(
"//java/client/test/org/openqa/selenium/net:__pkg__",
"//java/client/test/org/openqa/selenium/remote:__subpackages__",
"//java/client/test/org/openqa/selenium/testing/drivers:__pkg__",
"//java/server/src/org/openqa/selenium/netty:__subpackages__",
"//java/server/src/org/openqa/selenium/grid:__subpackages__",
"//java/server/test/org/openqa/selenium/grid:__subpackages__",
],
deps = [
"//java/client/src/org/openqa/selenium:core",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ java_library(
],
visibility = [
"//java/client/test/org/openqa/selenium/remote/tracing:__subpackages__",
"//java/server/src/org/openqa/selenium/grid:__subpackages__",
"//java/server/test/org/openqa/selenium/grid:__subpackages__",
],
)
7 changes: 6 additions & 1 deletion java/rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ def java_test_suite(

tests = []

actual_tags = []
actual_tags.extend(tags)
if "small" != size:
actual_tags.append("no-sandbox")

for src in srcs:
if src.endswith('Test.java'):
test_name = src[:-len('.java')]
Expand All @@ -91,7 +96,7 @@ def java_test_suite(
size = size,
test_class = test_class,
resources = resources,
tags = tags,
tags = actual_tags,
deps = deps,
visibility = ["//visibility:private"])

Expand Down
7 changes: 7 additions & 0 deletions java/server/src/org/openqa/selenium/concurrent/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
java_library(
name = "concurrent",
srcs = glob(["*.java"]),
visibility = [
"//java/server/src/org/openqa/selenium/grid:__subpackages__",
],
)
12 changes: 12 additions & 0 deletions java/server/src/org/openqa/selenium/events/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
java_library(
name = "events",
srcs = glob(["*.java"]),
deps = [
"//java/client/src/org/openqa/selenium/json",
],
visibility = [
"//java/server/src/org/openqa/selenium/events:__subpackages__",
"//java/server/src/org/openqa/selenium/grid:__subpackages__",
"//java/server/test/org/openqa/selenium/grid:__subpackages__",
],
)
12 changes: 12 additions & 0 deletions java/server/src/org/openqa/selenium/events/local/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
java_library(
name = "local",
srcs = glob(["*.java"]),
deps = [
"//java/server/src/org/openqa/selenium/events",
"//java/server/src/org/openqa/selenium/grid/config",
"//third_party/java/guava",
],
visibility = [
"//java/server/test/org/openqa/selenium/grid:__subpackages__",
],
)
15 changes: 15 additions & 0 deletions java/server/src/org/openqa/selenium/events/zeromq/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
java_library(
name = "zeromq",
srcs = glob(["*.java"]),
deps = [
"//java/client/src/org/openqa/selenium/json",
"//java/client/src/org/openqa/selenium/net",
"//java/server/src/org/openqa/selenium/events",
"//java/server/src/org/openqa/selenium/grid/config",
"//third_party/java/guava",
"//third_party/java/zeromq:jeromq",
],
visibility = [
"//java/server/test/org/openqa/selenium/grid/router:__pkg__",
],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
java_library(
name = "component",
srcs = glob(["*.java"]),
visibility = [
"//java/server/src/org/openqa/selenium/grid:__subpackages__",
"//java/server/src/org/openqa/selenium/netty/server:__pkg__",
"//java/server/test/org/openqa/selenium/grid:__subpackages__",
],
)
13 changes: 13 additions & 0 deletions java/server/src/org/openqa/selenium/grid/config/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
java_library(
name = "config",
srcs = glob(["*.java"]),
deps = [
"//third_party/java/guava",
],
visibility = [
"//java/server/src/org/openqa/selenium/events:__subpackages__",
"//java/server/src/org/openqa/selenium/grid:__subpackages__",
"//java/server/src/org/openqa/selenium/netty/server:__pkg__",
"//java/server/test/org/openqa/selenium/grid:__subpackages__",
],
)
15 changes: 15 additions & 0 deletions java/server/src/org/openqa/selenium/grid/data/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
java_library(
name = "data",
srcs = glob(["*.java"]),
deps = [
"//java/client/src/org/openqa/selenium:core",
"//java/client/src/org/openqa/selenium/json",
"//java/client/src/org/openqa/selenium/remote",
"//java/server/src/org/openqa/selenium/events",
"//third_party/java/guava",
],
visibility = [
"//java/server/src/org/openqa/selenium/grid:__subpackages__",
"//java/server/test/org/openqa/selenium/grid:__subpackages__",
],
)
19 changes: 19 additions & 0 deletions java/server/src/org/openqa/selenium/grid/distributor/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
java_library(
name = "distributor",
srcs = glob(["*.java"]),
deps = [
"//java/client/src/org/openqa/selenium:core",
"//java/client/src/org/openqa/selenium/json",
"//java/client/src/org/openqa/selenium/remote/http",
"//java/client/src/org/openqa/selenium/remote/tracing",
"//java/server/src/org/openqa/selenium/grid/data",
"//java/server/src/org/openqa/selenium/grid/node",
"//java/server/src/org/openqa/selenium/grid/node/remote",
"//java/server/src/org/openqa/selenium/grid/web",
"//third_party/java/guava",
],
visibility = [
"//java/server/src/org/openqa/selenium/grid:__subpackages__",
"//java/server/test/org/openqa/selenium/grid:__subpackages__",
]
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
java_library(
name = "local",
srcs = glob(["*.java"]),
deps = [
"//java/client/src/org/openqa/selenium/json",
"//java/client/src/org/openqa/selenium/remote",
"//java/client/src/org/openqa/selenium/remote/tracing",
"//java/server/src/org/openqa/selenium/concurrent",
"//java/server/src/org/openqa/selenium/events",
"//java/server/src/org/openqa/selenium/grid/component",
"//java/server/src/org/openqa/selenium/grid/data",
"//java/server/src/org/openqa/selenium/grid/distributor",
"//java/server/src/org/openqa/selenium/grid/node",
"//java/server/src/org/openqa/selenium/grid/node/remote",
"//java/server/src/org/openqa/selenium/grid/sessionmap",
"//third_party/java/guava",
],
visibility = [
"//java/server/test/org/openqa/selenium/grid/distributor:__pkg__",
"//java/server/test/org/openqa/selenium/grid/router:__pkg__",
]
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
java_library(
name = "remote",
srcs = glob(["*.java"]),
deps = [
"//java/client/src/org/openqa/selenium:core",
"//java/client/src/org/openqa/selenium/json",
"//java/client/src/org/openqa/selenium/remote/tracing",
"//java/server/src/org/openqa/selenium/grid/data",
"//java/server/src/org/openqa/selenium/grid/distributor",
"//java/server/src/org/openqa/selenium/grid/node",
"//java/server/src/org/openqa/selenium/grid/web",
],
visibility = [
"//java/server/test/org/openqa/selenium/grid/distributor:__pkg__",
"//java/server/test/org/openqa/selenium/grid/router:__pkg__",
]
)
19 changes: 19 additions & 0 deletions java/server/src/org/openqa/selenium/grid/node/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
java_library(
name = "node",
srcs = glob(["*.java"]),
deps = [
"//java/client/src/org/openqa/selenium:core",
"//java/client/src/org/openqa/selenium/json",
"//java/client/src/org/openqa/selenium/remote",
"//java/client/src/org/openqa/selenium/remote/http",
"//java/client/src/org/openqa/selenium/remote/tracing",
"//java/server/src/org/openqa/selenium/grid/component",
"//java/server/src/org/openqa/selenium/grid/data",
"//java/server/src/org/openqa/selenium/grid/web",
"//third_party/java/guava",
],
visibility = [
"//java/server/src/org/openqa/selenium/grid:__subpackages__",
"//java/server/test/org/openqa/selenium/grid:__subpackages__",
]
)
19 changes: 19 additions & 0 deletions java/server/src/org/openqa/selenium/grid/node/local/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
java_library(
name = "local",
srcs = glob(["*.java"]),
deps = [
"//java/client/src/org/openqa/selenium/json",
"//java/client/src/org/openqa/selenium/remote",
"//java/client/src/org/openqa/selenium/remote/tracing",
"//java/server/src/org/openqa/selenium/concurrent",
"//java/server/src/org/openqa/selenium/events",
"//java/server/src/org/openqa/selenium/grid/component",
"//java/server/src/org/openqa/selenium/grid/data",
"//java/server/src/org/openqa/selenium/grid/node",
"//java/server/src/org/openqa/selenium/grid/web",
"//third_party/java/guava",
],
visibility = [
"//java/server/test/org/openqa/selenium/grid:__subpackages__",
],
)
20 changes: 20 additions & 0 deletions java/server/src/org/openqa/selenium/grid/node/remote/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
java_library(
name = "remote",
srcs = glob(["*.java"]),
deps = [
"//java/client/src/org/openqa/selenium/json",
"//java/client/src/org/openqa/selenium/net",
"//java/client/src/org/openqa/selenium/remote",
"//java/client/src/org/openqa/selenium/remote/tracing",
"//java/server/src/org/openqa/selenium/grid/component",
"//java/server/src/org/openqa/selenium/grid/data",
"//java/server/src/org/openqa/selenium/grid/node",
"//java/server/src/org/openqa/selenium/grid/web",
"//third_party/java/guava",
],
visibility = [
"//java/server/src/org/openqa/selenium/grid/distributor:__subpackages__",
"//java/server/test/org/openqa/selenium/grid/node:__pkg__",
"//java/server/test/org/openqa/selenium/grid/router:__pkg__",
],
)
19 changes: 19 additions & 0 deletions java/server/src/org/openqa/selenium/grid/router/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
java_library(
name = "router",
srcs = glob(["*.java"]),
deps = [
"//java/client/src/org/openqa/selenium/json",
"//java/client/src/org/openqa/selenium/net",
"//java/client/src/org/openqa/selenium/remote",
"//java/client/src/org/openqa/selenium/remote/tracing",
"//java/server/src/org/openqa/selenium/grid/data",
"//java/server/src/org/openqa/selenium/grid/distributor",
"//java/server/src/org/openqa/selenium/grid/server",
"//java/server/src/org/openqa/selenium/grid/sessionmap",
"//java/server/src/org/openqa/selenium/grid/web",
"//third_party/java/guava",
],
visibility = [
"//java/server/test/org/openqa/selenium/grid:__subpackages__",
]
)
23 changes: 23 additions & 0 deletions java/server/src/org/openqa/selenium/grid/server/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
java_library(
name = "server",
srcs = glob(["*.java"]),
deps = [
"//java/client/src/org/openqa/selenium:core",
"//java/client/src/org/openqa/selenium/json",
"//java/client/src/org/openqa/selenium/net",
"//java/client/src/org/openqa/selenium/remote/http",
"//java/server/src/org/openqa/selenium/events",
"//java/server/src/org/openqa/selenium/grid/component",
"//java/server/src/org/openqa/selenium/grid/config",
"//java/server/src/org/openqa/selenium/grid/web",
"//third_party/java/beust:jcommander",
"//third_party/java/guava",
"//third_party/java/jetty",
"//third_party/java/servlet:javax.servlet-api",
],
visibility = [
"//java/server/src/org/openqa/selenium/grid:__subpackages__",
"//java/server/src/org/openqa/selenium/netty/server:__pkg__",
"//java/server/test/org/openqa/selenium/grid:__subpackages__",
],
)
17 changes: 17 additions & 0 deletions java/server/src/org/openqa/selenium/grid/sessionmap/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
java_library(
name = "sessionmap",
srcs = glob(["*.java"]),
deps = [
"//java/client/src/org/openqa/selenium:core",
"//java/client/src/org/openqa/selenium/json",
"//java/client/src/org/openqa/selenium/remote",
"//java/client/src/org/openqa/selenium/remote/http",
"//java/server/src/org/openqa/selenium/grid/data",
"//java/server/src/org/openqa/selenium/grid/web",
"//third_party/java/guava",
],
visibility = [
"//java/server/src/org/openqa/selenium/grid:__subpackages__",
"//java/server/test/org/openqa/selenium/grid:__subpackages__",
],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
java_library(
name = "local",
srcs = glob(["*.java"]),
deps = [
"//java/client/src/org/openqa/selenium/remote",
"//java/client/src/org/openqa/selenium/remote/tracing",
"//java/server/src/org/openqa/selenium/events",
"//java/server/src/org/openqa/selenium/grid/data",
"//java/server/src/org/openqa/selenium/grid/sessionmap",
],
visibility = [
"//java/server/test/org/openqa/selenium/grid:__subpackages__",
]
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
java_library(
name = "remote",
srcs = glob(["*.java"]),
deps = [
"//java/client/src/org/openqa/selenium/json",
"//java/client/src/org/openqa/selenium/remote",
"//java/server/src/org/openqa/selenium/grid/data",
"//java/server/src/org/openqa/selenium/grid/sessionmap",
"//java/server/src/org/openqa/selenium/grid/web",
],
visibility = [
"//java/server/test/org/openqa/selenium/grid:__subpackages__",
]
)
15 changes: 15 additions & 0 deletions java/server/src/org/openqa/selenium/grid/web/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
java_library(
name = "web",
srcs = glob(["*.java"]),
deps = [
"//java/client/src/org/openqa/selenium:core",
"//java/client/src/org/openqa/selenium/json",
"//java/client/src/org/openqa/selenium/remote",
"//java/client/src/org/openqa/selenium/remote/http",
"//third_party/java/guava",
],
visibility = [
"//java/server/src/org/openqa/selenium/grid:__subpackages__",
"//java/server/test/org/openqa/selenium/grid:__subpackages__",
],
)
Loading

0 comments on commit e36ca59

Please sign in to comment.