| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 """Apptest runner specific to the particular gtest-based apptest framework in | 5 """Apptest runner specific to the particular gtest-based apptest framework in |
| 6 /mojo/public/cpp/application/tests/, built on top of the general apptest | 6 /mojo/public/cpp/application/tests/, built on top of the general apptest |
| 7 runner.""" | 7 runner.""" |
| 8 | 8 |
| 9 import logging | 9 import logging |
| 10 import re | 10 import re |
| 11 | 11 |
| 12 from pylib.apptest import run_apptest | 12 from devtoolslib.apptest import run_apptest |
| 13 | 13 |
| 14 | 14 |
| 15 _logger = logging.getLogger() | 15 _logger = logging.getLogger() |
| 16 | 16 |
| 17 | 17 |
| 18 def _gtest_apptest_output_test(output): | 18 def _gtest_apptest_output_test(output): |
| 19 # Fail on output with gtest's "[ FAILED ]" or a lack of "[ PASSED ]". | 19 # Fail on output with gtest's "[ FAILED ]" or a lack of "[ PASSED ]". |
| 20 # The latter condition ensures failure on broken command lines or output. | 20 # The latter condition ensures failure on broken command lines or output. |
| 21 # Check output instead of exit codes because mojo_shell always exits with 0. | 21 # Check output instead of exit codes because mojo_shell always exits with 0. |
| 22 if (output is None or | 22 if (output is None or |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 test_list = [] | 110 test_list = [] |
| 111 for line in output_lines: | 111 for line in output_lines: |
| 112 if not line: | 112 if not line: |
| 113 continue | 113 continue |
| 114 if line[0] != " ": | 114 if line[0] != " ": |
| 115 suite = line.strip() | 115 suite = line.strip() |
| 116 continue | 116 continue |
| 117 test_list.append(suite + line.strip()) | 117 test_list.append(suite + line.strip()) |
| 118 | 118 |
| 119 return test_list | 119 return test_list |
| OLD | NEW |