-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Move compile-fail tests that are rejected by the parser to parse-fail #22011
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
1433256
to
4e544ca
Compare
You can also move here these two tests: |
@bors r+ 4e544ca nice |
very excited to see this infrastructure coming together |
Nice. |
@Potpourri done. But there are some more files that fail during the parse stage. I'll try to fix the bug mentioned in the description as soon as possible. |
4e544ca
to
01db9a4
Compare
This PR moves all `compile-fail` tests that fail at the parsing stage to a `parse-fail` directory, in order to use the tests in the `parse-fail` directory to test if the new LALR parser rejects the same files as the Rust parser. I also adjusted the `testparser.py` script to handle the tests in `parse-fail` differently. However during working on this, I discovered, that Rust's parser sometimes fails during parsing, but does not return a nonzero return code, e.g. compiling `/test/compile-fail/doc-before-semi.rs` with `-Z parse-only` prints an error message, but returns status code 0. Compiling the same file without `-Z parse-only`, the same error message is displayed, but error code 101 returned. I'll look into that over the next week.
Unfortunately I think that this actually stopped running all these tests: #22118 (comment). Don't sweat it too much, but I recommend doing extra tests on Makefile-based changes in the future, we unfortunately don't have automation in place to make sure tests are run! |
This PR moves all
compile-fail
tests that fail at the parsing stage to aparse-fail
directory, in order to use the tests in theparse-fail
directory to test if the new LALR parser rejects the same files as the Rust parser (as suggested by @brson in #21452). I also adjusted thetestparser.py
script to handle the tests inparse-fail
differently.However during working on this, I discovered, that Rust's parser sometimes fails during parsing, but does not return a nonzero return code, e.g. compiling
/test/compile-fail/doc-before-semi.rs
with-Z parse-only
prints an error message, but returns status code 0. Compiling the same file without-Z parse-only
, the same error message is displayed, but error code 101 returned. I'll look into that over the next week.