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

Unified Diff: build/android/pylib/base/base_test_result.py

Issue 2664873002: Add logdog_helper script. (Closed)
Patch Set: Add logdog_helper script. Created 3 years, 11 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/base/base_test_result.py
diff --git a/build/android/pylib/base/base_test_result.py b/build/android/pylib/base/base_test_result.py
index 5f8db5234079dedd25dd31c8fabb02763b642f14..c414da56d6d2473b2dafe3611a62d2c797898ace 100644
--- a/build/android/pylib/base/base_test_result.py
+++ b/build/android/pylib/base/base_test_result.py
@@ -56,8 +56,7 @@ class BaseTestResult(object):
self._test_type = test_type
self._duration = duration
self._log = log
- self._tombstones_url = None
- self._logcat_url = None
+ self._links = {}
def __str__(self):
return self._name
@@ -105,25 +104,35 @@ class BaseTestResult(object):
"""Get the test log."""
return self._log
- def SetTombstonesUrl(self, tombstones_url):
- self._tombstones_url = tombstones_url
+ def AddLink(self, name, link_url):
+ """Add link with test result data."""
+ if name in self._links:
+ raise Exception('Link with name "%s" aleady exists.' % name)
jbudorick 2017/01/31 16:11:53 This may be better off as SetLink, with new calls
mikecase (-- gone --) 2017/01/31 23:08:25 Yeah, I like this. Done
+ self._links[name] = link_url
- def GetTombstonesUrl(self):
- return self._tombstones_url
+ def GetLinks(self):
+ """Get dict containing links to test result data."""
+ return self._links
- def SetLogcatUrl(self, logcat_url):
- self._logcat_url = logcat_url
-
- def GetLogcatUrl(self):
- return self._logcat_url
class TestRunResults(object):
"""Set of results for a test run."""
def __init__(self):
+ self._links = {}
self._results = set()
self._results_lock = threading.RLock()
+ def AddLink(self, name, link_url):
+ """Add link with test run results data."""
jbudorick 2017/01/31 16:11:53 Same.
mikecase (-- gone --) 2017/01/31 23:08:25 Done
+ if name in self._links:
+ raise Exception('Link with name "%s" aleady exists.' % name)
+ self._links[name] = link_url
+
+ def GetLinks(self):
+ """Get dict containing links to test run result data."""
+ return self._links
+
def GetLogs(self):
"""Get the string representation of all test logs."""
with self._results_lock:

Powered by Google App Engine
This is Rietveld 408576698