Note: We no longer publish the latest version of our code here. We primarily use a kumc-bmi github organization. The heron ETL repository, in particular, is not public. Peers in the informatics community should see MultiSiteDev for details on requesting access.

source: webrtc/tools/lsan/PRESUBMIT.py @ 0:4bda6873e34c

pub_scrub_3792 tip
Last change on this file since 0:4bda6873e34c was 0:4bda6873e34c, checked in by Michael Prittie <mprittie@…>, 6 years ago

Scrubbed password for publication.

File size: 1.4 KB
Line 
1#!/usr/bin/env python
2# Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3#
4# Use of this source code is governed by a BSD-style license
5# that can be found in the LICENSE file in the root of the source
6# tree. An additional intellectual property rights grant can be found
7# in the file PATENTS.  All contributing project authors may
8# be found in the AUTHORS file in the root of the source tree.
9
10"""
11Copied from Chrome's src/tools/lsan/PRESUBMIT.py
12
13See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
14for more details on the presubmit API built into gcl.
15"""
16
17import re
18
19def CheckChange(input_api, output_api):
20  errors = []
21
22  for f in input_api.AffectedFiles():
23    if not f.LocalPath().endswith('suppressions.txt'):
24      continue
25    for line_num, line in enumerate(f.NewContents()):
26      line = line.strip()
27      if line.startswith('#') or not line:
28        continue
29      if not line.startswith('leak:'):
30        errors.append('"%s" should be "leak:..." in %s line %d' %
31                      (line, f.LocalPath(), line_num))
32  if errors:
33    return [output_api.PresubmitError('\n'.join(errors))]
34  return []
35
36def CheckChangeOnUpload(input_api, output_api):
37  return CheckChange(input_api, output_api)
38
39def CheckChangeOnCommit(input_api, output_api):
40  return CheckChange(input_api, output_api)
41
42def GetPreferredTrySlaves():
43  return ['linux_asan']
Note: See TracBrowser for help on using the repository browser.