Skip to content

Commit

Permalink
[java] Environment tests are working in Bazel!
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Nov 23, 2018
1 parent dc4fdbf commit 2a1c012
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
19 changes: 18 additions & 1 deletion java/client/test/org/openqa/selenium/environment/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ load("//java:bazel-rules.bzl", "gen_java_tests")

TEST_SRCS = glob([
"**/*Test.java",
])

TEST_BASE_SRCS = glob([
"**/*TestBase.java",
])

Expand All @@ -12,11 +15,12 @@ java_library(
"*.java",
"webserver/*.java",
],
exclude = TEST_SRCS,
exclude = TEST_SRCS + TEST_BASE_SRCS,
),
data = [
"webserver/keystore",
"//common/src/web",
"//javascript",
"//third_party/closure:goog",
] + glob(["webserver/*.java"]),
visibility = [
Expand All @@ -40,6 +44,18 @@ java_binary(
],
)

java_library(
name = "test-base",
srcs = TEST_BASE_SRCS,
deps = [
":environment",
"//java/client/src/org/openqa/selenium/remote",
"//java/client/src/org/openqa/selenium/support",
"//java/client/test/org/openqa/selenium/testing/drivers",
"//third_party/java/junit",
],
)

gen_java_tests(
size = "large",
srcs = TEST_SRCS,
Expand All @@ -48,6 +64,7 @@ gen_java_tests(
],
deps = [
":environment",
":test-base",
"//java/client/src/org/openqa/selenium/firefox",
"//java/client/src/org/openqa/selenium/remote",
"//java/client/test/org/openqa/selenium/testing",
Expand Down
9 changes: 9 additions & 0 deletions javascript/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
filegroup(
name = "javascript",
data = glob([
"**/*.*",
]),
visibility = [
"//java/client/test/org/openqa/selenium/environment:__pkg__",
],
)

0 comments on commit 2a1c012

Please sign in to comment.