-
Notifications
You must be signed in to change notification settings - Fork 270
ci: test on aarch64 macOS #1280
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
Merged
Merged
Conversation
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
07e8fa9
to
a0ec606
Compare
a0ec606
to
a780d51
Compare
55afd62
to
3d0c6a4
Compare
3bf57ec
to
2dc2cb7
Compare
fw-immunant
reviewed
Jul 23, 2025
fw-immunant
approved these changes
Jul 23, 2025
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.
A couple questions inline; when addressed this is good to merge.
…rkspace crates rarely change
This way, things like `#[cfg]` and `#[should_panic]` work. This seems simpler than trying to parse the `#[cfg]`s from Python and keeping the old way. This generates a much simpler `lib.rs` instead of a `main.rs` that tries to be its own simple test runner. Rust's test runner doesn't distinguish between expected and unexpected failures (it should counts an expected failure as a success), so we lose this output information, but an expected failure really is a success so this should be fine.
…ome things are skipped
008e5d8
to
d03ceb5
Compare
2dc2cb7
to
4f6f8c7
Compare
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.
This starts testing in CI on aarch64 macOS, our first aarch64 target to test.
Varargs are broken on aarch64 (#1281), so this PR also disables varargs tests on aarch64.
However, doing this didn't work with the current
test_translator.py
, which textually searches the Rust test file forfn test_*
s.#[cfg(not(target_arch = "aarch64"))]
is the simplest and most straightforward way to disable such tests on aarch64, but parsing this from Python and generating a test runner inmain.rs
that's platform-dependent is tricky. Since Rust's built-in test runner already does much of this, and does it better, I switchedtest_translator.py
to simply runcargo test
. This means marking all of the test functions with#[test]
and generating a mostly emptylib.rs
instead of amain.rs
. We also lose the ability to distinguish between expected failures and successes, ascargo test
treats them the same, but I think this is fine. It also means we can use the idiomatic#[should_panic]
instead of parsing the non-standard// xfail
ourselves.I can also break this part out into a separate PR if you think that'd be helpful.