0
Files
src/tools/json_to_struct/PRESUBMIT.py
Ari Chivukula c393a87d8c Python3Migration-PresubmitChecks: json_to_struct
This CL is part of a larger effort to deprecate python2 in PRESUBMIT.
json_to_struct's PRESUBMIT file will now run unit tests in
python3. In order to do this, every file's #! must specify python3
(in this dir, most were ambiguous and simply said python).

Bug: 1212102
Change-Id: Ieae3c96ccc85b8f72f8f0742aeb0051f0a08db76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2921954
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Cr-Commit-Position: refs/heads/master@{#887375}
2021-05-27 23:25:28 +00:00

22 lines
759 B
Python

# Copyright 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Presubmit script for changes affecting tools/json_to_struct/
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
USE_PYTHON3 = True
WHITELIST = [ r'.+_test.py$' ]
def CheckChangeOnUpload(input_api, output_api):
return input_api.canned_checks.RunUnitTestsInDirectory(
input_api, output_api, '.', files_to_check=WHITELIST)
def CheckChangeOnCommit(input_api, output_api):
return input_api.canned_checks.RunUnitTestsInDirectory(
input_api, output_api, '.', files_to_check=WHITELIST)