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)] |