Chromium Code Reviews| Index: testing/tools/suppressor.py |
| diff --git a/testing/tools/suppressor.py b/testing/tools/suppressor.py |
| index a1c3171de11413d08fccd51d9b15fa64c865f208..0039fb7cfa2f75962a656e0fa0c09e5566660351 100755 |
| --- a/testing/tools/suppressor.py |
| +++ b/testing/tools/suppressor.py |
| @@ -10,8 +10,10 @@ import common |
| class Suppressor: |
| def __init__(self, finder, feature_string): |
| feature_vector = feature_string.strip().split(",") |
| - v8_option = ["nov8", "v8"]["V8" in feature_vector] |
| - xfa_option = ["noxfa", "xfa"]["XFA" in feature_vector] |
| + self.has_v8 = "V8" in feature_vector |
| + self.has_xfa = "XFA" in feature_vector |
| + v8_option = ["nov8", "v8"][self.has_v8] |
|
Lei Zhang
2016/04/18 23:57:25
how about the more common way to do ternary operat
Tom Sepez
2016/04/19 00:04:47
Done.
|
| + xfa_option = ["noxfa", "xfa"][self.has_xfa] |
| with open(os.path.join(finder.TestingDir(), 'SUPPRESSIONS')) as f: |
| self.suppression_set = set(self._FilterSuppressions( |
| common.os_name(), v8_option, xfa_option, self._ExtractSuppressions(f))) |
| @@ -38,3 +40,6 @@ class Suppressor: |
| print "%s is suppressed" % input_filename |
| return True |
| return False |
| + |
| + def IsExecutionSuppressed(self, input_filepath): |
|
Lei Zhang
2016/04/18 23:57:26
The difference between this and IsSuppressed() may
Tom Sepez
2016/04/19 00:04:47
Done.
|
| + return "xfa_specific" in input_filepath and not self.has_xfa |
|
Lei Zhang
2016/04/18 23:57:26
Do you want to print a message to indicate suppres
Tom Sepez
2016/04/19 00:04:47
On 2016/04/18 23:57:26, Lei Zhang wrote:
> Do you
|