From 594d1854cc09244ea92d937b87cca35897c895b1 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Wed, 16 Aug 2017 22:57:54 +0200 Subject: [PATCH] Dissolve gerrit-test-util top-level directory Change-Id: I3be9943f8eb9c0b125bea49660b38eea467f0240 --- gerrit-acceptance-tests/BUILD | 2 +- gerrit-extension-api/BUILD | 2 +- gerrit-server/BUILD | 4 ++-- .../com/google/gerrit/extensions}/BUILD | 5 +++-- .../google/gerrit/extensions/client/RangeSubject.java | 0 .../gerrit/extensions/common/CommitInfoSubject.java | 0 .../gerrit/extensions/common/ContentEntrySubject.java | 0 .../google/gerrit/extensions/common/DiffInfoSubject.java | 0 .../google/gerrit/extensions/common/EditInfoSubject.java | 0 .../google/gerrit/extensions/common/FileInfoSubject.java | 0 .../extensions/common/FixReplacementInfoSubject.java | 0 .../extensions/common/FixSuggestionInfoSubject.java | 0 .../gerrit/extensions/common/GitPersonSubject.java | 0 .../com/google/gerrit/extensions/common/PathSubject.java | 0 .../extensions/common/RobotCommentInfoSubject.java | 0 .../gerrit/extensions/restapi/BinaryResultSubject.java | 0 java/com/google/gerrit/truth/BUILD | 9 +++++++++ .../com/google/gerrit/truth/ListSubject.java | 0 .../com/google/gerrit/truth/OptionalSubject.java | 0 tools/eclipse/project.py | 1 + 20 files changed, 17 insertions(+), 6 deletions(-) rename {gerrit-test-util => java/com/google/gerrit/extensions}/BUILD (61%) rename {gerrit-test-util/src/main/java => java}/com/google/gerrit/extensions/client/RangeSubject.java (100%) rename {gerrit-test-util/src/main/java => java}/com/google/gerrit/extensions/common/CommitInfoSubject.java (100%) rename {gerrit-test-util/src/main/java => java}/com/google/gerrit/extensions/common/ContentEntrySubject.java (100%) rename {gerrit-test-util/src/main/java => java}/com/google/gerrit/extensions/common/DiffInfoSubject.java (100%) rename {gerrit-test-util/src/main/java => java}/com/google/gerrit/extensions/common/EditInfoSubject.java (100%) rename {gerrit-test-util/src/main/java => java}/com/google/gerrit/extensions/common/FileInfoSubject.java (100%) rename {gerrit-test-util/src/main/java => java}/com/google/gerrit/extensions/common/FixReplacementInfoSubject.java (100%) rename {gerrit-test-util/src/main/java => java}/com/google/gerrit/extensions/common/FixSuggestionInfoSubject.java (100%) rename {gerrit-test-util/src/main/java => java}/com/google/gerrit/extensions/common/GitPersonSubject.java (100%) rename {gerrit-test-util/src/main/java => java}/com/google/gerrit/extensions/common/PathSubject.java (100%) rename {gerrit-test-util/src/main/java => java}/com/google/gerrit/extensions/common/RobotCommentInfoSubject.java (100%) rename {gerrit-test-util/src/main/java => java}/com/google/gerrit/extensions/restapi/BinaryResultSubject.java (100%) create mode 100644 java/com/google/gerrit/truth/BUILD rename {gerrit-test-util/src/main/java => java}/com/google/gerrit/truth/ListSubject.java (100%) rename {gerrit-test-util/src/main/java => java}/com/google/gerrit/truth/OptionalSubject.java (100%) diff --git a/gerrit-acceptance-tests/BUILD b/gerrit-acceptance-tests/BUILD index 6078bb3b45..f895d68280 100644 --- a/gerrit-acceptance-tests/BUILD +++ b/gerrit-acceptance-tests/BUILD @@ -24,7 +24,7 @@ java_library( "//gerrit-server:server", "//gerrit-server:testutil", "//gerrit-sshd:sshd", - "//gerrit-test-util:test_util", + "//java/com/google/gerrit/extensions", "//lib:args4j", "//lib:gson", "//lib:guava-retrying", diff --git a/gerrit-extension-api/BUILD b/gerrit-extension-api/BUILD index 2c59108a9d..657a85c30d 100644 --- a/gerrit-extension-api/BUILD +++ b/gerrit-extension-api/BUILD @@ -54,7 +54,7 @@ junit_tests( srcs = glob(["src/test/java/**/*Test.java"]), deps = [ ":api", - "//gerrit-test-util:test_util", + "//java/com/google/gerrit/extensions", "//lib:truth", "//lib/guice", ], diff --git a/gerrit-server/BUILD b/gerrit-server/BUILD index 7e43d281f1..fcab2912cb 100644 --- a/gerrit-server/BUILD +++ b/gerrit-server/BUILD @@ -216,7 +216,7 @@ java_library( deps = [ ":server", "//gerrit-extension-api:api", - "//gerrit-test-util:test_util", + "//java/com/google/gerrit/truth", "//lib:truth", ], ) @@ -299,7 +299,7 @@ junit_tests( ":testutil", "//gerrit-index:query_exception", "//gerrit-patch-jgit:server", - "//gerrit-test-util:test_util", + "//java/com/google/gerrit/extensions", "//lib:args4j", "//lib:grappa", "//lib:gson", diff --git a/gerrit-test-util/BUILD b/java/com/google/gerrit/extensions/BUILD similarity index 61% rename from gerrit-test-util/BUILD rename to java/com/google/gerrit/extensions/BUILD index 55954bab2a..dc56785c88 100644 --- a/gerrit-test-util/BUILD +++ b/java/com/google/gerrit/extensions/BUILD @@ -1,10 +1,11 @@ java_library( - name = "test_util", + name = "extensions", testonly = 1, - srcs = glob(["src/main/java/**/*.java"]), + srcs = glob(["**/*.java"]), visibility = ["//visibility:public"], deps = [ "//gerrit-extension-api:api", + "//java/com/google/gerrit/truth", "//lib:truth", ], ) diff --git a/gerrit-test-util/src/main/java/com/google/gerrit/extensions/client/RangeSubject.java b/java/com/google/gerrit/extensions/client/RangeSubject.java similarity index 100% rename from gerrit-test-util/src/main/java/com/google/gerrit/extensions/client/RangeSubject.java rename to java/com/google/gerrit/extensions/client/RangeSubject.java diff --git a/gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/CommitInfoSubject.java b/java/com/google/gerrit/extensions/common/CommitInfoSubject.java similarity index 100% rename from gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/CommitInfoSubject.java rename to java/com/google/gerrit/extensions/common/CommitInfoSubject.java diff --git a/gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/ContentEntrySubject.java b/java/com/google/gerrit/extensions/common/ContentEntrySubject.java similarity index 100% rename from gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/ContentEntrySubject.java rename to java/com/google/gerrit/extensions/common/ContentEntrySubject.java diff --git a/gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/DiffInfoSubject.java b/java/com/google/gerrit/extensions/common/DiffInfoSubject.java similarity index 100% rename from gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/DiffInfoSubject.java rename to java/com/google/gerrit/extensions/common/DiffInfoSubject.java diff --git a/gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/EditInfoSubject.java b/java/com/google/gerrit/extensions/common/EditInfoSubject.java similarity index 100% rename from gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/EditInfoSubject.java rename to java/com/google/gerrit/extensions/common/EditInfoSubject.java diff --git a/gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/FileInfoSubject.java b/java/com/google/gerrit/extensions/common/FileInfoSubject.java similarity index 100% rename from gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/FileInfoSubject.java rename to java/com/google/gerrit/extensions/common/FileInfoSubject.java diff --git a/gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/FixReplacementInfoSubject.java b/java/com/google/gerrit/extensions/common/FixReplacementInfoSubject.java similarity index 100% rename from gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/FixReplacementInfoSubject.java rename to java/com/google/gerrit/extensions/common/FixReplacementInfoSubject.java diff --git a/gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/FixSuggestionInfoSubject.java b/java/com/google/gerrit/extensions/common/FixSuggestionInfoSubject.java similarity index 100% rename from gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/FixSuggestionInfoSubject.java rename to java/com/google/gerrit/extensions/common/FixSuggestionInfoSubject.java diff --git a/gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/GitPersonSubject.java b/java/com/google/gerrit/extensions/common/GitPersonSubject.java similarity index 100% rename from gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/GitPersonSubject.java rename to java/com/google/gerrit/extensions/common/GitPersonSubject.java diff --git a/gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/PathSubject.java b/java/com/google/gerrit/extensions/common/PathSubject.java similarity index 100% rename from gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/PathSubject.java rename to java/com/google/gerrit/extensions/common/PathSubject.java diff --git a/gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/RobotCommentInfoSubject.java b/java/com/google/gerrit/extensions/common/RobotCommentInfoSubject.java similarity index 100% rename from gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/RobotCommentInfoSubject.java rename to java/com/google/gerrit/extensions/common/RobotCommentInfoSubject.java diff --git a/gerrit-test-util/src/main/java/com/google/gerrit/extensions/restapi/BinaryResultSubject.java b/java/com/google/gerrit/extensions/restapi/BinaryResultSubject.java similarity index 100% rename from gerrit-test-util/src/main/java/com/google/gerrit/extensions/restapi/BinaryResultSubject.java rename to java/com/google/gerrit/extensions/restapi/BinaryResultSubject.java diff --git a/java/com/google/gerrit/truth/BUILD b/java/com/google/gerrit/truth/BUILD new file mode 100644 index 0000000000..a0e2ee9770 --- /dev/null +++ b/java/com/google/gerrit/truth/BUILD @@ -0,0 +1,9 @@ +java_library( + name = "truth", + testonly = 1, + srcs = glob(["**/*.java"]), + visibility = ["//visibility:public"], + deps = [ + "//lib:truth", + ], +) diff --git a/gerrit-test-util/src/main/java/com/google/gerrit/truth/ListSubject.java b/java/com/google/gerrit/truth/ListSubject.java similarity index 100% rename from gerrit-test-util/src/main/java/com/google/gerrit/truth/ListSubject.java rename to java/com/google/gerrit/truth/ListSubject.java diff --git a/gerrit-test-util/src/main/java/com/google/gerrit/truth/OptionalSubject.java b/java/com/google/gerrit/truth/OptionalSubject.java similarity index 100% rename from gerrit-test-util/src/main/java/com/google/gerrit/truth/OptionalSubject.java rename to java/com/google/gerrit/truth/OptionalSubject.java diff --git a/tools/eclipse/project.py b/tools/eclipse/project.py index 97c2b12b3f..db41285627 100755 --- a/tools/eclipse/project.py +++ b/tools/eclipse/project.py @@ -173,6 +173,7 @@ def gen_classpath(ext): if m: gwt_src.add(m.group(1)) + classpathentry('src', 'java') for s in sorted(src): out = None