OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 """Run specific test on specific environment.""" | 5 """Run specific test on specific environment.""" |
6 | 6 |
7 import logging | 7 import logging |
8 import os | 8 import os |
9 import tempfile | 9 import tempfile |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 def _ParseTestResults(self): | 33 def _ParseTestResults(self): |
34 logging.info('Parsing results from stdout.') | 34 logging.info('Parsing results from stdout.') |
35 r = base_test_result.TestRunResults() | 35 r = base_test_result.TestRunResults() |
36 | 36 |
37 if self._results['results']['exception']: | 37 if self._results['results']['exception']: |
38 r.AddResult(base_test_result.BaseTestResult( | 38 r.AddResult(base_test_result.BaseTestResult( |
39 self._results['results']['exception'], | 39 self._results['results']['exception'], |
40 base_test_result.ResultType.FAIL)) | 40 base_test_result.ResultType.FAIL)) |
41 return r | 41 return r |
42 | 42 |
43 _, errors, parsed_output = self._test_instance.ParseAmInstrumentRawOutput( | 43 result_code, result_bundle, statuses = ( |
44 self._results['results']['output'].splitlines()) | 44 self._test_instance.ParseAmInstrumentRawOutput( |
45 logging.debug(errors) | 45 self._results['results']['output'].splitlines())) |
46 result = self._test_instance.GenerateMultiTestResult(errors, parsed_output) | 46 result = self._test_instance.GenerateTestResults( |
| 47 result_code, result_bundle, statuses, 0, 0) |
47 | 48 |
48 if isinstance(result, base_test_result.BaseTestResult): | 49 if isinstance(result, base_test_result.BaseTestResult): |
49 r.AddResult(result) | 50 r.AddResult(result) |
50 elif isinstance(result, list): | 51 elif isinstance(result, list): |
51 r.AddResults(result) | 52 r.AddResults(result) |
52 else: | 53 else: |
53 raise Exception('Unexpected result type: %s' % type(result).__name__) | 54 raise Exception('Unexpected result type: %s' % type(result).__name__) |
54 | 55 |
55 return r | 56 return r |
OLD | NEW |