| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Runs a monkey test on a single device.""" | 5 """Runs a monkey test on a single device.""" |
| 6 | 6 |
| 7 import logging | 7 import logging |
| 8 import random | 8 import random |
| 9 | 9 |
| 10 from pylib import constants | 10 from pylib import constants |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 results = base_test_result.TestRunResults() | 81 results = base_test_result.TestRunResults() |
| 82 success_pattern = 'Events injected: %d' % self._options.event_count | 82 success_pattern = 'Events injected: %d' % self._options.event_count |
| 83 if success_pattern in output and not crashed: | 83 if success_pattern in output and not crashed: |
| 84 result = base_test_result.BaseTestResult( | 84 result = base_test_result.BaseTestResult( |
| 85 test_name, base_test_result.ResultType.PASS, log=output) | 85 test_name, base_test_result.ResultType.PASS, log=output) |
| 86 else: | 86 else: |
| 87 result = base_test_result.BaseTestResult( | 87 result = base_test_result.BaseTestResult( |
| 88 test_name, base_test_result.ResultType.FAIL, log=output) | 88 test_name, base_test_result.ResultType.FAIL, log=output) |
| 89 if 'chrome' in self._options.package: | 89 if 'chrome' in self._options.package: |
| 90 logging.warning('Start MinidumpUploadService...') | 90 logging.warning('Starting MinidumpUploadService...') |
| 91 self.adb.StartCrashUploadService(self._package) | 91 try: |
| 92 self.adb.StartCrashUploadService(self._package) |
| 93 except AssertionError as e: |
| 94 logging.error('Failed to start MinidumpUploadService: %s', e) |
| 92 results.AddResult(result) | 95 results.AddResult(result) |
| 93 return results, False | 96 return results, False |
| OLD | NEW |