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", 21a6da0591SDavid Pursehouse "transport/ObjectIdMatcher.java", 220f6ddb37SDavid Ostrovsky "transport/SpiTransport.java", 2308b0a863SThomas Wolf "transport/SshTestBase.java", 240f6ddb37SDavid Ostrovsky "treewalk/FileTreeIteratorWithTimeControl.java", 250f6ddb37SDavid Ostrovsky "treewalk/filter/AlwaysCloneTreeFilter.java", 260f6ddb37SDavid Ostrovsky "test/resources/SampleDataRepositoryTestCase.java", 270f6ddb37SDavid Ostrovsky "util/CPUTimeStopWatch.java", 280f6ddb37SDavid Ostrovsky "util/io/Strings.java", 290f6ddb37SDavid Ostrovsky]] 300f6ddb37SDavid Ostrovsky 310f6ddb37SDavid OstrovskyDATA = [ 320f6ddb37SDavid Ostrovsky PKG + "lib/empty.gitindex.dat", 330f6ddb37SDavid Ostrovsky PKG + "lib/sorttest.gitindex.dat", 340f6ddb37SDavid Ostrovsky] 350f6ddb37SDavid Ostrovsky 360f6ddb37SDavid Ostrovskytests(glob( 370f6ddb37SDavid Ostrovsky ["tst/**/*.java"], 38904e9f8bSDavid Pursehouse exclude = HELPERS + DATA, 390f6ddb37SDavid Ostrovsky)) 400f6ddb37SDavid Ostrovsky 410f6ddb37SDavid Ostrovskyjava_library( 420f6ddb37SDavid Ostrovsky name = "helpers", 430f6ddb37SDavid Ostrovsky testonly = 1, 440f6ddb37SDavid Ostrovsky srcs = HELPERS, 450f6ddb37SDavid Ostrovsky resources = DATA, 460f6ddb37SDavid Ostrovsky deps = [ 4708b0a863SThomas Wolf "//lib:jsch", 48*28cfda54SDavid Pursehouse "//lib:junit", 4908b0a863SThomas Wolf "//lib:sshd-core", 5008b0a863SThomas Wolf "//lib:sshd-sftp", 510f6ddb37SDavid Ostrovsky "//org.eclipse.jgit:jgit", 520f6ddb37SDavid Ostrovsky "//org.eclipse.jgit.junit:junit", 530f6ddb37SDavid Ostrovsky ], 540f6ddb37SDavid Ostrovsky) 550f6ddb37SDavid Ostrovsky 560f6ddb37SDavid Ostrovskyjava_import( 570f6ddb37SDavid Ostrovsky name = "tst_rsrc", 580f6ddb37SDavid Ostrovsky jars = [":tst_rsrc_jar"], 590f6ddb37SDavid Ostrovsky) 600f6ddb37SDavid Ostrovsky 610f6ddb37SDavid Ostrovskygenrule2( 62904e9f8bSDavid Pursehouse name = "tst_rsrc_jar", 63904e9f8bSDavid Pursehouse srcs = glob(["tst-rsrc/**"]), 64904e9f8bSDavid Pursehouse outs = ["tst_rsrc.jar"], 65904e9f8bSDavid Pursehouse cmd = "o=$$PWD/$@ && tar cf - $(SRCS) | tar -C $$TMP --strip-components=2 -xf - && cd $$TMP && zip -qr $$o .", 660f6ddb37SDavid Ostrovsky) 67