Skip to content

Commit 8cb0c78

Browse files
authored
Make it easier to use rust_test_suite in macros. (#791)
* Make it easier to use rust_test_suite in macros. * Separate with underscore.
1 parent 11551b1 commit 8cb0c78

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rust/private/rust.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1210,8 +1210,9 @@ def rust_test_suite(name, srcs, **kwargs):
12101210
if not src.endswith(".rs"):
12111211
fail("srcs should have `.rs` extensions")
12121212

1213+
# Prefixed with `name` to allow parameterization with macros
12131214
# The test name should not end with `.rs`
1214-
test_name = src[:-3]
1215+
test_name = name + "_" + src[:-3]
12151216
rust_test(
12161217
name = test_name,
12171218
crate_name = test_name.replace("/", "_"),

0 commit comments

Comments
 (0)