177848d63SMatthias Sohnload( 2*64cbea8aSThomas Wolf "@com_googlesource_gerrit_bazlets//tools:genrule2.bzl", 3*64cbea8aSThomas Wolf "genrule2", 4*64cbea8aSThomas Wolf) 5*64cbea8aSThomas Wolfload("@rules_java//java:defs.bzl", "java_import") 6*64cbea8aSThomas Wolfload( 777848d63SMatthias Sohn "@com_googlesource_gerrit_bazlets//tools:junit.bzl", 877848d63SMatthias Sohn "junit_tests", 977848d63SMatthias Sohn) 1077848d63SMatthias Sohn 1177848d63SMatthias Sohnjunit_tests( 1277848d63SMatthias Sohn name = "bc", 1377848d63SMatthias Sohn srcs = glob(["tst/**/*.java"]), 1477848d63SMatthias Sohn tags = ["bc"], 1577848d63SMatthias Sohn deps = [ 16*64cbea8aSThomas Wolf "//lib:bcpg", 17*64cbea8aSThomas Wolf "//lib:bcprov", 1877848d63SMatthias Sohn "//lib:junit", 1977848d63SMatthias Sohn "//org.eclipse.jgit.gpg.bc:gpg-bc", 20*64cbea8aSThomas Wolf "//org.eclipse.jgit.gpg.bc.test:tst_rsrc", 2177848d63SMatthias Sohn ], 2277848d63SMatthias Sohn) 23*64cbea8aSThomas Wolf 24*64cbea8aSThomas Wolfjava_import( 25*64cbea8aSThomas Wolf name = "tst_rsrc", 26*64cbea8aSThomas Wolf jars = [":tst_rsrc_jar"], 27*64cbea8aSThomas Wolf) 28*64cbea8aSThomas Wolf 29*64cbea8aSThomas Wolfgenrule2( 30*64cbea8aSThomas Wolf name = "tst_rsrc_jar", 31*64cbea8aSThomas Wolf srcs = glob(["tst-rsrc/**"]), 32*64cbea8aSThomas Wolf outs = ["tst_rsrc.jar"], 33*64cbea8aSThomas Wolf cmd = "o=$$PWD/$@ && tar cf - $(SRCS) | tar -C $$TMP --strip-components=2 -xf - && cd $$TMP && zip -qr $$o .", 34*64cbea8aSThomas Wolf) 35