blob: 1cd25f92e22def17a6fef02c8bd59820ac528244 [file] [log] [blame]
# Copyright 2015 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 tests for /tools/vim.
Runs Python unit tests in /tools/vim/tests on upload.
def CheckChangeOnUpload(input_api, output_api):
results = []
# affected_files is list of files affected by this change. The paths are
# relative to the directory containing
affected_files = [
input_api.os_path.relpath(f, input_api.PresubmitLocalPath())
for f in input_api.AbsoluteLocalPaths()
# Run the chromium.ycm_extra_conf_unittest test if the YCM config file is
# changed or if any change is affecting the tests directory. This specific
# test requires access to 'ninja' and hasn't been tested on platforms other
# than Linux.
if '' in affected_files or \
'' in affected_files or \
any(['tests(/|\\)',f) for f in affected_files]):
results += input_api.RunTests(
input_api.canned_checks.GetUnitTests(input_api, output_api, [
return results