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", 210f6ddb37SDavid Ostrovsky "transport/SpiTransport.java", 220f6ddb37SDavid Ostrovsky "treewalk/FileTreeIteratorWithTimeControl.java", 230f6ddb37SDavid Ostrovsky "treewalk/filter/AlwaysCloneTreeFilter.java", 240f6ddb37SDavid Ostrovsky "test/resources/SampleDataRepositoryTestCase.java", 250f6ddb37SDavid Ostrovsky "util/CPUTimeStopWatch.java", 260f6ddb37SDavid Ostrovsky "util/io/Strings.java", 270f6ddb37SDavid Ostrovsky]] 280f6ddb37SDavid Ostrovsky 290f6ddb37SDavid OstrovskyDATA = [ 300f6ddb37SDavid Ostrovsky PKG + "lib/empty.gitindex.dat", 310f6ddb37SDavid Ostrovsky PKG + "lib/sorttest.gitindex.dat", 320f6ddb37SDavid Ostrovsky] 330f6ddb37SDavid Ostrovsky 340f6ddb37SDavid Ostrovskytests(glob( 350f6ddb37SDavid Ostrovsky ["tst/**/*.java"], 36*904e9f8bSDavid Pursehouse exclude = HELPERS + DATA, 370f6ddb37SDavid Ostrovsky)) 380f6ddb37SDavid Ostrovsky 390f6ddb37SDavid Ostrovskyjava_library( 400f6ddb37SDavid Ostrovsky name = "helpers", 410f6ddb37SDavid Ostrovsky testonly = 1, 420f6ddb37SDavid Ostrovsky srcs = HELPERS, 430f6ddb37SDavid Ostrovsky resources = DATA, 440f6ddb37SDavid Ostrovsky deps = [ 450f6ddb37SDavid Ostrovsky "//lib:junit", 460f6ddb37SDavid Ostrovsky "//org.eclipse.jgit:jgit", 470f6ddb37SDavid Ostrovsky "//org.eclipse.jgit.junit:junit", 480f6ddb37SDavid Ostrovsky ], 490f6ddb37SDavid Ostrovsky) 500f6ddb37SDavid Ostrovsky 510f6ddb37SDavid Ostrovskyjava_import( 520f6ddb37SDavid Ostrovsky name = "tst_rsrc", 530f6ddb37SDavid Ostrovsky jars = [":tst_rsrc_jar"], 540f6ddb37SDavid Ostrovsky) 550f6ddb37SDavid Ostrovsky 560f6ddb37SDavid Ostrovskygenrule2( 57*904e9f8bSDavid Pursehouse name = "tst_rsrc_jar", 58*904e9f8bSDavid Pursehouse srcs = glob(["tst-rsrc/**"]), 59*904e9f8bSDavid Pursehouse outs = ["tst_rsrc.jar"], 60*904e9f8bSDavid Pursehouse cmd = "o=$$PWD/$@ && tar cf - $(SRCS) | tar -C $$TMP --strip-components=2 -xf - && cd $$TMP && zip -qr $$o .", 610f6ddb37SDavid Ostrovsky) 62