Skip to content

Commit

Permalink
[bazel]: each test generates its own name. No need for the macro to r…
Browse files Browse the repository at this point in the history
…equire it
  • Loading branch information
shs96c committed Nov 19, 2018
1 parent d500a66 commit 1c1103c
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 9 deletions.
6 changes: 3 additions & 3 deletions java/bazel-rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ def _impl(ctx):
size = ctx.attr.size,
deps = ctx.attr.deps)

def gen_java_tests(name, srcs=[], deps=[], **kwargs):
def gen_java_tests(srcs=[], deps=[], **kwargs):
native.java_library(
name = "%s-lib" % name,
name = "%s-lib" % native.package_name(),
srcs = srcs,
deps = deps)

deps.append(":%s-lib" % name)
deps.append(":%s-lib" % native.package_name())

for src in srcs:
native.java_test(
Expand Down
1 change: 0 additions & 1 deletion java/client/test/org/openqa/selenium/remote/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ SMALL_TESTS = [
]

gen_java_tests(
name = "common-tests",
srcs = SMALL_TESTS,
size = "small",
deps = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
load("//java:bazel-rules.bzl", "gen_java_tests")

gen_java_tests(
name = "distributor",
srcs = glob(["*.java"]),
size = "small",
deps = [
Expand Down
1 change: 0 additions & 1 deletion java/server/test/org/openqa/selenium/grid/node/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
load("//java:bazel-rules.bzl", "gen_java_tests")

gen_java_tests(
name = "node",
srcs = glob(["*.java"]),
size = "small",
deps = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
load("//java:bazel-rules.bzl", "gen_java_tests")

gen_java_tests(
name = "router",
srcs = glob(["*.java"]),
size = "small",
deps = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
load("//java:bazel-rules.bzl", "gen_java_tests")

gen_java_tests(
name = "sessionmap",
srcs = glob(["*.java"]),
size = "small",
deps = [
Expand Down
1 change: 0 additions & 1 deletion java/server/test/org/openqa/selenium/grid/web/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
load("//java:bazel-rules.bzl", "gen_java_tests")

gen_java_tests(
name = "web",
size = "small",
srcs = glob(["*Test.java"]),
deps = [
Expand Down

0 comments on commit 1c1103c

Please sign in to comment.