Android: Fix invocations of TestResult.LogFull

Also remove the tests_to_run output from summay if we do not have the list of tests.

BUG=


Review URL: https://chromiumcodereview.appspot.com/11365134

git-svn-id: http://src.chromium.org/svn/trunk/src/build@166602 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
nileshagrawal@chromium.org 2012-11-08 04:39:09 +00:00
Родитель 8c900d2e48
Коммит 3bb3dae148
2 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -177,6 +177,7 @@ class TestResults(object):
# Summarize in the test output.
summary = ['Summary:\n']
if tests_to_run:
summary += ['TESTS_TO_RUN=%d\n' % (len(tests_to_run))]
num_tests_ran = (len(self.ok) + len(self.failed) +
len(self.crashed) + len(self.unknown))
@ -189,7 +190,7 @@ class TestResults(object):
'FAILED=%d %s\n' % (len(tests_failed), tests_failed),
'CRASHED=%d %s\n' % (len(tests_crashed), tests_crashed),
'UNKNOWN=%d %s\n' % (len(tests_unknown), tests_unknown)]
if num_tests_ran != len(tests_to_run):
if tests_to_run and num_tests_ran != len(tests_to_run):
# Add the list of tests we failed to run.
tests_failed_to_run = list(set(tests_to_run) - set(tests_passed) -
set(tests_failed) - set(tests_crashed) -

Просмотреть файл

@ -108,7 +108,7 @@ def DispatchPythonTests(options):
sharder = python_test_sharder.PythonTestSharder(
attached_devices, available_tests, options)
result = sharder.RunShardedTests()
result.LogFull('Monkey', 'Monkey', options.build_type)
result.LogFull('Monkey', 'Monkey', options.build_type, available_tests)
result.PrintAnnotation()