732 B
732 B
Test rules
Declare Rust tests in Bazel
Rule
Declare Rust test files in the nearest Bazel BUILD file with rust_test.
Do not add [[test]] entries to Cargo.toml unless the operator explicitly requests Cargo test declarations.
Rationale
This repository declares Rust test targets in Bazel. Keeping test declarations in Bazel avoids duplicate test target lists.
Use one source input style per rust_test
Rule
Do not set both crate and srcs on a rust_test target.
Use exactly one input style for each Rust test target.
Rationale
rules_rust rejects rust_test targets that set both crate and srcs.
Keeping one input style per target makes the test declaration valid and unambiguous.