diff options
| author | Ethan D. Twardy <ethan.twardy@gmail.com> | 2024-07-04 09:55:43 -0500 |
|---|---|---|
| committer | Miguel Ojeda <ojeda@kernel.org> | 2024-11-01 22:02:53 +0100 |
| commit | 8d3f50795ac2857b0c2fd43558e078650d58d750 (patch) | |
| tree | b02cac547828d4ab0829a39e077e4b5a87dd7fea /rust/Makefile | |
| parent | b2c261fa8629dff2bd1143fa790797a773ace102 (diff) | |
rust: enable macros::module! tests
Previously, these tests were ignored due to a missing necessary dependency
on the `kernel` crate. Enable the tests, and update them: for both,
add the parameter to `init()`; for the first one, remove the use of a
kernel parameter mechanism that was never merged.
Signed-off-by: Ethan D. Twardy <ethan.twardy@gmail.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://github.com/Rust-for-Linux/linux/issues/1076
Link: https://lore.kernel.org/r/20240704145607.17732-3-ethan.twardy@gmail.com
[ Rebased (moved the `export` to the `rustdoc_test` rule, enable the
firmware example too). Removed `export` for `RUST_MODFILE`. Removed
unneeded `rust` language in examples, as well as `#[macro_use]`
`extern`s. Reworded accordingly. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/Makefile')
| -rw-r--r-- | rust/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/Makefile b/rust/Makefile index 7fb05a797f7a..6daaa4dc21db 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -145,6 +145,7 @@ rusttestlib-uapi: $(src)/uapi/lib.rs FORCE quiet_cmd_rustdoc_test = RUSTDOC T $< cmd_rustdoc_test = \ + RUST_MODFILE=test.rs \ OBJTREE=$(abspath $(objtree)) \ $(RUSTDOC) --test $(rust_common_flags) \ @$(objtree)/include/generated/rustc_cfg \ |
