Skip to content

Move hardware integration tests to a separate binary crate#72

Merged
rusty1968 merged 2 commits into
OpenPRoT:mainfrom
rusty1968:test-bin-crate
Apr 27, 2026
Merged

Move hardware integration tests to a separate binary crate#72
rusty1968 merged 2 commits into
OpenPRoT:mainfrom
rusty1968:test-bin-crate

Conversation

@rusty1968
Copy link
Copy Markdown
Contributor

No description provided.

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.
Copy link
Copy Markdown
Collaborator

@stevenlee7189 stevenlee7189 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
I’ve tested it on the AST1060 EVB, and it works as expected.

@rusty1968 rusty1968 merged commit e2d49b9 into OpenPRoT:main Apr 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants