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

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

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « build/android/gyp/process_resources.py ('k') | build/android/pylib/base/base_test_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1f45214d2cdac78d26748eba306be48744fbc6dc..f9e61a96725308c72e5c3cd4978c2f2eba7d1dde 100644
--- a/build/android/pylib/base/base_test_result.py
+++ b/build/android/pylib/base/base_test_result.py
@@ -23,18 +23,20 @@ class ResultType(object):
class BaseTestResult(object):
"""Base class for a single test result."""
- def __init__(self, name, test_type, log=''):
+ def __init__(self, name, test_type, duration=0, log=''):
"""Construct a BaseTestResult.
Args:
name: Name of the test which defines uniqueness.
test_type: Type of the test result as defined in ResultType.
+ duration: Time it took for the test to run in milliseconds.
log: An optional string listing any errors.
"""
assert name
assert test_type in ResultType.GetTypes()
self._name = name
self._test_type = test_type
+ self._duration = duration
self._log = log
def __str__(self):
@@ -66,6 +68,10 @@ class BaseTestResult(object):
"""Get the test result type."""
return self._test_type
+ def GetDuration(self):
+ """Get the test duration."""
+ return self._duration
+
def GetLog(self):
"""Get the test log."""
return self._log
« no previous file with comments | « build/android/gyp/process_resources.py ('k') | build/android/pylib/base/base_test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698