-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Update extract-tests.py to use same test directives as rustdoc. #11490
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
Updated following brson's comments in #11362.
|
There is one thing that would be cool (additionally): checking if there are crate-level compiler attributes at the top of the file For example, this is not valid:
I had to add a trailing So that makes me wondering: why not just drop the extern mod extra business and add it manually in the relevant examples? (cc @brson) |
It looks like compiler attributes can be multiple lines. Should I worry about this case? |
Updated with support for single line compiler directives. More specifically matches the regex Also removed unnecessary |
|
||
# tags to ignore | ||
IGNORE_TAGS = \ | ||
frozenset(["ignore", "ebnf", "abnf", "keyword", "field", "precedence"]) |
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.
Don't the docs also use 'notrust'?
Thanks. This is awesome work. I'd like to request just a little bit more here before merging. The ultimate intent here is to bring all our testing tools inline to the same terminology. To that end can you remove extract-test.py's support for 'xfail-test' completely, and instead of having it ignore the 'ignore' tag make it turn 'ignore' into '//xfail-test' when emitting the tests? (I know this sounds completely counterintuitive on the surface but in most of our testing tools 'ignore' means 'this is a test that is broken' - the next step is to probably change compiletest to also use 'ignore' and not 'xfail-test'). Additional next steps (that you don't have to do now): modify compiletest to understand 'should-fail'. Go through all the currently disabled doc tests convert those that appropriate to |
This is really cool work @wting, thanks! |
|
I'll test this locally tomorrow. I suspect that removing |
Indeed, the current |
Yeah I'll update it by Monday. |
All |
@brson: bump for review. |
This appears to need a rebase again, sorry about that? Feel free to ping me on a rebase and I'll r+ this |
@alexcrichton: Rebased. |
@wting Have you looked at the log? (I would grep again through source to see if there aren't other places where it got missed.) |
Thanks for the catch @adridu59. I think I missed some of the |
Earlier I did a fetch and rebase on mozilla/rust, thought it was a legitimate submodule bump. Anyway I've gone ahead and reverted the llvm submodule pointer back to |
Could you squash the two commits together? |
Squashed! |
…=alexcrichton Refactored the file quite a bit, I can add unit tests if desired. There's a few changes from the previous version's behavior: - destination directory will be created if it doesn't exist - strings and file is written as unicode I have a few questions, but will ask them in #11362.
Revert rust-lang#11490 Closes rust-lang#11725 rust-lang#11490 was a little misguided. Quoting the test name should be a client concern, since it's the client that actually runs `cargo`.
Refactored the file quite a bit, I can add unit tests if desired. There's a few changes from the previous version's behavior:
I have a few questions, but will ask them in #11362.