@@ -23,6 +23,7 @@ use crate::common::{
23
23
} ;
24
24
use crate :: directives:: TestProps ;
25
25
use crate :: errors:: { Error , ErrorKind , load_errors} ;
26
+ use crate :: output_capture:: ConsoleOut ;
26
27
use crate :: read2:: { Truncated , read2_abbreviated} ;
27
28
use crate :: runtest:: compute_diff:: { DiffLine , make_diff, write_diff, write_filtered_diff} ;
28
29
use crate :: util:: { Utf8PathBufExt , add_dylib_path, static_regex} ;
@@ -108,7 +109,13 @@ fn dylib_name(name: &str) -> String {
108
109
format ! ( "{}{name}.{}" , std:: env:: consts:: DLL_PREFIX , std:: env:: consts:: DLL_EXTENSION )
109
110
}
110
111
111
- pub fn run ( config : Arc < Config > , testpaths : & TestPaths , revision : Option < & str > ) {
112
+ pub fn run (
113
+ config : Arc < Config > ,
114
+ stdout : & dyn ConsoleOut ,
115
+ stderr : & dyn ConsoleOut ,
116
+ testpaths : & TestPaths ,
117
+ revision : Option < & str > ,
118
+ ) {
112
119
match & * config. target {
113
120
"arm-linux-androideabi"
114
121
| "armv7-linux-androideabi"
@@ -143,7 +150,7 @@ pub fn run(config: Arc<Config>, testpaths: &TestPaths, revision: Option<&str>) {
143
150
props. incremental_dir = Some ( incremental_dir ( & config, testpaths, revision) ) ;
144
151
}
145
152
146
- let cx = TestCx { config : & config, props : & props, testpaths, revision } ;
153
+ let cx = TestCx { config : & config, stdout , stderr , props : & props, testpaths, revision } ;
147
154
148
155
if let Err ( e) = create_dir_all ( & cx. output_base_dir ( ) ) {
149
156
panic ! ( "failed to create output base directory {}: {e}" , cx. output_base_dir( ) ) ;
@@ -162,6 +169,8 @@ pub fn run(config: Arc<Config>, testpaths: &TestPaths, revision: Option<&str>) {
162
169
revision_props. incremental_dir = props. incremental_dir . clone ( ) ;
163
170
let rev_cx = TestCx {
164
171
config : & config,
172
+ stdout,
173
+ stderr,
165
174
props : & revision_props,
166
175
testpaths,
167
176
revision : Some ( revision) ,
@@ -212,6 +221,8 @@ pub fn compute_stamp_hash(config: &Config) -> String {
212
221
#[ derive( Copy , Clone , Debug ) ]
213
222
struct TestCx < ' test > {
214
223
config : & ' test Config ,
224
+ stdout : & ' test dyn ConsoleOut ,
225
+ stderr : & ' test dyn ConsoleOut ,
215
226
props : & ' test TestProps ,
216
227
testpaths : & ' test TestPaths ,
217
228
revision : Option < & ' test str > ,
@@ -978,6 +989,8 @@ impl<'test> TestCx<'test> {
978
989
self . props . from_aux_file ( & aux_testpaths. file , self . revision , self . config ) ;
979
990
let aux_cx = TestCx {
980
991
config : self . config ,
992
+ stdout : self . stdout ,
993
+ stderr : self . stderr ,
981
994
props : & props_for_aux,
982
995
testpaths : & aux_testpaths,
983
996
revision : self . revision ,
@@ -1343,6 +1356,8 @@ impl<'test> TestCx<'test> {
1343
1356
let aux_output = TargetLocation :: ThisDirectory ( aux_dir. clone ( ) ) ;
1344
1357
let aux_cx = TestCx {
1345
1358
config : self . config ,
1359
+ stdout : self . stdout ,
1360
+ stderr : self . stderr ,
1346
1361
props : & aux_props,
1347
1362
testpaths : & aux_testpaths,
1348
1363
revision : self . revision ,
0 commit comments