diff options
Diffstat (limited to 'src/bootstrap/flags.rs')
| -rw-r--r-- | src/bootstrap/flags.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs index 5315a3028ff..90dd5d819b0 100644 --- a/src/bootstrap/flags.rs +++ b/src/bootstrap/flags.rs @@ -59,6 +59,8 @@ pub enum Subcommand { }, Test { paths: Vec<PathBuf>, + /// Whether to automatically update stderr/stdout files + bless: bool, test_args: Vec<String>, rustc_args: Vec<String>, fail_fast: bool, @@ -173,6 +175,7 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`"); ); opts.optflag("", "no-doc", "do not run doc tests"); opts.optflag("", "doc", "only run doc tests"); + opts.optflag("", "bless", "update all stderr/stdout files of failing ui tests"); }, "bench" => { opts.optmulti("", "test-args", "extra arguments", "ARGS"); }, "clean" => { opts.optflag("", "all", "clean all build artifacts"); }, @@ -258,6 +261,7 @@ Arguments: ./x.py test src/test/run-pass ./x.py test src/libstd --test-args hash_map ./x.py test src/libstd --stage 0 + ./x.py test src/test/ui --bless If no arguments are passed then the complete artifacts for that stage are compiled and tested. @@ -322,6 +326,7 @@ Arguments: "test" => { Subcommand::Test { paths, + bless: matches.opt_present("bless"), test_args: matches.opt_strs("test-args"), rustc_args: matches.opt_strs("rustc-args"), fail_fast: !matches.opt_present("no-fail-fast"), @@ -424,6 +429,13 @@ impl Subcommand { _ => DocTests::Yes, } } + + pub fn bless(&self) -> bool { + match *self { + Subcommand::Test { bless, .. } => bless, + _ => false, + } + } } fn split(s: Vec<String>) -> Vec<String> { |
