File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,9 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
170
170
format ! ( "ignore-{}" ,
171
171
config. stage_id. split( '-' ) . next( ) . unwrap( ) )
172
172
}
173
+ fn ignore_env ( config : & Config ) -> String {
174
+ format ! ( "ignore-{}" , util:: get_env( & config. target) . unwrap_or( "<unknown>" ) )
175
+ }
173
176
fn ignore_gdb ( config : & Config , line : & str ) -> bool {
174
177
if config. mode != common:: DebugInfoGdb {
175
178
return false ;
@@ -231,6 +234,7 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
231
234
!parse_name_directive ( ln, & ignore_target ( config) ) &&
232
235
!parse_name_directive ( ln, & ignore_architecture ( config) ) &&
233
236
!parse_name_directive ( ln, & ignore_stage ( config) ) &&
237
+ !parse_name_directive ( ln, & ignore_env ( config) ) &&
234
238
!( config. mode == common:: Pretty && parse_name_directive ( ln, "ignore-pretty" ) ) &&
235
239
!( config. target != config. host && parse_name_directive ( ln, "ignore-cross-compile" ) ) &&
236
240
!ignore_gdb ( config, ln) &&
Original file line number Diff line number Diff line change @@ -60,6 +60,10 @@ pub fn get_arch(triple: &str) -> &'static str {
60
60
panic ! ( "Cannot determine Architecture from triple" ) ;
61
61
}
62
62
63
+ pub fn get_env ( triple : & str ) -> Option < & str > {
64
+ triple. split ( '-' ) . nth ( 3 )
65
+ }
66
+
63
67
pub fn make_new_path ( path : & str ) -> String {
64
68
assert ! ( cfg!( windows) ) ;
65
69
// Windows just uses PATH as the library search path, so we have to
You can’t perform that action at this time.
0 commit comments