aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrudhvi Akhil Alahari <quic_prudhvi@quicinc.com>2023-04-24 14:45:17 +0530
committerMatthias Sohn <matthias.sohn@sap.com>2023-04-26 22:01:05 +0200
commit70bc5aad30dca46e086f99f81c80f878d3f54bc6 (patch)
tree6062dd5740cbe630693ec78c8e5aa39edfaae17d
parent6082ae25dd92ec5f67fbbcfd00e1c244caf63f87 (diff)
downloadjgit-70bc5aad30dca46e086f99f81c80f878d3f54bc6.tar.gz
jgit-70bc5aad30dca46e086f99f81c80f878d3f54bc6.zip
Fix after_open config and Snapshotting RefDir tests to work with bazel
The changes I1db6fcf414b and I634b92877f added tests which were failing with errors [1] and [2] with "bazel test //...". This was not caught because we don't have CI running with bazel. Fix bazel build file so that these errors are no longer thrown when run with bazel. [1] error: cannot find symbol FileRepositoryBuilderTest [2] error: cannot find symbol RefDirectoryTest Bug: 581816 Signed-off-by: Prudhvi Akhil Alahari <quic_prudhvi@quicinc.com> Change-Id: I1e57111662825f5f14f373bc4f8d24cce1fec0b8
-rw-r--r--org.eclipse.jgit.test/BUILD17
-rw-r--r--org.eclipse.jgit.test/tests.bzl6
2 files changed, 23 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/BUILD b/org.eclipse.jgit.test/BUILD
index 6f6c88ce8d..e63c02c03c 100644
--- a/org.eclipse.jgit.test/BUILD
+++ b/org.eclipse.jgit.test/BUILD
@@ -51,6 +51,23 @@ tests(tests = glob(
exclude = HELPERS + DATA + EXCLUDED,
))
+# Non abstract base classes used for tests by other test classes
+BASE = [
+ PKG + "internal/storage/file/FileRepositoryBuilderTest.java",
+ PKG + "internal/storage/file/RefDirectoryTest.java",
+]
+
+java_library(
+ name = "base",
+ testonly = 1,
+ srcs = BASE,
+ deps = [
+ "//lib:junit",
+ "//org.eclipse.jgit:jgit",
+ "//org.eclipse.jgit.junit:junit",
+ ],
+)
+
java_library(
name = "helpers",
testonly = 1,
diff --git a/org.eclipse.jgit.test/tests.bzl b/org.eclipse.jgit.test/tests.bzl
index e201bdbcb3..170bf0c460 100644
--- a/org.eclipse.jgit.test/tests.bzl
+++ b/org.eclipse.jgit.test/tests.bzl
@@ -52,6 +52,12 @@ def tests(tests):
"//lib:xz",
"//org.eclipse.jgit.archive:jgit-archive",
]
+ if src.endswith("FileRepositoryBuilderAfterOpenConfigTest.java") or \
+ src.endswith("RefDirectoryAfterOpenConfigTest.java") or \
+ src.endswith("SnapshottingRefDirectoryTest.java"):
+ additional_deps = [
+ ":base",
+ ]
heap_size = "-Xmx256m"
if src.endswith("HugeCommitMessageTest.java"):
heap_size = "-Xmx512m"