177848d63SMatthias Sohnload( 264cbea8aSThomas Wolf "@com_googlesource_gerrit_bazlets//tools:genrule2.bzl", 364cbea8aSThomas Wolf "genrule2", 464cbea8aSThomas Wolf) 564cbea8aSThomas Wolfload("@rules_java//java:defs.bzl", "java_import") 664cbea8aSThomas 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 = [ 1664cbea8aSThomas Wolf "//lib:bcpg", 1764cbea8aSThomas Wolf "//lib:bcprov", 1877848d63SMatthias Sohn "//lib:junit", 1977848d63SMatthias Sohn "//org.eclipse.jgit.gpg.bc:gpg-bc", 2064cbea8aSThomas Wolf "//org.eclipse.jgit.gpg.bc.test:tst_rsrc", 21*f8eefdb0SDavid Ostrovsky "//org.eclipse.jgit:jgit", 2277848d63SMatthias Sohn ], 2377848d63SMatthias Sohn) 2464cbea8aSThomas Wolf 2564cbea8aSThomas Wolfjava_import( 2664cbea8aSThomas Wolf name = "tst_rsrc", 2764cbea8aSThomas Wolf jars = [":tst_rsrc_jar"], 2864cbea8aSThomas Wolf) 2964cbea8aSThomas Wolf 3064cbea8aSThomas Wolfgenrule2( 3164cbea8aSThomas Wolf name = "tst_rsrc_jar", 3264cbea8aSThomas Wolf srcs = glob(["tst-rsrc/**"]), 3364cbea8aSThomas Wolf outs = ["tst_rsrc.jar"], 3464cbea8aSThomas Wolf cmd = "o=$$PWD/$@ && tar cf - $(SRCS) | tar -C $$TMP --strip-components=2 -xf - && cd $$TMP && zip -qr $$o .", 3564cbea8aSThomas Wolf) 36