Chromium Code Reviews| 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: |