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

Unified Diff: build/android/pylib/instrumentation/instrumentation_test_instance.py

Issue 2786773002: (Reland) Add failure screenshots and images to results detail. (Closed)
Patch Set: (Reland) Add failure screenshots and images to results detail. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: build/android/pylib/instrumentation/instrumentation_test_instance.py
diff --git a/build/android/pylib/instrumentation/instrumentation_test_instance.py b/build/android/pylib/instrumentation/instrumentation_test_instance.py
index d8f0995269327ff03c4407424f3b5c37fb86d0a1..706fa751f3b1c91a70feb5d7643243d58c29c7fc 100644
--- a/build/android/pylib/instrumentation/instrumentation_test_instance.py
+++ b/build/android/pylib/instrumentation/instrumentation_test_instance.py
@@ -498,6 +498,8 @@ class InstrumentationTestInstance(test_instance.TestInstance):
self._store_tombstones = False
self._initializeTombstonesAttributes(args)
+ self._gs_results_bucket = None
+ self._should_save_images = None
self._should_save_logcat = None
self._initializeLogAttributes(args)
@@ -682,6 +684,11 @@ class InstrumentationTestInstance(test_instance.TestInstance):
self._store_tombstones = args.store_tombstones
def _initializeLogAttributes(self, args):
+ # Will archive test images if we are given a GS bucket to store the results
+ # in and are given a results file to output the links to.
+ self._gs_results_bucket = args.gs_results_bucket
+ self._should_save_images = (
jbudorick 2017/04/29 01:12:25 nit: do we need to save this separately?
mikecase (-- gone --) 2017/05/03 21:25:14 I guess I can just check for _gs_results_bucket. S
+ bool(args.json_results_file) and bool(args.gs_results_bucket))
self._should_save_logcat = bool(args.json_results_file)
def _initializeEditPrefsAttributes(self, args):
@@ -747,6 +754,14 @@ class InstrumentationTestInstance(test_instance.TestInstance):
return self._flags
@property
+ def gs_results_bucket(self):
+ return self._gs_results_bucket
+
+ @property
+ def should_save_images(self):
+ return self._should_save_images
+
+ @property
def should_save_logcat(self):
return self._should_save_logcat

Powered by Google App Engine
This is Rietveld 408576698