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