Move hardware integration tests to a separate binary crate#72
Merged
Conversation
The library crate was leaking test code to consumers via `pub mod tests` in lib.rs. Move all hardware test files, main.rs, build.rs, and linker scripts into a new `tests-hw` workspace member. Clean up the library by removing test-only features (test-rsa, test-ecdsa, test-hmac, test-hash), binary-only dependencies (cortex-m-rt, panic-halt), empty #[cfg(test)] stubs, and making no_std unconditional.
Gate each crypto test suite in tests-hw behind its feature so cargo xtask hardware-test --suite <X> produces a binary containing only that suite. Default features enable all four so a plain build still runs everything. The xtask per-suite build now passes --no-default-features alongside --features test-X. Also fix size-analysis.yml to reference the new aspeed-ddk-tests-hw binary (the root crate is library-only now), add tests-hw/** to the path filter, and pass -p aspeed-ddk-tests-hw to cargo build/bloat.
cb5f6f7 to
708ab75
Compare
stevenlee7189
approved these changes
Apr 23, 2026
Collaborator
stevenlee7189
left a comment
There was a problem hiding this comment.
Looks good to me.
I’ve tested it on the AST1060 EVB, and it works as expected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.