10f6ddb37SDavid Ostrovskyload(":tests.bzl", "tests") 20f6ddb37SDavid Ostrovskyload( 30f6ddb37SDavid Ostrovsky "@com_googlesource_gerrit_bazlets//tools:genrule2.bzl", 40f6ddb37SDavid Ostrovsky "genrule2", 50f6ddb37SDavid Ostrovsky) 60f6ddb37SDavid Ostrovsky 70f6ddb37SDavid OstrovskyPKG = "tst/org/eclipse/jgit/" 80f6ddb37SDavid Ostrovsky 90f6ddb37SDavid OstrovskyHELPERS = glob(["src/**/*.java"]) + [PKG + c for c in [ 100f6ddb37SDavid Ostrovsky "api/AbstractRemoteCommandTest.java", 110f6ddb37SDavid Ostrovsky "diff/AbstractDiffTestCase.java", 120f6ddb37SDavid Ostrovsky "internal/storage/file/GcTestCase.java", 130f6ddb37SDavid Ostrovsky "internal/storage/file/PackIndexTestCase.java", 140f6ddb37SDavid Ostrovsky "internal/storage/file/XInputStream.java", 150f6ddb37SDavid Ostrovsky "nls/GermanTranslatedBundle.java", 160f6ddb37SDavid Ostrovsky "nls/MissingPropertyBundle.java", 170f6ddb37SDavid Ostrovsky "nls/NoPropertiesBundle.java", 180f6ddb37SDavid Ostrovsky "nls/NonTranslatedBundle.java", 190f6ddb37SDavid Ostrovsky "revwalk/RevQueueTestCase.java", 200f6ddb37SDavid Ostrovsky "revwalk/RevWalkTestCase.java", 21*a6da0591SDavid Pursehouse "transport/ObjectIdMatcher.java", 220f6ddb37SDavid Ostrovsky "transport/SpiTransport.java", 230f6ddb37SDavid Ostrovsky "treewalk/FileTreeIteratorWithTimeControl.java", 240f6ddb37SDavid Ostrovsky "treewalk/filter/AlwaysCloneTreeFilter.java", 250f6ddb37SDavid Ostrovsky "test/resources/SampleDataRepositoryTestCase.java", 260f6ddb37SDavid Ostrovsky "util/CPUTimeStopWatch.java", 270f6ddb37SDavid Ostrovsky "util/io/Strings.java", 280f6ddb37SDavid Ostrovsky]] 290f6ddb37SDavid Ostrovsky 300f6ddb37SDavid OstrovskyDATA = [ 310f6ddb37SDavid Ostrovsky PKG + "lib/empty.gitindex.dat", 320f6ddb37SDavid Ostrovsky PKG + "lib/sorttest.gitindex.dat", 330f6ddb37SDavid Ostrovsky] 340f6ddb37SDavid Ostrovsky 350f6ddb37SDavid Ostrovskytests(glob( 360f6ddb37SDavid Ostrovsky ["tst/**/*.java"], 37904e9f8bSDavid Pursehouse exclude = HELPERS + DATA, 380f6ddb37SDavid Ostrovsky)) 390f6ddb37SDavid Ostrovsky 400f6ddb37SDavid Ostrovskyjava_library( 410f6ddb37SDavid Ostrovsky name = "helpers", 420f6ddb37SDavid Ostrovsky testonly = 1, 430f6ddb37SDavid Ostrovsky srcs = HELPERS, 440f6ddb37SDavid Ostrovsky resources = DATA, 450f6ddb37SDavid Ostrovsky deps = [ 460f6ddb37SDavid Ostrovsky "//lib:junit", 470f6ddb37SDavid Ostrovsky "//org.eclipse.jgit:jgit", 480f6ddb37SDavid Ostrovsky "//org.eclipse.jgit.junit:junit", 490f6ddb37SDavid Ostrovsky ], 500f6ddb37SDavid Ostrovsky) 510f6ddb37SDavid Ostrovsky 520f6ddb37SDavid Ostrovskyjava_import( 530f6ddb37SDavid Ostrovsky name = "tst_rsrc", 540f6ddb37SDavid Ostrovsky jars = [":tst_rsrc_jar"], 550f6ddb37SDavid Ostrovsky) 560f6ddb37SDavid Ostrovsky 570f6ddb37SDavid Ostrovskygenrule2( 58904e9f8bSDavid Pursehouse name = "tst_rsrc_jar", 59904e9f8bSDavid Pursehouse srcs = glob(["tst-rsrc/**"]), 60904e9f8bSDavid Pursehouse outs = ["tst_rsrc.jar"], 61904e9f8bSDavid Pursehouse cmd = "o=$$PWD/$@ && tar cf - $(SRCS) | tar -C $$TMP --strip-components=2 -xf - && cd $$TMP && zip -qr $$o .", 620f6ddb37SDavid Ostrovsky) 63