summaryrefslogtreecommitdiff
path: root/build/ios/presubmit_support.py
diff options
context:
space:
mode:
authorCronet Mainline Eng <cronet-mainline-eng+copybara@google.com>2023-04-17 14:36:25 -0800
committerPatrick Rohr <prohr@google.com>2023-04-17 15:41:30 -0700
commit41cb724250484f326b0bbd5f8b955eb37b3b83c6 (patch)
treecb7b2cbe08b2c5305a56b31649359f8141edd198 /build/ios/presubmit_support.py
parentc175721cfcc03e339122be17d569239df9762b2b (diff)
downloadcronet-41cb724250484f326b0bbd5f8b955eb37b3b83c6.tar.gz
Import Cronet version 114.0.5709.3
Project import generated by Copybara. FolderOrigin-RevId: /tmp/copybara-origin/src Test: none Change-Id: I263aa6b692a17ac2471b98b6e662b26dd1327c9c
Diffstat (limited to 'build/ios/presubmit_support.py')
-rw-r--r--build/ios/presubmit_support.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/build/ios/presubmit_support.py b/build/ios/presubmit_support.py
new file mode 100644
index 000000000..773d1586e
--- /dev/null
+++ b/build/ios/presubmit_support.py
@@ -0,0 +1,39 @@
+# Copyright 2023 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+"""Presubmit helpers for ios
+
+See https://www.chromium.org/developers/how-tos/depottools/presubmit-scripts
+for more details about the presubmit API built into depot_tools.
+"""
+
+from . import update_bundle_filelist
+
+
+def CheckBundleData(input_api, output_api, base, globroot='//'):
+ root = input_api.change.RepositoryRoot()
+ filelist = input_api.os_path.join(input_api.PresubmitLocalPath(),
+ base + '.filelist')
+ globlist = input_api.os_path.join(input_api.PresubmitLocalPath(),
+ base + '.globlist')
+ if globroot.startswith('//'):
+ globroot = input_api.os_path.join(input_api.change.RepositoryRoot(),
+ globroot[2:])
+ else:
+ globroot = input_api.os_path.join(input_api.PresubmitLocalPath(), globroot)
+ if update_bundle_filelist.process_filelist(filelist,
+ globlist,
+ globroot,
+ check=True,
+ verbose=input_api.verbose) == 0:
+ return []
+ else:
+ script = input_api.os_path.join(input_api.change.RepositoryRoot(), 'build',
+ 'ios', 'update_bundle_filelist.py')
+
+ return [
+ output_api.PresubmitError(
+ 'Filelist needs to be re-generated. Please run \'python3 %s %s %s '
+ '%s\' and include the changes in this CL' %
+ (script, filelist, globlist, globroot))
+ ]