File tree 2 files changed +11
-10
lines changed
src/tools/compiletest/src
2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -259,20 +259,20 @@ impl TestProps {
259
259
props
260
260
}
261
261
262
- pub fn from_file ( testfile : & Path , config : & Config ) -> Self {
262
+ pub fn from_file ( testfile : & Path , cfg : Option < & str > , config : & Config ) -> Self {
263
263
let mut props = TestProps :: new ( ) ;
264
- props. load_from ( testfile, None , config) ;
264
+ props. load_from ( testfile, cfg , config) ;
265
265
props
266
266
}
267
267
268
268
/// Load properties from `testfile` into `props`. If a property is
269
269
/// tied to a particular revision `foo` (indicated by writing
270
270
/// `//[foo]`), then the property is ignored unless `cfg` is
271
271
/// `Some("foo")`.
272
- pub fn load_from ( & mut self ,
273
- testfile : & Path ,
274
- cfg : Option < & str > ,
275
- config : & Config ) {
272
+ fn load_from ( & mut self ,
273
+ testfile : & Path ,
274
+ cfg : Option < & str > ,
275
+ config : & Config ) {
276
276
iter_header ( testfile,
277
277
cfg,
278
278
& mut |ln| {
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ pub fn run(config: Config, testpaths: &TestPaths) {
69
69
print ! ( "\n \n " ) ;
70
70
}
71
71
debug ! ( "running {:?}" , testpaths. file. display( ) ) ;
72
- let base_props = TestProps :: from_file ( & testpaths. file , & config) ;
72
+ let base_props = TestProps :: from_file ( & testpaths. file , None , & config) ;
73
73
74
74
let base_cx = TestCx { config : & config,
75
75
props : & base_props,
@@ -81,8 +81,9 @@ pub fn run(config: Config, testpaths: &TestPaths) {
81
81
base_cx. run_revision ( )
82
82
} else {
83
83
for revision in & base_props. revisions {
84
- let mut revision_props = base_props. clone ( ) ;
85
- revision_props. load_from ( & testpaths. file , Some ( revision) , & config) ;
84
+ let revision_props = TestProps :: from_file ( & testpaths. file ,
85
+ Some ( revision) ,
86
+ & config) ;
86
87
let rev_cx = TestCx {
87
88
config : & config,
88
89
props : & revision_props,
@@ -2614,4 +2615,4 @@ fn read2_abbreviated(mut child: Child) -> io::Result<Output> {
2614
2615
stdout : stdout. into_bytes ( ) ,
2615
2616
stderr : stderr. into_bytes ( ) ,
2616
2617
} )
2617
- }
2618
+ }
You can’t perform that action at this time.
0 commit comments