diff options
author | Eugene Kliuchnikov <eustas@google.com> | 2018-06-04 17:53:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-04 17:53:16 +0200 |
commit | 1e7ea1d8e61b7cd51149a2dd491bc86ff8ef460c (patch) | |
tree | 254df89394022cf8d5abe6070483887ebd98d6a1 /java/org/brotli/wrapper/dec/BUILD | |
parent | 29dc2cce9090d6c92c908116e11373bc7fdc8ad1 (diff) | |
download | brotli-1e7ea1d8e61b7cd51149a2dd491bc86ff8ef460c.zip brotli-1e7ea1d8e61b7cd51149a2dd491bc86ff8ef460c.tar.gz brotli-1e7ea1d8e61b7cd51149a2dd491bc86ff8ef460c.tar.bz2 |
Inverse bazel project/workspace tree (#677)
* Inverse bazel workspace tree.
Now each subproject directly depends on root (c) project.
This helps to mitigate Bazel bug bazelbuild/bazel#2391; short summary:
Bazel does not work if referenced subproject `WORKSPACE` uses any
repositories that embedding project does not.
Bright side: building C project is much faster;
no need to download closure, go and JDK...
Diffstat (limited to 'java/org/brotli/wrapper/dec/BUILD')
-rw-r--r-- | java/org/brotli/wrapper/dec/BUILD | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/java/org/brotli/wrapper/dec/BUILD b/java/org/brotli/wrapper/dec/BUILD index c8808fa..fcf0dbf 100644 --- a/java/org/brotli/wrapper/dec/BUILD +++ b/java/org/brotli/wrapper/dec/BUILD @@ -15,6 +15,18 @@ java_library( ), ) +java_library( + name = "test_lib", + testonly = 1, + srcs = glob(["*Test*.java"]), + deps = [ + ":dec", + "//org/brotli/integration:brotli_jni_test_base", + "//org/brotli/integration:bundle_helper", + "@junit_junit//jar", + ], +) + filegroup( name = "brotli_jni", srcs = ["//:brotli_jni.dll"], @@ -22,13 +34,13 @@ filegroup( filegroup( name = "test_bundle", - srcs = ["//java/org/brotli/integration:test_data"], + srcs = ["//org/brotli/integration:test_data"], ) java_test( name = "BrotliDecoderChannelTest", + test_class = "org.brotli.wrapper.dec.BrotliDecoderChannelTest", size = "large", - srcs = ["BrotliDecoderChannelTest.java"], data = [ ":brotli_jni", # Bazel JNI workaround ":test_bundle", @@ -37,18 +49,13 @@ java_test( "-DBROTLI_JNI_LIBRARY=$(location :brotli_jni)", "-DTEST_BUNDLE=$(location :test_bundle)", ], - deps = [ - ":dec", - "//java/org/brotli/integration:brotli_jni_test_base", - "//java/org/brotli/integration:bundle_helper", - "@junit_junit//jar", - ], + runtime_deps = [":test_lib"], ) java_test( name = "BrotliInputStreamTest", + test_class = "org.brotli.wrapper.dec.BrotliInputStreamTest", size = "large", - srcs = ["BrotliInputStreamTest.java"], data = [ ":brotli_jni", # Bazel JNI workaround ":test_bundle", @@ -57,18 +64,13 @@ java_test( "-DBROTLI_JNI_LIBRARY=$(location :brotli_jni)", "-DTEST_BUNDLE=$(location :test_bundle)", ], - deps = [ - ":dec", - "//java/org/brotli/integration:brotli_jni_test_base", - "//java/org/brotli/integration:bundle_helper", - "@junit_junit//jar", - ], + runtime_deps = [":test_lib"], ) java_test( name = "DecoderTest", + test_class = "org.brotli.wrapper.dec.DecoderTest", size = "large", - srcs = ["DecoderTest.java"], data = [ ":brotli_jni", # Bazel JNI workaround ":test_bundle", @@ -77,10 +79,5 @@ java_test( "-DBROTLI_JNI_LIBRARY=$(location :brotli_jni)", "-DTEST_BUNDLE=$(location :test_bundle)", ], - deps = [ - ":dec", - "//java/org/brotli/integration:brotli_jni_test_base", - "//java/org/brotli/integration:bundle_helper", - "@junit_junit//jar", - ], + runtime_deps = [":test_lib"], ) |