Fix test_results.LogFull() issue for Debug build.
Details of the failure: http://build.chromium.org/p/tryserver.chromium/builders/android_test/builds/377/steps/Test%20suite%20base_unittests/logs/stdio BUG=none Review URL: https://chromiumcodereview.appspot.com/10868008 git-svn-id: http://src.chromium.org/svn/trunk/src/build@152678 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
6757e63719
Коммит
3173f8143e
|
@ -130,7 +130,7 @@ class TestResults(object):
|
|||
"""Returns the all broken tests including failed, crashed, unknown."""
|
||||
return self.failed + self.crashed + self.unknown
|
||||
|
||||
def LogFull(self, test_group, test_suite):
|
||||
def LogFull(self, test_group, test_suite, build_type):
|
||||
"""Output broken test logs, summarize in a log file and the test output."""
|
||||
# Output all broken tests or 'passed' if none broken.
|
||||
logging.critical('*' * 80)
|
||||
|
@ -151,7 +151,7 @@ class TestResults(object):
|
|||
# Summarize in a log file, if tests are running on bots.
|
||||
if test_group and test_suite and os.environ.get('BUILDBOT_BUILDERNAME'):
|
||||
log_file_path = os.path.join(constants.CHROME_DIR, 'out',
|
||||
'Release', 'test_logs')
|
||||
build_type, 'test_logs')
|
||||
if not os.path.exists(log_file_path):
|
||||
os.mkdir(log_file_path)
|
||||
full_file_name = os.path.join(log_file_path, test_group)
|
||||
|
|
|
@ -17,19 +17,21 @@ from pylib import run_tests_helper
|
|||
from pylib.test_result import TestResults
|
||||
|
||||
|
||||
def SummarizeResults(java_results, python_results, annotation):
|
||||
def SummarizeResults(java_results, python_results, annotation, build_type):
|
||||
"""Summarize the results from the various test types.
|
||||
|
||||
Args:
|
||||
java_results: a TestResults object with java test case results.
|
||||
python_results: a TestResults object with python test case results.
|
||||
annotation: the annotation used for these results.
|
||||
build_type: 'Release' or 'Debug'.
|
||||
|
||||
Returns:
|
||||
A tuple (all_results, summary_string, num_failing)
|
||||
"""
|
||||
all_results = TestResults.FromTestResults([java_results, python_results])
|
||||
summary_string = all_results.LogFull('Instrumentation', annotation)
|
||||
summary_string = all_results.LogFull('Instrumentation', annotation,
|
||||
build_type)
|
||||
num_failing = (len(all_results.failed) + len(all_results.crashed) +
|
||||
len(all_results.unknown))
|
||||
return all_results, summary_string, num_failing
|
||||
|
@ -61,7 +63,7 @@ def DispatchInstrumentationTests(options):
|
|||
python_results = run_python_tests.DispatchPythonTests(options)
|
||||
|
||||
all_results, summary_string, num_failing = SummarizeResults(
|
||||
java_results, python_results, options.annotation)
|
||||
java_results, python_results, options.annotation, options.build_type)
|
||||
return num_failing
|
||||
|
||||
|
||||
|
|
|
@ -256,7 +256,8 @@ class TestSharder(BaseTestSharder):
|
|||
|
||||
def OnTestsCompleted(self, test_runners, test_results):
|
||||
"""Notifies that we completed the tests."""
|
||||
test_results.LogFull('Unit test', os.path.basename(self.test_suite))
|
||||
test_results.LogFull('Unit test', os.path.basename(self.test_suite),
|
||||
self.build_type)
|
||||
PrintAnnotationForTestResults(test_results)
|
||||
if test_results.failed and self.rebaseline:
|
||||
test_runners[0].UpdateFilter(test_results.failed)
|
||||
|
|
Загрузка…
Ссылка в новой задаче