@@ -18,13 +18,11 @@ fn gated_stable_channel() {
1818 . build ( ) ;
1919
2020 p. cargo ( "report timings" )
21- . with_status ( 1 )
21+ . with_status ( 101 )
2222 . with_stderr_data ( str![ [ r#"
23- [ERROR] unrecognized subcommand 'timings'
24-
25- Usage: cargo report [OPTIONS] <COMMAND>
26-
27- For more information, try '--help'.
23+ [ERROR] the `cargo report timings` command is unstable, and only available on the nightly channel of Cargo, but this is the `stable` channel
24+ See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels.
25+ See https://github.com/rust-lang/cargo/issues/15844 for more information about the `cargo report timings` command.
2826
2927"# ] ] )
3028 . run ( ) ;
@@ -39,13 +37,10 @@ fn gated_unstable_options() {
3937
4038 p. cargo ( "report timings" )
4139 . masquerade_as_nightly_cargo ( & [ "build-analysis" ] )
42- . with_status ( 1 )
40+ . with_status ( 101 )
4341 . with_stderr_data ( str![ [ r#"
44- [ERROR] unrecognized subcommand 'timings'
45-
46- Usage: cargo report [OPTIONS] <COMMAND>
47-
48- For more information, try '--help'.
42+ [ERROR] the `cargo report timings` command is unstable, pass `-Z build-analysis` to enable it
43+ See https://github.com/rust-lang/cargo/issues/15844 for more information about the `cargo report timings` command.
4944
5045"# ] ] )
5146 . run ( ) ;
@@ -55,15 +50,7 @@ For more information, try '--help'.
5550fn no_log ( ) {
5651 cargo_process ( "report timings -Zbuild-analysis" )
5752 . masquerade_as_nightly_cargo ( & [ "build-analysis" ] )
58- . with_status ( 1 )
59- . with_stderr_data ( str![ [ r#"
60- [ERROR] unrecognized subcommand 'timings'
61-
62- Usage: cargo report [OPTIONS] <COMMAND>
63-
64- For more information, try '--help'.
65-
66- "# ] ] )
53+ . with_stderr_data ( str![ "" ] )
6754 . run ( ) ;
6855}
6956
@@ -91,15 +78,7 @@ fn no_log_for_the_current_workspace() {
9178
9279 bar. cargo ( "report timings -Zbuild-analysis" )
9380 . masquerade_as_nightly_cargo ( & [ "build-analysis" ] )
94- . with_status ( 1 )
95- . with_stderr_data ( str![ [ r#"
96- [ERROR] unrecognized subcommand 'timings'
97-
98- Usage: cargo report [OPTIONS] <COMMAND>
99-
100- For more information, try '--help'.
101-
102- "# ] ] )
81+ . with_stderr_data ( str![ "" ] )
10382 . run ( ) ;
10483}
10584
@@ -120,15 +99,7 @@ fn invalid_log() {
12099
121100 p. cargo ( "report timings -Zbuild-analysis" )
122101 . masquerade_as_nightly_cargo ( & [ "build-analysis" ] )
123- . with_status ( 1 )
124- . with_stderr_data ( str![ [ r#"
125- [ERROR] unrecognized subcommand 'timings'
126-
127- Usage: cargo report [OPTIONS] <COMMAND>
128-
129- For more information, try '--help'.
130-
131- "# ] ] )
102+ . with_stderr_data ( str![ "" ] )
132103 . run ( ) ;
133104}
134105
@@ -150,15 +121,7 @@ fn empty_log() {
150121 // If the make-up log file was picked, the command would have failed.
151122 p. cargo ( "report timings -Zbuild-analysis" )
152123 . masquerade_as_nightly_cargo ( & [ "build-analysis" ] )
153- . with_status ( 1 )
154- . with_stderr_data ( str![ [ r#"
155- [ERROR] unrecognized subcommand 'timings'
156-
157- Usage: cargo report [OPTIONS] <COMMAND>
158-
159- For more information, try '--help'.
160-
161- "# ] ] )
124+ . with_stderr_data ( str![ "" ] )
162125 . run ( ) ;
163126}
164127
@@ -189,15 +152,7 @@ fn prefer_latest() {
189152 // if it had picked the corrupted first log file, it would have failed.
190153 p. cargo ( "report timings -Zbuild-analysis" )
191154 . masquerade_as_nightly_cargo ( & [ "build-analysis" ] )
192- . with_status ( 1 )
193- . with_stderr_data ( str![ [ r#"
194- [ERROR] unrecognized subcommand 'timings'
195-
196- Usage: cargo report [OPTIONS] <COMMAND>
197-
198- For more information, try '--help'.
199-
200- "# ] ] )
155+ . with_stderr_data ( str![ "" ] )
201156 . run ( ) ;
202157
203158 assert_eq ! ( p. glob( "**/cargo-timing-*.html" ) . count( ) , 0 ) ;
@@ -236,15 +191,7 @@ fn prefer_workspace() {
236191 // Back to foo, if it had picked the corrupted log file, it would have failed.
237192 foo. cargo ( "report timings -Zbuild-analysis" )
238193 . masquerade_as_nightly_cargo ( & [ "build-analysis" ] )
239- . with_status ( 1 )
240- . with_stderr_data ( str![ [ r#"
241- [ERROR] unrecognized subcommand 'timings'
242-
243- Usage: cargo report [OPTIONS] <COMMAND>
244-
245- For more information, try '--help'.
246-
247- "# ] ] )
194+ . with_stderr_data ( str![ "" ] )
248195 . run ( ) ;
249196
250197 assert_eq ! ( foo. glob( "**/cargo-timing-*.html" ) . count( ) , 0 ) ;
@@ -267,15 +214,7 @@ fn outside_workspace() {
267214 // * save the report in a temp directory
268215 cargo_process ( "report timings -Zbuild-analysis" )
269216 . masquerade_as_nightly_cargo ( & [ "build-analysis" ] )
270- . with_status ( 1 )
271- . with_stderr_data ( str![ [ r#"
272- [ERROR] unrecognized subcommand 'timings'
273-
274- Usage: cargo report [OPTIONS] <COMMAND>
275-
276- For more information, try '--help'.
277-
278- "# ] ] )
217+ . with_stderr_data ( str![ "" ] )
279218 . run ( ) ;
280219
281220 // Have no timing HTML under target directory
@@ -296,15 +235,7 @@ fn with_section_timings() {
296235
297236 p. cargo ( "report timings -Zbuild-analysis" )
298237 . masquerade_as_nightly_cargo ( & [ "build-analysis" ] )
299- . with_status ( 1 )
300- . with_stderr_data ( str![ [ r#"
301- [ERROR] unrecognized subcommand 'timings'
302-
303- Usage: cargo report [OPTIONS] <COMMAND>
304-
305- For more information, try '--help'.
306-
307- "# ] ] )
238+ . with_stderr_data ( str![ "" ] )
308239 . run ( ) ;
309240
310241 assert_eq ! ( p. glob( "**/cargo-timing-*.html" ) . count( ) , 0 ) ;
@@ -335,15 +266,7 @@ fn with_multiple_targets() {
335266
336267 p. cargo ( "report timings -Zbuild-analysis" )
337268 . masquerade_as_nightly_cargo ( & [ "build-analysis" ] )
338- . with_status ( 1 )
339- . with_stderr_data ( str![ [ r#"
340- [ERROR] unrecognized subcommand 'timings'
341-
342- Usage: cargo report [OPTIONS] <COMMAND>
343-
344- For more information, try '--help'.
345-
346- "# ] ] )
269+ . with_stderr_data ( str![ "" ] )
347270 . run ( ) ;
348271
349272 assert_eq ! ( p. glob( "**/cargo-timing-*.html" ) . count( ) , 0 ) ;
0 commit comments