Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: build/android/pylib/instrumentation/instrumentation_test_instance.py

Issue 1863353002: 🎯 Fail if an instrumentation test is missing size annotation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698