• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2019 The PDFium 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"""Presubmit script for PDFium testing tools.
5
6See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
7for more details on the presubmit API built into depot_tools.
8"""
9
10
11def _CommonChecks(input_api, output_api):
12  tests = []
13  tests.extend(input_api.canned_checks.GetPylint(input_api, output_api))
14  return tests
15
16
17def CheckChangeOnUpload(input_api, output_api):
18  tests = []
19  tests.extend(_CommonChecks(input_api, output_api))
20  return input_api.RunTests(tests)
21
22
23def CheckChangeOnCommit(input_api, output_api):
24  tests = []
25  tests.extend(_CommonChecks(input_api, output_api))
26  return input_api.RunTests(tests)
27