diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2018-08-31 09:24:57 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2018-08-31 09:25:43 +0900 |
commit | b270e4b740a3b974bd5029fae224edc8ec088025 (patch) | |
tree | c0020711f7c820fedd4fe0f858dfd777bf15642e /org.eclipse.jgit.test | |
parent | 96beadbbc1a49f1b0eade46874bf57eb60384815 (diff) | |
parent | af547cf00d79f1233464aadb76ad381be7f8887f (diff) | |
download | jgit-b270e4b740a3b974bd5029fae224edc8ec088025.tar.gz jgit-b270e4b740a3b974bd5029fae224edc8ec088025.zip |
Merge branch 'stable-4.7' into stable-4.8
* stable-4.7:
Bazel: Use hyphen instead of underscore in external repository names
Bazel: Format all build files with buildifier 0.15.0
ChangeIdUtilTest: Remove unused notestCommitDashV
Change-Id: I414ade902dc38b696c566dd604000e3d289f3973
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/BUILD | 10 | ||||
-rw-r--r-- | org.eclipse.jgit.test/tests.bzl | 80 | ||||
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/util/ChangeIdUtilTest.java | 17 |
3 files changed, 45 insertions, 62 deletions
diff --git a/org.eclipse.jgit.test/BUILD b/org.eclipse.jgit.test/BUILD index ae6f24223c..bbda838f00 100644 --- a/org.eclipse.jgit.test/BUILD +++ b/org.eclipse.jgit.test/BUILD @@ -33,7 +33,7 @@ DATA = [ tests(glob( ["tst/**/*.java"], - exclude = HELPERS + DATA + exclude = HELPERS + DATA, )) java_library( @@ -54,8 +54,8 @@ java_import( ) genrule2( - name = 'tst_rsrc_jar', - cmd = 'o=$$PWD/$@ && tar cf - $(SRCS) | tar -C $$TMP --strip-components=2 -xf - && cd $$TMP && zip -qr $$o .', - srcs = glob(['tst-rsrc/**']), - outs = ['tst_rsrc.jar',], + name = "tst_rsrc_jar", + srcs = glob(["tst-rsrc/**"]), + outs = ["tst_rsrc.jar"], + cmd = "o=$$PWD/$@ && tar cf - $(SRCS) | tar -C $$TMP --strip-components=2 -xf - && cd $$TMP && zip -qr $$o .", ) diff --git a/org.eclipse.jgit.test/tests.bzl b/org.eclipse.jgit.test/tests.bzl index 9cadc7463a..8ae0065a4c 100644 --- a/org.eclipse.jgit.test/tests.bzl +++ b/org.eclipse.jgit.test/tests.bzl @@ -4,45 +4,45 @@ load( ) def tests(tests): - for src in tests: - name = src[len('tst/'):len(src)-len('.java')].replace('/', '_') - labels = [] - if name.startswith('org_eclipse_jgit_'): - l = name[len('org.eclipse.jgit_'):] - if l.startswith('internal_storage_'): - l = l[len('internal.storage_'):] - i = l.find('_') - if i > 0: - labels.append(l[:i]) - else: - labels.append(i) - if 'lib' not in labels: - labels.append('lib') + for src in tests: + name = src[len("tst/"):len(src) - len(".java")].replace("/", "_") + labels = [] + if name.startswith("org_eclipse_jgit_"): + l = name[len("org.eclipse.jgit_"):] + if l.startswith("internal_storage_"): + l = l[len("internal.storage_"):] + i = l.find("_") + if i > 0: + labels.append(l[:i]) + else: + labels.append(i) + if "lib" not in labels: + labels.append("lib") - additional_deps = [] - if src.endswith("RootLocaleTest.java"): - additional_deps = [ - '//org.eclipse.jgit.pgm:pgm', - '//org.eclipse.jgit.ui:ui', - ] - if src.endswith("WalkEncryptionTest.java"): - additional_deps = [ - '//org.eclipse.jgit:insecure_cipher_factory', - ] + additional_deps = [] + if src.endswith("RootLocaleTest.java"): + additional_deps = [ + "//org.eclipse.jgit.pgm:pgm", + "//org.eclipse.jgit.ui:ui", + ] + if src.endswith("WalkEncryptionTest.java"): + additional_deps = [ + "//org.eclipse.jgit:insecure_cipher_factory", + ] - junit_tests( - name = name, - tags = labels, - srcs = [src], - deps = additional_deps + [ - ':helpers', - ':tst_rsrc', - '//lib:javaewah', - '//lib:junit', - '//lib:slf4j-api', - '//org.eclipse.jgit:jgit', - '//org.eclipse.jgit.junit:junit', - '//org.eclipse.jgit.lfs:jgit-lfs', - ], - jvm_flags = ["-Xmx256m", "-Dfile.encoding=UTF-8"], - ) + junit_tests( + name = name, + tags = labels, + srcs = [src], + deps = additional_deps + [ + ":helpers", + ":tst_rsrc", + "//lib:javaewah", + "//lib:junit", + "//lib:slf4j-api", + "//org.eclipse.jgit:jgit", + "//org.eclipse.jgit.junit:junit", + "//org.eclipse.jgit.lfs:jgit-lfs", + ], + jvm_flags = ["-Xmx256m", "-Dfile.encoding=UTF-8"], + ) diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/ChangeIdUtilTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/ChangeIdUtilTest.java index aaeb79c64a..6fed233051 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/ChangeIdUtilTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/ChangeIdUtilTest.java @@ -583,23 +583,6 @@ public class ChangeIdUtilTest { SOB1)); } - public void notestCommitDashV() throws Exception { - assertEquals("a\n" + // - "\n" + // - "Change-Id: I7fc3876fee63c766a2063df97fbe04a2dddd8d7c\n" + // - SOB1 + // - SOB2, // - call("a\n" + // - "\n" + // - SOB1 + // - SOB2 + // - "\n" + // - "# on branch master\n" + // - "diff --git a/src b/src\n" + // - "new file mode 100644\n" + // - "index 0000000..c78b7f0\n")); - } - @Test public void testWithEndingURL() throws Exception { assertEquals("a\n" + // |