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

Unified Diff: build/android/pylib/run_java_tests.py

Issue 11437018: Change test running logic to run tests without any size annotation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/run_java_tests.py
diff --git a/build/android/pylib/run_java_tests.py b/build/android/pylib/run_java_tests.py
index 7b5ea6e9ec796f506604f789273b6357db298e10..e89b7144ae00b3f84b5194751666423f519733e1 100644
--- a/build/android/pylib/run_java_tests.py
+++ b/build/android/pylib/run_java_tests.py
@@ -529,20 +529,28 @@ def DispatchJavaTests(options, apks):
FatalTestException: when there's no attached the devices.
"""
test_apk = apks[0]
+ test_size_annotations = frozenset(['Smoke', 'SmallTest', 'MediumTest',
+ 'LargeTest', 'EnormousTest', 'FlakyTest',
+ 'DisabledTest', 'Manual', 'PerfTest'])
+ # The default annotation for tests which do not have any sizes annotation.
+ default_size_annotation = 'FlakyTest'
Yaron 2012/12/05 21:52:50 I think I prefer unspecified to not be Flaky. In g
frankf 2012/12/05 22:12:25 Agree with Yaron. If someone adds a test and forge
shashi 2012/12/05 23:30:06 I have it as FlakyTest so that the bots do not bre
if options.annotation:
available_tests = test_apk.GetAnnotatedTests(options.annotation)
- if len(options.annotation) == 1 and options.annotation[0] == 'SmallTest':
- tests_without_annotation = [
+ if (len(options.annotation) == 1 and
+ options.annotation[0] == default_size_annotation):
+ tests_without_size_annotation = [
m for m in
test_apk.GetTestMethods()
- if not test_apk.GetTestAnnotations(m) and
+ if frozenset(test_apk.GetTestAnnotations(m)).
Yaron 2012/12/05 21:52:50 this is now too complicated for a list comprehensi
shashi 2012/12/05 23:30:06 Done.
+ isdisjoint(test_size_annotations) and
not apk_info.ApkInfo.IsPythonDrivenTest(m)]
- if tests_without_annotation:
- tests_without_annotation.sort()
+ if tests_without_size_annotation:
+ tests_without_size_annotation.sort()
logging.warning('The following tests do not contain any annotation. '
- 'Assuming "SmallTest":\n%s',
- '\n'.join(tests_without_annotation))
- available_tests += tests_without_annotation
+ 'Assuming "%s":\n%s',
+ default_size_annotation,
+ '\n'.join(tests_without_size_annotation))
+ available_tests += tests_without_size_annotation
else:
available_tests = [m for m in test_apk.GetTestMethods()
if not apk_info.ApkInfo.IsPythonDrivenTest(m)]
« 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