diff --git a/tools/lsan/OWNERS b/tools/lsan/OWNERS new file mode 100644 index 0000000000..72e8ffc0db --- /dev/null +++ b/tools/lsan/OWNERS @@ -0,0 +1 @@ +* diff --git a/tools/lsan/PRESUBMIT.py b/tools/lsan/PRESUBMIT.py new file mode 100644 index 0000000000..007797ea34 --- /dev/null +++ b/tools/lsan/PRESUBMIT.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. + +""" +Copied from Chrome's src/tools/lsan/PRESUBMIT.py + +See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts +for more details on the presubmit API built into gcl. +""" + +import re + +def CheckChange(input_api, output_api): + errors = [] + + for f in input_api.AffectedFiles(): + if not f.LocalPath().endswith('suppressions.txt'): + continue + for line_num, line in enumerate(f.NewContents()): + line = line.strip() + if line.startswith('#') or not line: + continue + if not line.startswith('leak:'): + errors.append('"%s" should be "leak:..." in %s line %d' % + (line, f.LocalPath(), line_num)) + if errors: + return [output_api.PresubmitError('\n'.join(errors))] + return [] + +def CheckChangeOnUpload(input_api, output_api): + return CheckChange(input_api, output_api) + +def CheckChangeOnCommit(input_api, output_api): + return CheckChange(input_api, output_api) + +def GetPreferredTrySlaves(): + return ['linux_asan'] diff --git a/tools/lsan/suppressions.txt b/tools/lsan/suppressions.txt index 866ca5a3fa..1d3f6536f2 100644 --- a/tools/lsan/suppressions.txt +++ b/tools/lsan/suppressions.txt @@ -3,3 +3,23 @@ # More info about LSan on # http://www.chromium.org/developers/testing/leaksanitizer +# libjingle_peerconnection_unittest +# https://code.google.com/p/webrtc/issues/detail?id=2528 +leak:webrtc::WebRtcIdentityRequestObserver::OnSuccess + +# libjingle_unittest +# https://code.google.com/p/webrtc/issues/detail?id=2527 +leak:buzz::XmppTask::XmppTask +leak:talk_base::TaskParent::TaskParent +leak:MucRoomUniqueHangoutIdTaskTest::SetUp +leak:buzz::FakeXmppClient::SendStanza +leak:PingXmppClient::SendStanza +leak:talk_base::IdTimeoutTask::IdTimeoutTask +leak:talk_base::HttpData::changeHeader +leak:PubSubClientTest::PubSubClientTest +leak:HangoutPubSubClientTest::HangoutPubSubClientTest + +# modules_tests +# https://code.google.com/p/webrtc/issues/detail?id=2515 +leak:AudioCodingModuleTest_TestIsac_Test::TestBody +