@@ -144,7 +144,6 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`");
144
144
let subcommand = args. iter ( ) . find ( |& s|
145
145
( s == "build" )
146
146
|| ( s == "check" )
147
- || ( s == "bless" )
148
147
|| ( s == "test" )
149
148
|| ( s == "bench" )
150
149
|| ( s == "doc" )
@@ -165,7 +164,6 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`");
165
164
166
165
// Some subcommands get extra options
167
166
match subcommand. as_str ( ) {
168
- "bless" |
169
167
"test" => {
170
168
opts. optflag ( "" , "no-fail-fast" , "Run all tests regardless of failure" ) ;
171
169
opts. optmulti ( "" , "test-args" , "extra arguments" , "ARGS" ) ;
@@ -177,6 +175,7 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`");
177
175
) ;
178
176
opts. optflag ( "" , "no-doc" , "do not run doc tests" ) ;
179
177
opts. optflag ( "" , "doc" , "only run doc tests" ) ;
178
+ opts. optflag ( "" , "bless" , "update all stderr/stdout files of failing ui tests" ) ;
180
179
} ,
181
180
"bench" => { opts. optmulti ( "" , "test-args" , "extra arguments" , "ARGS" ) ; } ,
182
181
"clean" => { opts. optflag ( "" , "all" , "clean all build artifacts" ) ; } ,
@@ -252,12 +251,6 @@ Arguments:
252
251
compilation, so there's no need to pass it separately, though it won't hurt. We also completely
253
252
ignore the stage passed, as there's no way to compile in non-stage 0 without actually building
254
253
the compiler." ) ;
255
- }
256
- "bless" => {
257
- subcommand_help. push_str ( "\n
258
- Arguments:
259
- This subcommand works exactly like the `test` subcommand, but also updates stderr/stdout files
260
- before they cause a test failure" ) ;
261
254
}
262
255
"test" => {
263
256
subcommand_help. push_str ( "\n
@@ -268,6 +261,7 @@ Arguments:
268
261
./x.py test src/test/run-pass
269
262
./x.py test src/libstd --test-args hash_map
270
263
./x.py test src/libstd --stage 0
264
+ ./x.py test src/test/ui --bless
271
265
272
266
If no arguments are passed then the complete artifacts for that stage are
273
267
compiled and tested.
@@ -329,11 +323,10 @@ Arguments:
329
323
"check" => {
330
324
Subcommand :: Check { paths : paths }
331
325
}
332
- "bless" |
333
326
"test" => {
334
327
Subcommand :: Test {
335
328
paths,
336
- bless : subcommand . as_str ( ) == "bless" ,
329
+ bless : matches . opt_present ( "bless" ) ,
337
330
test_args : matches. opt_strs ( "test-args" ) ,
338
331
rustc_args : matches. opt_strs ( "rustc-args" ) ,
339
332
fail_fast : !matches. opt_present ( "no-fail-fast" ) ,
@@ -436,6 +429,13 @@ impl Subcommand {
436
429
_ => DocTests :: Yes ,
437
430
}
438
431
}
432
+
433
+ pub fn bless ( & self ) -> bool {
434
+ match * self {
435
+ Subcommand :: Test { bless, .. } => bless,
436
+ _ => false ,
437
+ }
438
+ }
439
439
}
440
440
441
441
fn split ( s : Vec < String > ) -> Vec < String > {
0 commit comments