| 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 """Common steps for recipes that sync/build Cronet sources.""" | 5 """Common steps for recipes that sync/build Cronet sources.""" |
| 6 | 6 |
| 7 from infra.libs.infra_types import freeze | 7 from infra.libs.infra_types import freeze |
| 8 from recipe_engine import recipe_api | 8 from recipe_engine import recipe_api |
| 9 | 9 |
| 10 INSTRUMENTATION_TESTS = freeze([ | 10 INSTRUMENTATION_TESTS = freeze([ |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 droid.common_tests_setup_steps() | 101 droid.common_tests_setup_steps() |
| 102 with self.m.step.defer_results(): | 102 with self.m.step.defer_results(): |
| 103 for suite in UNIT_TESTS: | 103 for suite in UNIT_TESTS: |
| 104 droid.run_test_suite(suite) | 104 droid.run_test_suite(suite) |
| 105 for suite in INSTRUMENTATION_TESTS: | 105 for suite in INSTRUMENTATION_TESTS: |
| 106 droid.run_instrumentation_suite( | 106 droid.run_instrumentation_suite( |
| 107 suite['test'], verbose=True, | 107 suite['test'], verbose=True, |
| 108 **suite.get('kwargs', {})) | 108 **suite.get('kwargs', {})) |
| 109 droid.common_tests_final_steps() | 109 droid.common_tests_final_steps() |
| 110 | 110 |
| 111 |
| 112 def run_perf_tests(self): |
| 113 self.m.python('performance test', self.m.path['checkout'].join( |
| 114 'components', 'cronet', 'android', 'test', 'javaperftests', 'run.py')) |
| 115 |
| 116 def clear_landmines(self): |
| 117 self.m.python.inline( |
| 118 'clear landmines', |
| 119 """ |
| 120 import subprocess, sys |
| 121 proc = subprocess.Popen( |
| 122 sys.argv[1], stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
| 123 out, err = proc.communicate() |
| 124 with open(sys.argv[2], 'w') as f: |
| 125 f.writelines(out) |
| 126 """, |
| 127 args=[self.m.path['checkout'].join('build', 'get_landmines.py'), |
| 128 self.m.path['checkout'].join('.landmines')]) |
| OLD | NEW |