Index: build/android/pylib/test_result.py |
diff --git a/build/android/pylib/test_result.py b/build/android/pylib/test_result.py |
index 28258da2a8d278113310b9046ff3f7da43362a3e..b3e0865952125cd39b74f33711c2f3cdfd283567 100644 |
--- a/build/android/pylib/test_result.py |
+++ b/build/android/pylib/test_result.py |
@@ -12,7 +12,10 @@ import traceback |
import buildbot_report |
import constants |
-import flakiness_dashboard_results_uploader |
+from pylib.utils import flakiness_dashboard_results_uploader |
+ |
+ |
+_STAGING_SERVER = 'chrome-android-staging' |
class BaseTestResult(object): |
@@ -167,11 +170,30 @@ class TestResults(object): |
def _LogToFlakinessDashboard(self, test_type, test_package, flakiness_server): |
"""Upload results to the flakiness dashboard""" |
- # TODO(frankf): Fix upstream/downstream reporting for both test types. |
- logging.info('Upload %s %s to %s' % (test_type, test_package, |
- flakiness_server)) |
- flakiness_dashboard_results_uploader.Upload( |
- flakiness_server, 'Chromium_Android_Instrumentation', self) |
+ logging.info('Upload results for test type "%s", test package "%s" to %s' % |
+ (test_type, test_package, flakiness_server)) |
+ |
+ # TODO(frankf): Enable uploading for gtests. |
+ if test_type != 'Instrumentation': |
+ raise Exception('Invalid test type.') |
mkosiba (inactive)
2013/01/14 12:07:55
maybe just log && return?
frankf
2013/01/14 18:54:41
Done.
|
+ |
+ try: |
+ # TODO(frankf): Temp server for initial testing upstream. |
+ # Use http://test-results.appspot.com once we're confidant this works. |
mkosiba (inactive)
2013/01/14 12:07:55
nit: confident
frankf
2013/01/14 18:54:41
Indeed. Done.
On 2013/01/14 12:07:55, Martin Kosib
|
+ if _STAGING_SERVER in flakiness_server: |
+ assert test_package in ['ContentShellTest', |
+ 'ChromiumTestShell', |
+ 'AndroidWebViewTest'] |
+ dashboard_test_type = ('%s_instrumentation_tests' % |
+ test_package.lower().rstrip('test')) |
+ # Downstream prod server. |
+ else: |
+ dashboard_test_type = 'Chromium_Android_Instrumentation' |
+ |
+ flakiness_dashboard_results_uploader.Upload( |
+ flakiness_server, dashboard_test_type, self) |
+ except Exception as e: |
+ logging.error(e) |
def LogFull(self, test_type, test_package, annotation=None, |
build_type='Debug', all_tests=None, flakiness_server=None): |