@@ -25,7 +25,7 @@ use std::process::{Command, ExitStatus, Output};
25
25
use std:: thread;
26
26
use test_result:: { Errored , TestOk , TestResult , TestRun } ;
27
27
28
- use crate :: parser:: { Comments , Condition } ;
28
+ use crate :: parser:: Comments ;
29
29
30
30
mod cmd;
31
31
mod config;
@@ -1211,24 +1211,14 @@ fn output_path(
1211
1211
path. with_extension ( kind)
1212
1212
}
1213
1213
1214
- fn test_condition ( condition : & Condition , config : & Config ) -> bool {
1215
- let target = config. target . as_ref ( ) . unwrap ( ) ;
1216
- match condition {
1217
- Condition :: Bitwidth ( bits) => get_pointer_width ( target) == * bits,
1218
- Condition :: Target ( t) => target. contains ( t) ,
1219
- Condition :: Host ( t) => config. host . as_ref ( ) . unwrap ( ) . contains ( t) ,
1220
- Condition :: OnHost => config. host_matches ( target) ,
1221
- }
1222
- }
1223
-
1224
1214
impl dyn TestStatus {
1225
1215
/// Returns whether according to the in-file conditions, this file should be run.
1226
1216
fn test_file_conditions ( & self , comments : & Comments , config : & Config ) -> bool {
1227
1217
let revision = self . revision ( ) ;
1228
1218
if comments
1229
1219
. for_revision ( revision)
1230
1220
. flat_map ( |r| r. ignore . iter ( ) )
1231
- . any ( |c| test_condition ( c, config ) )
1221
+ . any ( |c| config . test_condition ( c) )
1232
1222
{
1233
1223
return config. run_only_ignored ;
1234
1224
}
@@ -1241,7 +1231,7 @@ impl dyn TestStatus {
1241
1231
comments
1242
1232
. for_revision ( revision)
1243
1233
. flat_map ( |r| r. only . iter ( ) )
1244
- . all ( |c| test_condition ( c, config ) )
1234
+ . all ( |c| config . test_condition ( c) )
1245
1235
^ config. run_only_ignored
1246
1236
}
1247
1237
}
0 commit comments