[go: nahoru, domu]

blob: 274f7a6087eab7b856299d7fb84eef9739c43bc3 [file] [log] [blame]
Avi Drissmane4622aa2022-09-08 20:36:061# Copyright 2018 The Chromium Authors
Peter Wen52efd31922018-01-31 22:04:522# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
Peter Wen52efd31922018-01-31 22:04:524"""Presubmit script for android buildbot.
5
6See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
7details on the presubmit API built into depot_tools.
8"""
9
Sam Maierb926c58c2023-08-08 19:58:2510
Peter Wen52efd31922018-01-31 22:04:5211def CommonChecks(input_api, output_api):
12 base_android_jni_generator_dir = input_api.PresubmitLocalPath()
13
14 env = dict(input_api.environ)
15 env.update({
Eric Stevensond00e9a12019-05-22 15:55:1116 'PYTHONPATH': base_android_jni_generator_dir,
17 'PYTHONDONTWRITEBYTECODE': '1',
Peter Wen52efd31922018-01-31 22:04:5218 })
19
Andrew Grievede87fa012022-07-05 18:55:3720 return input_api.RunTests(
21 input_api.canned_checks.GetUnitTests(
22 input_api,
23 output_api,
Andrew Grievede87fa012022-07-05 18:55:3724 unit_tests=[
25 input_api.os_path.join(base_android_jni_generator_dir,
Andrew Grievea912bcac2023-07-18 17:24:0926 'integration_tests.py')
Andrew Grievede87fa012022-07-05 18:55:3727 ],
28 env=env,
29 ))
Peter Wen52efd31922018-01-31 22:04:5230
31
32def CheckChangeOnUpload(input_api, output_api):
Eric Stevensond00e9a12019-05-22 15:55:1133 return CommonChecks(input_api, output_api)
Peter Wen52efd31922018-01-31 22:04:5234
35
36def CheckChangeOnCommit(input_api, output_api):
Eric Stevensond00e9a12019-05-22 15:55:1137 return CommonChecks(input_api, output_api)