aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/rust/hello_lib/BUILD
diff options
context:
space:
mode:
authorGravatar David Chen <dzc@google.com>2015-10-05 12:21:32 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-10-05 15:16:40 +0000
commitab141f8d1035eb30bbb9dc09d89ea6a3ba83cc0f (patch)
tree587e9401adeb385d3d859a3c4458b7d7945f2674 /examples/rust/hello_lib/BUILD
parent73ee6215490ed957c13c8dbe03814b039d6ddd5c (diff)
[rust] Add rust_bench_test and rust_doc_test rules and improve usability of rust_test rule.
* Add rust_bench_test rule to run benchmark tests * Add rust_doc_test rule to run Rust documentation tests. * Enable rust_test and rust_bench_test to depend directly on a rust_library target. * Rename rust_docs rule to rust_doc for consistency. RELNOTES: [rust] Add rust_bench_test and rust_doc_test rules and improve usability of rust_test tule. -- MOS_MIGRATED_REVID=104648497
Diffstat (limited to 'examples/rust/hello_lib/BUILD')
-rw-r--r--examples/rust/hello_lib/BUILD26
1 files changed, 21 insertions, 5 deletions
diff --git a/examples/rust/hello_lib/BUILD b/examples/rust/hello_lib/BUILD
index a075f8b168..90941e6a42 100644
--- a/examples/rust/hello_lib/BUILD
+++ b/examples/rust/hello_lib/BUILD
@@ -1,6 +1,12 @@
package(default_visibility = ["//visibility:public"])
-load("/tools/build_rules/rust/rust", "rust_library", "rust_docs", "rust_test")
+load(
+ "/tools/build_rules/rust/rust",
+ "rust_library",
+ "rust_test",
+ "rust_doc",
+ "rust_doc_test",
+)
rust_library(
name = "hello_lib",
@@ -10,13 +16,23 @@ rust_library(
],
)
-rust_docs(
- name = "hello_lib_docs",
- dep = ":hello_lib",
+rust_test(
+ name = "hello_lib_test",
+ deps = [":hello_lib"],
)
rust_test(
- name = "greeting",
+ name = "greeting_test",
srcs = ["tests/greeting.rs"],
deps = [":hello_lib"],
)
+
+rust_doc(
+ name = "hello_lib_doc",
+ dep = ":hello_lib",
+)
+
+rust_doc_test(
+ name = "hello_lib_doc_test",
+ dep = ":hello_lib",
+)