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

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

Issue 19859004: Fixes test tagging to just update the name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | build/android/pylib/base/test_dispatcher.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 5228200ffae176b68eeb86a24168d25210fefa86..13d938d84ebaa0454db5724a7b46972373757733 100644
--- a/build/android/pylib/base/base_test_result.py
+++ b/build/android/pylib/base/base_test_result.py
@@ -22,7 +22,7 @@ class ResultType(object):
class BaseTestResult(object):
"""Base class for a single test result."""
- def __init__(self, name, test_type, tag='', log=''):
+ def __init__(self, name, test_type, log=''):
"""Construct a BaseTestResult.
Args:
@@ -34,28 +34,28 @@ class BaseTestResult(object):
assert test_type in ResultType.GetTypes()
self._name = name
self._test_type = test_type
- self._tag = tag
self._log = log
def __str__(self):
- return self.GetTaggedName()
+ return self._name
def __repr__(self):
- return self.GetTaggedName()
+ return self._name
def __cmp__(self, other):
# pylint: disable=W0212
- return cmp(self.GetTaggedName(), other.GetTaggedName())
+ return cmp(self._name, other._name)
def __hash__(self):
- return hash(self.GetTaggedName())
+ return hash(self._name)
- def GetTaggedName(self):
- """Get the test name with tag."""
- if self._tag:
- return '%s_%s' % (self._tag, self._name)
- else:
- return self._name
+ def SetName(self, name):
+ """Set the test name.
+
+ Because we're putting this into a set, this should only be used if moving
+ this test result into another set.
+ """
+ self._name = name
def GetName(self):
"""Get the test name."""
@@ -65,18 +65,10 @@ class BaseTestResult(object):
"""Get the test result type."""
return self._test_type
- def GetTag(self):
- """Get the test tag."""
- return self._tag
-
def GetLog(self):
"""Get the test log."""
return self._log
- def SetTag(self, tag):
- """Set the test tag."""
- self._tag = tag
-
class TestRunResults(object):
"""Set of results for a test run."""
« no previous file with comments | « no previous file | build/android/pylib/base/test_dispatcher.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698