File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ ($$$$$$$$$)
9191 # not given (implying run all tests) or it matches at least one include-tag.
9292
9393 my $include_tags_length = @$include_tags ;
94+ # If any include tags are passed then only include tests including those tags
9495 my $passes_tag_tests = ($include_tags_length == 0);
9596 foreach my $include_tag (@$include_tags ) {
9697 if (exists ($tags_set {$include_tag })) {
@@ -104,6 +105,19 @@ ($$$$$$$$$)
104105 }
105106 }
106107
108+ # Exclude tests that have an OS- tag that doesn't match the current
109+ # architecture
110+ my $os ;
111+ if ($^O eq " linux" ) { $os = " LINUX" }
112+ if ($^O eq " cygwin" ) { $os = " WINDOWS" }
113+ if ($^O eq " msys" ) { $os = " WINDOWS" }
114+ if ($^O eq " MSWin32" ) { $os = " WINDOWS" }
115+ if ($^O eq " darwin" ) { $os = " MACOS" }
116+
117+ if (not exists ($tags_set {" OS-" . $os }) and grep { " OS-" eq substr ($_ , 0, length (" OS-" )) } @tags ) {
118+ $passes_tag_tests = 0;
119+ }
120+
107121 # If the 4th line is activate-multi-line-match we enable multi-line checks
108122 if ($grep_options ne " activate-multi-line-match" ) {
109123 # No such flag, so we add it back in
You can’t perform that action at this time.
0 commit comments