-
Notifications
You must be signed in to change notification settings - Fork 102
fix: update macrotest outputs for nightly rust #501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tests/wdk-macros-tests/tests/outputs/nightly/macrotest/bug_tuple_struct_shadowing.expanded.rs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request updates the CI workflow to use nightly Rust and refactors macro test output files to improve error handling patterns. The changes are driven by updates to the nightly Rust compiler which changed how macro expansion generates assertion code.
Key changes:
- Updates CI workflow to install
cargo-makeand run additional top-level tests - Refactors assertion logic in multiple macro test output files from negated
ifstatements tomatchexpressions for clearer error handling - Fixes a symlink creation function to handle edge cases more robustly
Reviewed Changes
Copilot reviewed 11 out of 16 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/test.yaml |
Adds cargo-make installation and new test job for top-level tests |
tests/wdk-macros-tests/src/lib.rs |
Improves symlink creation logic and fixes formatting |
tests/mixed-package-kmdf-workspace/crates/driver/Cargo.toml |
Disables tests due to GitHub runner issues |
Multiple macrotest/*.expanded.rs files |
Updates generated macro expansion outputs to use match instead of negated if for assertions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This pull request updates the CI workflow and refactors several test output files to improve code clarity and test execution. The workflow now installs
cargo-makeand runs additional tests using it. In the test output files, the assertion logic for checking buffer size calculations is refactored to use a more idiomaticmatchstatement for error handling.CI Workflow Improvements
.github/workflows/test.yaml: Adds a step to installcargo-makeand introduces a new job to run top-level tests viacargo-make, in addition to the existing workspace tests.Test Output Refactoring
macrotest/bug_tuple_struct_shadowing.expanded.rs,macrotest/bug_unused_imports.expanded.rs,macrotest/wdf_device_create.expanded.rs,macrotest/wdf_device_create_device_interface.expanded.rs,macrotest/wdf_driver_create.expanded.rs,macrotest/wdf_request_retrieve_output_buffer.expanded.rs,macrotest/wdf_spin_lock_acquire.expanded.rs,macrotest/wdf_verifier_dbg_break_point.expanded.rs): Refactor the assertion for buffer size calculation from a negatedifstatement to amatchstatement for clearer error handling. [1] [2] [3] [4] [5] [6] [7] [8]