ortuno | e1fe7177 | 2016-10-20 01:54:36 | [diff] [blame] | 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 |
| 3 | # found in the LICENSE file. |
| 4 | """Chromium presubmit script for Web Bluetooth layout tests. |
| 5 | |
| 6 | See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts. |
| 7 | """ |
| 8 | |
| 9 | |
| 10 | def CheckGeneratedFiles(input_api, output_api): |
| 11 | test_path = input_api.os_path.join(input_api.PresubmitLocalPath(), |
| 12 | 'generate_test.py') |
| 13 | cmd_name = 'generate_test' |
| 14 | cmd = [input_api.python_executable, test_path] |
| 15 | |
| 16 | test_cmd = input_api.Command( |
| 17 | name=cmd_name, cmd=cmd, kwargs={}, message=output_api.PresubmitError) |
| 18 | if input_api.verbose: |
| 19 | print('Running ' + cmd_name) |
| 20 | |
| 21 | return input_api.RunTests([test_cmd]) |
| 22 | |
| 23 | |
| 24 | def CheckChangeOnUpload(input_api, output_api): |
| 25 | return CheckGeneratedFiles(input_api, output_api) |