Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import collections | 5 import collections |
| 6 import copy | 6 import copy |
| 7 import logging | 7 import logging |
| 8 import os | 8 import os |
| 9 import pickle | 9 import pickle |
| 10 import re | 10 import re |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 540 pickle.dump(pickle_data, pickle_file) | 540 pickle.dump(pickle_data, pickle_file) |
| 541 | 541 |
| 542 def _FilterTests(self, tests): | 542 def _FilterTests(self, tests): |
| 543 | 543 |
| 544 def gtest_filter(c, m): | 544 def gtest_filter(c, m): |
| 545 t = ['%s.%s' % (c['class'].split('.')[-1], m['method'])] | 545 t = ['%s.%s' % (c['class'].split('.')[-1], m['method'])] |
| 546 return (not self._test_filter | 546 return (not self._test_filter |
| 547 or unittest_util.FilterTestNames(t, self._test_filter)) | 547 or unittest_util.FilterTestNames(t, self._test_filter)) |
| 548 | 548 |
| 549 def annotation_filter(all_annotations): | 549 def annotation_filter(all_annotations): |
| 550 if not self._annotations: | 550 if not self._annotations or not all_annotations: |
|
jbudorick
2016/04/07 02:30:11
I don't think this is logically consistent. A test
jbudorick
2016/04/07 02:31:26
(or 3, remove the default annotations entirely, bu
agrieve
2016/04/07 02:41:12
Should we add an exception when we detect a test m
jbudorick
2016/04/07 02:50:18
Honestly, I think the right answer for this is pro
| |
| 551 return True | 551 return True |
| 552 return any_annotation_matches(self._annotations, all_annotations) | 552 return any_annotation_matches(self._annotations, all_annotations) |
| 553 | 553 |
| 554 def excluded_annotation_filter(all_annotations): | 554 def excluded_annotation_filter(all_annotations): |
| 555 if not self._excluded_annotations: | 555 if not self._excluded_annotations: |
| 556 return True | 556 return True |
| 557 return not any_annotation_matches(self._excluded_annotations, | 557 return not any_annotation_matches(self._excluded_annotations, |
| 558 all_annotations) | 558 all_annotations) |
| 559 | 559 |
| 560 def any_annotation_matches(annotations, all_annotations): | 560 def any_annotation_matches(annotations, all_annotations): |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 635 def GenerateTestResults( | 635 def GenerateTestResults( |
| 636 result_code, result_bundle, statuses, start_ms, duration_ms): | 636 result_code, result_bundle, statuses, start_ms, duration_ms): |
| 637 return GenerateTestResults(result_code, result_bundle, statuses, | 637 return GenerateTestResults(result_code, result_bundle, statuses, |
| 638 start_ms, duration_ms) | 638 start_ms, duration_ms) |
| 639 | 639 |
| 640 #override | 640 #override |
| 641 def TearDown(self): | 641 def TearDown(self): |
| 642 if self._isolate_delegate: | 642 if self._isolate_delegate: |
| 643 self._isolate_delegate.Clear() | 643 self._isolate_delegate.Clear() |
| 644 | 644 |
| OLD | NEW |