tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

PRESUBMIT.py (1186B)


      1 # Copyright 2021 The Chromium Authors
      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 Fuchsia.
      5 
      6 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
      7 details on the presubmit API built into depot_tools.
      8 """
      9 
     10 
     11 import os
     12 
     13 
     14 def CommonChecks(input_api, output_api):
     15  build_fuchsia_dir = input_api.PresubmitLocalPath()
     16 
     17  def J(*dirs):
     18    """Returns a path relative to presubmit directory."""
     19    return input_api.os_path.join(build_fuchsia_dir, *dirs)
     20 
     21  tests = []
     22  unit_tests = [
     23      J('binary_sizes_test.py'),
     24      J('binary_size_differ_test.py'),
     25      J('gcs_download_test.py'),
     26      J('update_product_bundles_test.py'),
     27      J('update_sdk_test.py'),
     28  ]
     29 
     30  tests.extend(
     31      input_api.canned_checks.GetUnitTests(input_api,
     32                                           output_api,
     33                                           unit_tests=unit_tests))
     34  return input_api.RunTests(tests)
     35 
     36 
     37 def CheckChangeOnUpload(input_api, output_api):
     38  return CommonChecks(input_api, output_api)
     39 
     40 
     41 def CheckChangeOnCommit(input_api, output_api):
     42  return CommonChecks(input_api, output_api)