Skip to content

Commit

Permalink
Auto-generate BUILD files for src/java_tools/junitrunner
Browse files Browse the repository at this point in the history
This and further changes may contain minor modifications to BUILD files that
don't serve any apparent purpose. The reason for these changes is that we're
switching from checked-in BUILD files to generated BUILD files, and there may
be small differences between these files.

PiperOrigin-RevId: 166684362
  • Loading branch information
ulfjack authored and vladmos committed Aug 28, 2017
1 parent cb45790 commit 26ad43d
Show file tree
Hide file tree
Showing 15 changed files with 69 additions and 62 deletions.
13 changes: 1 addition & 12 deletions src/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -390,18 +390,7 @@ filegroup(
name = "srcs",
srcs = glob(["**"]) + [
"//src/java_tools/buildjar:srcs",
"//src/java_tools/junitrunner/java/com/google/testing/coverage:srcs",
"//src/java_tools/junitrunner/java/com/google/testing/junit/junit4:srcs",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner:srcs",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal:srcs",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4:srcs",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/model:srcs",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/sharding:srcs",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/sharding/api:srcs",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/sharding/testing:srcs",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/util:srcs",
"//src/java_tools/junitrunner/javatests/com/google/testing/junit/runner:srcs",
"//src/java_tools/junitrunner/javatests/com/google/testing/junit/runner/testbed:srcs",
"//src/java_tools/junitrunner:srcs",
"//src/java_tools/singlejar:srcs",
"//src/main/cpp:srcs",
"//src/main/java/com/google/devtools/build/docgen:srcs",
Expand Down
15 changes: 15 additions & 0 deletions src/java_tools/junitrunner/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Description:
# Run JUnit tests in a controlled environment.
package(default_visibility = ["//src:__subpackages__"])

filegroup(
name = "srcs",
srcs = [
"BUILD",
"//src/java_tools/junitrunner/java/com/google/testing/coverage:srcs",
"//src/java_tools/junitrunner/java/com/google/testing/junit/junit4:srcs",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner:srcs",
"//src/java_tools/junitrunner/javatests/com/google/testing/junit/junit4/runner:srcs",
"//src/java_tools/junitrunner/javatests/com/google/testing/junit/runner:srcs",
],
)
17 changes: 4 additions & 13 deletions src/java_tools/junitrunner/java/com/google/testing/coverage/BUILD
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
package(
default_visibility = ["//visibility:legacy_public"],
)
package(default_visibility = ["//src:__subpackages__"])

licenses(["notice"])

filegroup(
name = "bazel-srcs",
testonly = 0,
srcs = glob(
["**"],
exclude = ["BUILD"],
),
visibility = ["//third_party/bazel:__subpackages__"],
)

filegroup(
name = "srcs",
testonly = 0,
srcs = glob(["**"]),
)

Expand All @@ -24,6 +13,7 @@ filegroup(
srcs = [
"JacocoCoverage_jarjar_deploy.jar",
],
tags = ["manual"],
)

filegroup(
Expand Down Expand Up @@ -80,6 +70,7 @@ genrule(
"\"$(JAVA)\" -jar \"$(location //src/java_tools/singlejar:SingleJar_deploy.jar)\" --normalize --sources \"$${JARJAR}\" --output \"$@\"",
"rm -fr \"$${JARJAR}\"",
]),
tags = ["manual"],
tools = [
"//src/java_tools/singlejar:SingleJar_deploy.jar",
"//third_party/java/jarjar:jarjar_bin_deploy.jar",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Description:
#
# JUnit 4.x extensions

package(
Expand All @@ -23,6 +22,6 @@ java_library(

filegroup(
name = "srcs",
testonly = 0, # All srcs should be not test only, overwrite package default.
srcs = glob(["**"]),
testonly = 0,
srcs = glob(["**/*.java"]) + ["BUILD"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ java_binary(

filegroup(
name = "srcs",
testonly = 0, # All srcs should be not test only, overwrite package default.
srcs = glob(["**"]),
srcs = glob(["**/*.java"]) + [
"BUILD",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal:srcs",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4:srcs",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/model:srcs",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/sharding:srcs",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/util:srcs",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ java_library(

filegroup(
name = "srcs",
testonly = 0, # All srcs should be not test only, overwrite package default.
srcs = glob(["**"]),
srcs = glob(["**/*.java"]) + ["BUILD"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ java_library(

filegroup(
name = "srcs",
testonly = 0, # All srcs should be not test only, overwrite package default.
srcs = glob(["**"]),
srcs = glob(["**/*.java"]) + ["BUILD"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ java_library(

filegroup(
name = "srcs",
testonly = 0, # All srcs should be not test only, overwrite package default.
srcs = glob(["**"]),
srcs = glob(["**/*.java"]) + ["BUILD"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ java_library(

filegroup(
name = "srcs",
testonly = 0, # All srcs should be not test only, overwrite package default.
srcs = glob(["**"]),
srcs = glob(["**/*.java"]) + [
"BUILD",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/sharding/api:srcs",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/sharding/testing:srcs",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ java_library(

filegroup(
name = "srcs",
testonly = 0, # All srcs should be not test only, overwrite package default.
srcs = glob(["**"]),
srcs = glob(["**/*.java"]) + ["BUILD"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ java_library(

filegroup(
name = "srcs",
testonly = 0, # All srcs should be not test only, overwrite package default.
srcs = glob(["**"]),
srcs = glob(["**/*.java"]) + ["BUILD"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ java_library(

filegroup(
name = "srcs",
testonly = 0, # All srcs should be not test only, overwrite package default.
srcs = glob(["**"]),
srcs = glob(["**/*.java"]) + ["BUILD"],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package(default_visibility = ["//src:__subpackages__"])

filegroup(
name = "srcs",
srcs = glob(["*"]),
)

java_test(
name = "RegExTestCaseFilterTest",
size = "small",
srcs = ["RegExTestCaseFilterTest.java"],
deps = [
"//src/java_tools/junitrunner/java/com/google/testing/junit/junit4:runner",
"//third_party:guava",
"//third_party:junit4",
"//third_party:truth",
],
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
DEFAULT_VISIBILITY = [
"//src/java_tools/junitrunner:__subpackages__",
]
package(default_visibility = ["//src:__subpackages__"])

# Libraries
# =========================================================
Expand All @@ -12,7 +10,6 @@ java_library(
exclude = ["testbed/*.java"],
),
deps = [
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner:test_runner",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal:junit4",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4",
Expand All @@ -22,7 +19,6 @@ java_library(
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/sharding/testing",
"//src/java_tools/junitrunner/java/com/google/testing/junit/runner/util",
"//src/test/java/com/google/devtools/build/lib:testutil",
"//third_party:dagger",
"//third_party:guava",
"//third_party:jsr305",
"//third_party:jsr330_inject",
Expand Down Expand Up @@ -53,6 +49,13 @@ java_test(
runtime_deps = [":tests"],
)

filegroup(
name = "srcs",
srcs = glob(["**"]) + [
"//src/java_tools/junitrunner/javatests/com/google/testing/junit/runner/testbed:srcs",
],
)

# BazelTestRunner integration tests
sh_test(
name = "junit4_testbridge_integration_test",
Expand Down Expand Up @@ -120,12 +123,6 @@ sh_test(
],
)

filegroup(
name = "srcs",
srcs = glob(["**"]),
visibility = ["//src:__pkg__"],
)

exports_files([
"stack_trace_integration_tests.sh",
"junit4_testbridge_integration_tests.sh",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
DEFAULT_VISIBILITY = [
"//src/java_tools/junitrunner:__subpackages__",
]

package(default_visibility = DEFAULT_VISIBILITY)
package(default_visibility = ["//src:__subpackages__"])

java_library(
name = "testbed",
Expand All @@ -22,8 +18,7 @@ exports_files([
filegroup(
name = "srcs",
srcs = glob(["*.java"]) + [
"XmlOutputExercises.ant.xml",
"BUILD",
"XmlOutputExercises.ant.xml",
],
visibility = ["//src:__pkg__"],
)

0 comments on commit 26ad43d

Please sign in to comment.