Skip to content

Commit

Permalink
fix (build): CLI bazel target overlap
Browse files Browse the repository at this point in the history
Targets @//java/dev/enola/cli:EnolaLoggingTest and @//java/dev/enola/cli:tests share CommandLineSubject.java.

Please exclude one of the targets in the selected project view file to avoid erroneous highlighting.
  • Loading branch information
vorburger committed Mar 8, 2025
1 parent baf5bcf commit 1b780f8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@ tools/version/VERSION

# https://github.com/VirtusLab/bazel-steward/issues/424
bazel-steward.jar

# Bazel BSP, by https://docs.google.com/document/d/1fdLN1iONuRm--PhpDNYXpEOPPwKML8bG5OJv9AbCvEI/edit?tab=t.0
.bazelbsp/
20 changes: 14 additions & 6 deletions java/dev/enola/cli/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,28 @@ java_library(
],
)

java_library(
name = "testlib",
srcs = [
"CommandLineSubject.java",
"SystemOutErrCapture.java",
],
deps = [
"//java/dev/enola/cli/common",
"@enola_maven//:com_google_truth_truth",
],
)

junit_tests(
name = "tests",
size = "medium",
srcs = glob(
["*Test.java"],
exclude = ["EnolaLoggingTest.java"],
),
srcs_utils = [
"CommandLineSubject.java",
"SystemOutErrCapture.java",
],
deps = [
":lib",
":testlib",
"//java/dev/enola/cli/common",
"//java/dev/enola/common/canonicalize",
"//java/dev/enola/common/context/testlib",
Expand All @@ -123,9 +132,7 @@ junit_tests(
java_test(
name = "EnolaLoggingTest",
srcs = [
"CommandLineSubject.java",
"EnolaLoggingTest.java",
"SystemOutErrCapture.java",
],
runtime_deps = [
"//java/dev/enola/common/canonicalize",
Expand All @@ -140,6 +147,7 @@ java_test(
],
deps = [
":lib",
":testlib",
"//java/dev/enola/cli/common",
"//java/dev/enola/common/context/testlib",
"//java/dev/enola/thing:thing_java",
Expand Down

0 comments on commit 1b780f8

Please sign in to comment.