Avi Drissman | cd038c9 | 2022-09-29 21:35:50 | [diff] [blame] | 1 | # Copyright 2018 The Chromium Authors |
Victor Costan | 3d8ec487 | 2018-02-06 23:56:15 | [diff] [blame] | 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | """Presubmit tests for /third_party/sqlite. |
| 5 | |
| 6 | Runs Python unit tests in /third_party/sqlite/scripts on upload. |
| 7 | """ |
| 8 | |
Victor Costan | e425e45 | 2021-05-26 19:24:36 | [diff] [blame] | 9 | PRESUBMIT_VERSION = '2.0.0' |
Victor Costan | 3d8ec487 | 2018-02-06 23:56:15 | [diff] [blame] | 10 | |
Victor Costan | e425e45 | 2021-05-26 19:24:36 | [diff] [blame] | 11 | def CheckPythonUnittestsPass(input_api, output_api): |
Chris Mumford | 4fdc5f31 | 2020-04-14 16:53:52 | [diff] [blame] | 12 | results = [] |
| 13 | this_dir = input_api.PresubmitLocalPath() |
Victor Costan | 3d8ec487 | 2018-02-06 23:56:15 | [diff] [blame] | 14 | |
Chris Mumford | 4fdc5f31 | 2020-04-14 16:53:52 | [diff] [blame] | 15 | results += input_api.RunTests( |
| 16 | input_api.canned_checks.GetUnitTestsInDirectory( |
| 17 | input_api, |
| 18 | output_api, |
| 19 | input_api.os_path.join(this_dir, 'scripts'), |
Josip Sokcevic | 8b6cc43 | 2020-08-05 17:45:33 | [diff] [blame] | 20 | files_to_check=['.*unittest.py$'], |
Takuto Ikuta | 40def48 | 2023-06-02 02:23:49 | [diff] [blame] | 21 | env=None)) |
Victor Costan | 3d8ec487 | 2018-02-06 23:56:15 | [diff] [blame] | 22 | |
Chris Mumford | 4fdc5f31 | 2020-04-14 16:53:52 | [diff] [blame] | 23 | return results |