| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 import argparse | 5 import argparse |
| 6 import json | 6 import json |
| 7 import os | 7 import os |
| 8 import sys | 8 import sys |
| 9 | 9 |
| 10 # This is the list of tests to run. It is a dictionary with the following | 10 # This is the list of tests to run. It is a dictionary with the following |
| 11 # fields: | 11 # fields: |
| 12 # | 12 # |
| 13 # name (required): The name of the step, to show on the buildbot status page. | 13 # name (required): The name of the step, to show on the buildbot status page. |
| 14 # path (required): The path to the executable which runs the tests. | 14 # path (required): The path to the executable which runs the tests. |
| 15 # additional_args (optional): An array of optional arguments. | 15 # additional_args (optional): An array of optional arguments. |
| 16 # uses_app_engine_sdk (optional): True if app engine SDK must be in PYTHONPATH. | 16 # uses_app_engine_sdk (optional): True if app engine SDK must be in PYTHONPATH. |
| 17 # uses_sandbox_env (optional): True if CHROME_DEVEL_SANDBOX must be in | 17 # uses_sandbox_env (optional): True if CHROME_DEVEL_SANDBOX must be in |
| 18 # environment. | 18 # environment. |
| 19 # disabled (optional): List of platforms the test is disabled on. May contain | 19 # disabled (optional): List of platforms the test is disabled on. May contain |
| 20 # 'win', 'mac', or 'linux'. | 20 # 'win', 'mac', 'linux', or 'android'. |
| 21 # outputs_presentation_json (optional): If True, pass in --presentation-json | 21 # outputs_presentation_json (optional): If True, pass in --presentation-json |
| 22 # argument to the test executable to allow it to update the buildbot status | 22 # argument to the test executable to allow it to update the buildbot status |
| 23 # page. More details here: | 23 # page. More details here: |
| 24 # github.com/luci/recipes-py/blob/master/recipe_modules/generator_script/api.py | 24 # github.com/luci/recipes-py/blob/master/recipe_modules/generator_script/api.py |
| 25 _CATAPULT_TESTS = [ | 25 _CATAPULT_TESTS = [ |
| 26 { | 26 { |
| 27 'name': 'BattOr Smoke Tests', | 27 'name': 'BattOr Smoke Tests', |
| 28 'path': 'common/battor/battor/battor_wrapper_devicetest.py', | 28 'path': 'common/battor/battor/battor_wrapper_devicetest.py', |
| 29 'disabled': ['android'], |
| 29 }, | 30 }, |
| 30 { | 31 { |
| 31 'name': 'BattOr Unit Tests', | 32 'name': 'BattOr Unit Tests', |
| 32 'path': 'common/battor/bin/run_py_tests', | 33 'path': 'common/battor/bin/run_py_tests', |
| 34 'disabled': ['android'], |
| 33 }, | 35 }, |
| 34 { | 36 { |
| 35 'name': 'Build Python Tests', | 37 'name': 'Build Python Tests', |
| 36 'path': 'catapult_build/bin/run_py_tests', | 38 'path': 'catapult_build/bin/run_py_tests', |
| 39 'disabled': ['android'], |
| 37 }, | 40 }, |
| 38 { | 41 { |
| 39 'name': 'Catapult Base Tests', | 42 'name': 'Catapult Base Tests', |
| 40 'path': 'catapult_base/bin/run_tests', | 43 'path': 'catapult_base/bin/run_tests', |
| 44 'disabled': ['android'], |
| 41 }, | 45 }, |
| 42 { | 46 { |
| 43 'name': 'Dashboard Dev Server Tests Canary', | 47 'name': 'Dashboard Dev Server Tests Canary', |
| 44 'path': 'dashboard/bin/run_dev_server_tests', | 48 'path': 'dashboard/bin/run_dev_server_tests', |
| 45 'additional_args': [ | 49 'additional_args': [ |
| 46 '--no-install-hooks', | 50 '--no-install-hooks', |
| 47 '--no-use-local-chrome', | 51 '--no-use-local-chrome', |
| 48 '--channel=canary' | 52 '--channel=canary' |
| 49 ], | 53 ], |
| 50 'outputs_presentation_json': True, | 54 'outputs_presentation_json': True, |
| 55 'disabled': ['android'], |
| 51 }, | 56 }, |
| 52 { | 57 { |
| 53 'name': 'Dashboard Dev Server Tests Stable', | 58 'name': 'Dashboard Dev Server Tests Stable', |
| 54 'path': 'dashboard/bin/run_dev_server_tests', | 59 'path': 'dashboard/bin/run_dev_server_tests', |
| 55 'additional_args': [ | 60 'additional_args': [ |
| 56 '--no-install-hooks', | 61 '--no-install-hooks', |
| 57 '--no-use-local-chrome', | 62 '--no-use-local-chrome', |
| 58 '--channel=stable', | 63 '--channel=stable', |
| 59 ], | 64 ], |
| 60 'outputs_presentation_json': True, | 65 'outputs_presentation_json': True, |
| 66 'disabled': ['android'], |
| 61 }, | 67 }, |
| 62 { | 68 { |
| 63 'name': 'Dashboard Python Tests', | 69 'name': 'Dashboard Python Tests', |
| 64 'path': 'dashboard/bin/run_py_tests', | 70 'path': 'dashboard/bin/run_py_tests', |
| 65 'additional_args': ['--no-install-hooks'], | 71 'additional_args': ['--no-install-hooks'], |
| 66 'uses_app_engine_sdk': True, | 72 'uses_app_engine_sdk': True, |
| 73 'disabled': ['android'], |
| 67 }, | 74 }, |
| 68 { | 75 { |
| 69 'name': 'Dependency Manager Tests', | 76 'name': 'Dependency Manager Tests', |
| 70 'path': 'dependency_manager/bin/run_tests', | 77 'path': 'dependency_manager/bin/run_tests', |
| 78 'disabled': ['android'], |
| 71 }, | 79 }, |
| 72 { | 80 { |
| 73 'name': 'Devil Python Tests', | 81 'name': 'Devil Python Tests', |
| 74 'path': 'devil/bin/run_py_tests', | 82 'path': 'devil/bin/run_py_tests', |
| 75 'disabled': ['mac', 'win'], | 83 'disabled': ['mac', 'win'], |
| 76 }, | 84 }, |
| 77 { | 85 { |
| 78 'name': 'Perf Insights Dev Server Tests Canary', | 86 'name': 'Perf Insights Dev Server Tests Canary', |
| 79 'path': 'perf_insights/bin/run_dev_server_tests', | 87 'path': 'perf_insights/bin/run_dev_server_tests', |
| 80 'additional_args': [ | 88 'additional_args': [ |
| 81 '--no-install-hooks', | 89 '--no-install-hooks', |
| 82 '--no-use-local-chrome', | 90 '--no-use-local-chrome', |
| 83 '--channel=canary' | 91 '--channel=canary' |
| 84 ], | 92 ], |
| 85 'outputs_presentation_json': True, | 93 'outputs_presentation_json': True, |
| 94 'disabled': ['android'], |
| 86 }, | 95 }, |
| 87 { | 96 { |
| 88 'name': 'Perf Insights Dev Server Tests Stable', | 97 'name': 'Perf Insights Dev Server Tests Stable', |
| 89 'path': 'perf_insights/bin/run_dev_server_tests', | 98 'path': 'perf_insights/bin/run_dev_server_tests', |
| 90 'additional_args': [ | 99 'additional_args': [ |
| 91 '--no-install-hooks', | 100 '--no-install-hooks', |
| 92 '--no-use-local-chrome', | 101 '--no-use-local-chrome', |
| 93 '--channel=stable', | 102 '--channel=stable', |
| 94 ], | 103 ], |
| 95 'uses_sandbox_env': True, | 104 'uses_sandbox_env': True, |
| 96 'outputs_presentation_json': True, | 105 'outputs_presentation_json': True, |
| 106 'disabled': ['android'], |
| 97 }, | 107 }, |
| 98 { | 108 { |
| 99 'name': 'Perf Insights Python Tests', | 109 'name': 'Perf Insights Python Tests', |
| 100 'path': 'perf_insights/bin/run_py_tests', | 110 'path': 'perf_insights/bin/run_py_tests', |
| 101 'additional_args': ['--no-install-hooks'], | 111 'additional_args': ['--no-install-hooks'], |
| 112 'disabled': ['android'], |
| 102 }, | 113 }, |
| 103 { | 114 { |
| 104 'name': 'Perf VINN Insights Tests', | 115 'name': 'Perf VINN Insights Tests', |
| 105 'path': 'perf_insights/bin/run_vinn_tests', | 116 'path': 'perf_insights/bin/run_vinn_tests', |
| 117 'disabled': ['android'], |
| 106 }, | 118 }, |
| 107 { | 119 { |
| 108 'name': 'Py-vulcanize Tests', | 120 'name': 'Py-vulcanize Tests', |
| 109 'path': 'third_party/py_vulcanize/bin/run_py_tests', | 121 'path': 'third_party/py_vulcanize/bin/run_py_tests', |
| 110 'additional_args': ['--no-install-hooks'], | 122 'additional_args': ['--no-install-hooks'], |
| 123 'disabled': ['android'], |
| 111 }, | 124 }, |
| 112 { | 125 { |
| 113 'name': 'Systrace Tests', | 126 'name': 'Systrace Tests', |
| 114 'path': 'systrace/bin/run_tests', | 127 'path': 'systrace/bin/run_tests', |
| 128 'disabled': ['android'], |
| 115 }, | 129 }, |
| 116 { | 130 { |
| 117 'name': 'Telemetry Tests with Stable Browser', | 131 'name': 'Telemetry Tests with Stable Browser', |
| 118 'path': 'telemetry/bin/run_tests', | 132 'path': 'telemetry/bin/run_tests', |
| 119 'additional_args': [ | 133 'additional_args': [ |
| 120 '--browser=reference', | 134 '--browser=reference', |
| 121 '--start-xvfb' | 135 '--start-xvfb' |
| 122 ], | 136 ], |
| 123 'uses_sandbox_env': True, | 137 'uses_sandbox_env': True, |
| 138 'disabled': ['android'], |
| 124 }, | 139 }, |
| 125 { | 140 { |
| 126 'name': 'Telemetry Integration Tests with Stable Browser', | 141 'name': 'Telemetry Integration Tests with Stable Browser', |
| 127 'path': 'telemetry/bin/run_browser_tests', | 142 'path': 'telemetry/bin/run_browser_tests', |
| 128 'additional_args': [ | 143 'additional_args': [ |
| 129 'SimpleBrowserTest', | 144 'SimpleBrowserTest', |
| 130 '--browser=reference', | 145 '--browser=reference', |
| 131 ], | 146 ], |
| 132 'uses_sandbox_env': True, | 147 'uses_sandbox_env': True, |
| 133 'disabled': ['linux'], # TODO(nedn): enable this on linux | 148 'disabled': ['android', 'linux'], # TODO(nedn): enable this on linux |
| 134 }, | 149 }, |
| 135 { | 150 { |
| 136 'name': 'Tracing Dev Server Tests Canary', | 151 'name': 'Tracing Dev Server Tests Canary', |
| 137 'path': 'tracing/bin/run_dev_server_tests', | 152 'path': 'tracing/bin/run_dev_server_tests', |
| 138 'additional_args': [ | 153 'additional_args': [ |
| 139 '--no-install-hooks', | 154 '--no-install-hooks', |
| 140 '--no-use-local-chrome', | 155 '--no-use-local-chrome', |
| 141 '--channel=canary' | 156 '--channel=canary' |
| 142 ], | 157 ], |
| 143 'outputs_presentation_json': True, | 158 'outputs_presentation_json': True, |
| 159 'disabled': ['android'], |
| 144 }, | 160 }, |
| 145 { | 161 { |
| 146 'name': 'Tracing Dev Server Tests Stable', | 162 'name': 'Tracing Dev Server Tests Stable', |
| 147 'path': 'tracing/bin/run_dev_server_tests', | 163 'path': 'tracing/bin/run_dev_server_tests', |
| 148 'additional_args': [ | 164 'additional_args': [ |
| 149 '--no-install-hooks', | 165 '--no-install-hooks', |
| 150 '--no-use-local-chrome', | 166 '--no-use-local-chrome', |
| 151 '--channel=stable', | 167 '--channel=stable', |
| 152 ], | 168 ], |
| 153 'outputs_presentation_json': True, | 169 'outputs_presentation_json': True, |
| 170 'disabled': ['android'], |
| 154 }, | 171 }, |
| 155 { | 172 { |
| 156 'name': 'Tracing D8 Tests', | 173 'name': 'Tracing D8 Tests', |
| 157 'path': 'tracing/bin/run_vinn_tests', | 174 'path': 'tracing/bin/run_vinn_tests', |
| 175 'disabled': ['android'], |
| 158 }, | 176 }, |
| 159 { | 177 { |
| 160 'name': 'Tracing Python Tests', | 178 'name': 'Tracing Python Tests', |
| 161 'path': 'tracing/bin/run_py_tests', | 179 'path': 'tracing/bin/run_py_tests', |
| 162 'additional_args': ['--no-install-hooks'], | 180 'additional_args': ['--no-install-hooks'], |
| 181 'disabled': ['android'], |
| 163 }, | 182 }, |
| 164 { | 183 { |
| 165 'name': 'Vinn Tests', | 184 'name': 'Vinn Tests', |
| 166 'path': 'third_party/vinn/run_test', | 185 'path': 'third_party/vinn/run_test', |
| 186 'disabled': ['android'], |
| 167 }, | 187 }, |
| 168 ] | 188 ] |
| 169 | 189 |
| 170 | 190 |
| 171 def main(args=None): | 191 def main(args=None): |
| 172 """Send list of test to run to recipes generator_script. | 192 """Send list of test to run to recipes generator_script. |
| 173 | 193 |
| 174 See documentation at: | 194 See documentation at: |
| 175 github.com/luci/recipes-py/blob/master/recipe_modules/generator_script/api.py | 195 github.com/luci/recipes-py/blob/master/recipe_modules/generator_script/api.py |
| 176 """ | 196 """ |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 step['env']['CHROME_DEVEL_SANDBOX'] = '/opt/chromium/chrome_sandbox' | 228 step['env']['CHROME_DEVEL_SANDBOX'] = '/opt/chromium/chrome_sandbox' |
| 209 if test.get('outputs_presentation_json'): | 229 if test.get('outputs_presentation_json'): |
| 210 step['outputs_presentation_json'] = True | 230 step['outputs_presentation_json'] = True |
| 211 steps.append(step) | 231 steps.append(step) |
| 212 with open(args.output_json, 'w') as outfile: | 232 with open(args.output_json, 'w') as outfile: |
| 213 json.dump(steps, outfile) | 233 json.dump(steps, outfile) |
| 214 | 234 |
| 215 | 235 |
| 216 if __name__ == '__main__': | 236 if __name__ == '__main__': |
| 217 main(sys.argv[1:]) | 237 main(sys.argv[1:]) |
| OLD | NEW |