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

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

Issue 18323020: Updates the test runner script exit codes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes exit_code tracking to a singleton paradigm Created 7 years, 6 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/shard.py » ('j') | build/android/test_runner.py » ('J')
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 ba438e1788f146aecdfbc1f8e231a2788db2be71..b757dc98c361a17e62ddc2a0c97354a6d8006d67 100644
--- a/build/android/pylib/base/base_test_result.py
+++ b/build/android/pylib/base/base_test_result.py
@@ -4,6 +4,8 @@
"""Module containing base test results classes."""
+from pylib import constants
+from pylib import exit_code
class ResultType(object):
"""Class enumerating test types."""
@@ -22,6 +24,7 @@ class ResultType(object):
class BaseTestResult(object):
"""Base class for a single test result."""
+
def __init__(self, name, test_type, log=''):
"""Construct a BaseTestResult.
@@ -64,6 +67,7 @@ class BaseTestResult(object):
class TestRunResults(object):
"""Set of results for a test run."""
+
def __init__(self):
self._results = set()
@@ -110,6 +114,8 @@ class TestRunResults(object):
"""
assert isinstance(result, BaseTestResult)
self._results.add(result)
+ if result.GetType() not in [ResultType.PASS, ResultType.UNKNOWN]:
+ exit_code.UpdateExitCode(constants.ERROR_EXIT_CODE)
def AddResults(self, results):
"""Add |results| to the set.
« no previous file with comments | « no previous file | build/android/pylib/base/shard.py » ('j') | build/android/test_runner.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698