Uh oh!
There was an error while loading. Please reload this page.
Add bless x.py subcommand for easy ui test replacement - #50806
Conversation
oli-obk
commented
May 16, 2018
cc @ehuss |
kennytm
commented
May 16, 2018
With the implementation in this PR, I think it should be a $ ./x.py test src/test/ui --blessIn #49815's suggestion the subcommand works like $ ./x.py test src/test/ui(... fix errors ...)
$ ./x.py test src/test/ui(... fix errors ...)
$ ./x.py test src/test/ui(done)
$ ./x.py bless src/test/ui # <- will not run tests again |
In my experience the workflow is so I'd very much prefer to do the "test-update-test" operation in one command to keeping the "update" logic separate. I'm not sure about |
oli-obk
commented
May 16, 2018
Yes that is also my workflow. I changed it to a flag, as that makes the code simpler and I already pass such a mess of flags to |
rust-highfive
commented
May 16, 2018
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
ehuss
left a comment
There was a problem hiding this comment.
Sweet! Sorry I didn't get to this sooner! (BTW, love the branch name.)
Maybe the error message that says "To update references, run this command..." should be updated to the new command?
Also, beware that there are a bunch of path changes coming in #50400. There shouldn't be any fundamental problems, but some of the function names will change.
There was a problem hiding this comment.
This doesn't seem to work for nll files. For an example, copy E0508.rs to src/test/ui and try to bless it. You should end up with these three files:
E0508.ast.nll.stderr
E0508.ast.stderr
E0508.mir.stderr
I think the issue is that expected_output_path doesn't include mode if the file doesn't already exist. I think the solution is to call the global expected_output_path (not the self version).
nikomatsakis
commented
May 16, 2018
@ehuss -- you're the one most familiar with the code at this point, would you be up for tackling the review here? (I can delegate to you from bors) |
ehuss
commented
May 17, 2018
@nikomatsakis I don't mind, but I don't have any more comments beyond what I posted. |
oli-obk
commented
May 17, 2018
@bors delegate=ehuss |
bors
commented
May 17, 2018
✌️ @ehuss can now approve this pull request |
killercup
commented
May 17, 2018
@oli-obk want to add replacement of |
bors
commented
May 17, 2018
☔ The latest upstream changes (presumably #50400) made this pull request unmergeable. Please resolve the merge conflicts. |
oli-obk
commented
May 17, 2018
@killercup that should automagically work with this PR ;) There's no code specific to |
nikomatsakis
commented
May 17, 2018
oli-obk
commented
May 17, 2018
Yea, I was just waiting for travis :) Last time I broke some tests that ran very late in the pipeline. |
ehuss
commented
May 17, 2018
@bors: r+ Nice! |
bors
commented
May 17, 2018
📌 Commit 0ac2fd1 has been approved by |
Mark-Simulacrum
commented
May 17, 2018
@bors rollup |
Add `bless` x.py subcommand for easy ui test replacement fixesrust-lang#49815 r? @nikomatsakis
Rollup of 10 pull requests Successful merges: - #50387 (Remove leftover tab in libtest outputs) - #50553 (Add Option::xor method) - #50610 (Improve format string errors) - #50649 (Tweak `nearest_common_ancestor()`.) - #50790 (Fix grammar documentation wrt Unicode identifiers) - #50791 (Fix null exclusions in grammar docs) - #50806 (Add `bless` x.py subcommand for easy ui test replacement) - #50818 (Speed up `opt_normalize_projection_type`) - #50837 (Revert #49767) - #50839 (Make sure people know the book is free oline) Failed merges:
scottmcm
commented
May 18, 2018
Thank you especially from those of us who run on windows without a shell to run the |
fixes#49815
r? @nikomatsakis