-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
DynamicCastRework, Part 2: Test Suite #33473
DynamicCastRework, Part 2: Test Suite #33473
Conversation
A few important notes:
|
@swift-ci Please test Linux |
Build failed |
@swift-ci Please test Linux |
Build failed |
Build failed |
@swift-ci Please test macOS |
Build failed |
@swift-ci Please test macOS |
Build failed |
It's very exciting to see a tested, hopefully complete, specification shared by the runtime and optimizer! |
/pull/33561 |
Build failed |
Build failed |
@swift-ci Please test |
Build failed |
Build failed |
This validation test exercises a large matrix of types and invariants for dynamic casting. It's formulated as a Python script that emits a number of Swift test programs, compiles, and executes them. The programs are compiled in Swift 4 and 5 mode, with -O and -Onone. The invariants used by these tests follow the specification presented in PR swiftlang#33010. It should be easy to add more as desired. I've tried to design this in such a way that CI logs can provide enough information to narrowly identify the problem area: Separate test cases are generated for each invariant and each type (in particular, this helps with compiler crashes that report the full body of the function in question). The files and test suites are named to identify the optimization mode. The goal of this test suite is to cover a broad cross-section of casting capabilities and combinations, and to make it easy to expand the matrix of combinations. New invariants can easily be added and applied to many types; as new types are added to this test, they can exploit the existing invariants and be exercised across all optimization modes.
c46f696
to
5ddd0ff
Compare
@swift-ci Please test |
Build failed |
Build failed |
@swift-ci Please test |
Build failed |
Build failed |
An improved version of this work has been merged via other PRs. |
This validation test exercises a large matrix of types and invariants for
dynamic casting. It's formulated as a Python script that emits a number of
Swift test programs, compiles, and executes them. The programs are compiled in
Swift 4 and 5 mode, with -O and -Onone.
The invariants used by these tests follow the specification presented
in PR #33010. It should be easy to add more as desired.
I've tried to design this in such a way that CI logs can provide enough
information to narrowly identify the problem area: Separate test cases
are generated for each invariant and each type (in particular, this helps
with compiler crashes that report the full body of the function in question).
The files and test suites are named to identify the optimization mode.
The goal of this test suite is to cover a broad cross-section of casting
capabilities and combinations, and to make it easy to expand the matrix of
combinations. New invariants can easily be added and applied to many types;
as new types are added to this test, they can exploit the existing invariants
and be exercised across all optimization modes.