media/libyuv/tools/valgrind-libyuv/tsan/PRESUBMIT.py

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/libyuv/tools/valgrind-libyuv/tsan/PRESUBMIT.py	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,41 @@
     1.4 +#!/usr/bin/env python
     1.5 +# Copyright (c) 2012 The LibYuv Project Authors. All rights reserved.
     1.6 +#
     1.7 +# Use of this source code is governed by a BSD-style license
     1.8 +# that can be found in the LICENSE file in the root of the source
     1.9 +# tree. An additional intellectual property rights grant can be found
    1.10 +# in the file PATENTS.  All contributing project authors may
    1.11 +# be found in the AUTHORS file in the root of the source tree.
    1.12 +
    1.13 +import os
    1.14 +import re
    1.15 +import sys
    1.16 +
    1.17 +"""
    1.18 +Copied from Chrome's src/tools/valgrind/tsan/PRESUBMIT.py
    1.19 +
    1.20 +See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
    1.21 +for more details on the presubmit API built into gcl.
    1.22 +"""
    1.23 +
    1.24 +def CheckChange(input_api, output_api):
    1.25 +  """Checks the TSan suppressions files for bad suppressions."""
    1.26 +
    1.27 +  # Add the path to the Chrome valgrind dir to the import path:
    1.28 +  tools_vg_path = os.path.join(input_api.PresubmitLocalPath(), '..', '..',
    1.29 +                               'valgrind')
    1.30 +  sys.path.append(tools_vg_path)
    1.31 +  import suppressions
    1.32 +
    1.33 +  return suppressions.PresubmitCheck(input_api, output_api)
    1.34 +
    1.35 +def CheckChangeOnUpload(input_api, output_api):
    1.36 +  return CheckChange(input_api, output_api)
    1.37 +
    1.38 +def CheckChangeOnCommit(input_api, output_api):
    1.39 +  return CheckChange(input_api, output_api)
    1.40 +
    1.41 +def GetPreferredTrySlaves():
    1.42 +  # We don't have any tsan slaves yet, so there's no use for this method.
    1.43 +  # When we have, the slave name(s) should be put into this list.
    1.44 +  return []

mercurial