Index: scripts/slave/recipe_modules/chromium_tests/steps.py |
diff --git a/scripts/slave/recipe_modules/chromium_tests/steps.py b/scripts/slave/recipe_modules/chromium_tests/steps.py |
index 3e55c4186348c49ea67187f583439ecf8c3f3cc8..1cda607c231a0fca72d875ab5e97858fe632f43c 100644 |
--- a/scripts/slave/recipe_modules/chromium_tests/steps.py |
+++ b/scripts/slave/recipe_modules/chromium_tests/steps.py |
@@ -5,7 +5,7 @@ |
import datetime |
import re |
import string |
- |
+import urllib |
class Test(object): |
""" |
@@ -912,6 +912,28 @@ class SwarmingGTestTest(SwarmingTest): |
api, suffix,test_filter=test_filter) |
finally: |
step_result = api.step.active_result |
+ |
+ # If Android swarming tasks, create link for unified logcats |
ghost stip (do not use)
2016/08/04 23:55:58
I wonder if there is a way to make this more gener
nicholaslin
2016/08/05 00:27:17
Perhaps. Maybe not a link template but maybe a log
|
+ # https://crbug.com/448050 |
+ if api.chromium.c.TARGET_PLATFORM == 'android': |
+ for task in self._tasks.values(): |
+ includes_logdog = False |
+ if hasattr(task, 'cipd_packages'): |
+ func = lambda x: 'logdog/butler' in x[1] |
+ includes_logdog = filter(func, task.cipd_packages) |
+ if (includes_logdog and hasattr(task, 'trigger_output') |
+ and 'tasks' in task.trigger_output): |
+ for test in task.trigger_output['tasks'].values(): |
+ task_id = test.get('task_id') |
+ shard_index = test.get('shard_index') |
+ if shard_index is not None and task_id is not None: |
+ prefix = 'https://luci-logdog.appspot.com/v/?s=' |
+ suffix = '%s/%s/%s/%s/+/%s' % ('android', 'swarming', 'logcats', |
+ task_id, 'unified_logcats') |
+ step_result.presentation.links[('shard_index: %d logcats' % |
+ shard_index)] = ( |
+ prefix + urllib.quote_plus(suffix)) |
+ |
# Only upload test results if we have gtest results. |
if (self._upload_test_results and |
hasattr(step_result, 'test_utils') and |