@@ -113,7 +113,7 @@ const RUN_INTERNAL_TESTS: bool = cfg!(feature = "internal");
113113fn base_config ( test_dir : & str ) -> ( compiletest:: Config , Args ) {
114114 let args = Args :: test ( ) ;
115115 let mut config = compiletest:: Config {
116- mode : TestMode :: Yolo ,
116+ mode : TestMode :: Yolo { rustfix : true } ,
117117 stderr_filters : vec ! [ ] ,
118118 stdout_filters : vec ! [ ] ,
119119 output_conflict_handling : if var_os ( "GITHUB_ACTION" ) . is_none ( )
@@ -124,7 +124,10 @@ fn base_config(test_dir: &str) -> (compiletest::Config, Args) {
124124 OutputConflictHandling :: Error ( "cargo uibless" . into ( ) )
125125 } ,
126126 target : None ,
127- out_dir : PathBuf :: from ( std:: env:: var_os ( "CARGO_TARGET_DIR" ) . unwrap_or ( "target" . into ( ) ) ) . join ( "ui_test" ) ,
127+ out_dir : PathBuf :: from ( std:: env:: var_os ( "CARGO_TARGET_DIR" ) . unwrap_or ( "target" . into ( ) ) )
128+ . join ( "ui_test" )
129+ . canonicalize ( )
130+ . unwrap ( ) ,
128131 ..compiletest:: Config :: rustc ( Path :: new ( "tests" ) . join ( test_dir) )
129132 } ;
130133 let current_exe_path = env:: current_exe ( ) . unwrap ( ) ;
@@ -187,12 +190,18 @@ fn run_ui() {
187190
188191 let test_filter = test_filter ( ) ;
189192
193+ let quiet = args. quiet ;
194+
190195 compiletest:: run_tests_generic (
191196 config,
192197 args,
193198 move |path, args| compiletest:: default_file_filter ( path, args) && test_filter ( path) ,
194199 compiletest:: default_per_file_config,
195- status_emitter:: Text :: verbose ( ) ,
200+ if quiet {
201+ status_emitter:: Text :: quiet ( )
202+ } else {
203+ status_emitter:: Text :: verbose ( )
204+ } ,
196205 )
197206 . unwrap ( ) ;
198207}
@@ -207,13 +216,18 @@ fn run_internal_tests() {
207216 * err = "cargo uitest --features internal" . into ( ) ;
208217 }
209218 let test_filter = test_filter ( ) ;
219+ let quiet = args. quiet ;
210220
211221 compiletest:: run_tests_generic (
212222 config,
213223 args,
214224 move |path, args| compiletest:: default_file_filter ( path, args) && test_filter ( path) ,
215225 compiletest:: default_per_file_config,
216- status_emitter:: Text :: verbose ( ) ,
226+ if quiet {
227+ status_emitter:: Text :: quiet ( )
228+ } else {
229+ status_emitter:: Text :: verbose ( )
230+ } ,
217231 )
218232 . unwrap ( ) ;
219233}
@@ -235,6 +249,7 @@ fn run_ui_toml() {
235249 ) ;
236250
237251 let test_filter = test_filter ( ) ;
252+ let quiet = args. quiet ;
238253
239254 ui_test:: run_tests_generic (
240255 config,
@@ -248,7 +263,11 @@ fn run_ui_toml() {
248263 . push ( ( "CLIPPY_CONF_DIR" . into ( ) , Some ( path. parent ( ) . unwrap ( ) . into ( ) ) ) ) ;
249264 Some ( config)
250265 } ,
251- status_emitter:: Text :: verbose ( ) ,
266+ if quiet {
267+ status_emitter:: Text :: quiet ( )
268+ } else {
269+ status_emitter:: Text :: verbose ( )
270+ } ,
252271 )
253272 . unwrap ( ) ;
254273}
@@ -290,6 +309,7 @@ fn run_ui_cargo() {
290309 ) ;
291310
292311 let test_filter = test_filter ( ) ;
312+ let quiet = args. quiet ;
293313
294314 ui_test:: run_tests_generic (
295315 config,
@@ -300,7 +320,11 @@ fn run_ui_cargo() {
300320 config. out_dir = PathBuf :: from ( "target/ui_test_cargo/" ) . join ( path. parent ( ) . unwrap ( ) ) ;
301321 Some ( config)
302322 } ,
303- status_emitter:: Text :: verbose ( ) ,
323+ if quiet {
324+ status_emitter:: Text :: quiet ( )
325+ } else {
326+ status_emitter:: Text :: verbose ( )
327+ } ,
304328 )
305329 . unwrap ( ) ;
306330}
0 commit comments