Move tools/valgrind-webrtc -> tools-webrtc/valgrind

The WebRTC valgrind wrapper scripts needs to be moved in order to
unlock us from depending on a Chromium checkout.

BUG=webrtc:5006
TBR=ehmaldonado@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2578093002
Cr-Commit-Position: refs/heads/master@{#15662}
This commit is contained in:
kjellander 2016-12-17 12:21:39 -08:00 committed by Commit bot
parent 8d8816c7b5
commit afd5494455
26 changed files with 51 additions and 51 deletions

View File

@ -456,10 +456,10 @@ def _CommonChecks(input_api, output_api):
r'^tools[\\\/]refactoring[\\\/].*\.py$',
r'^tools[\\\/]swarming_client[\\\/].*\.py$',
r'^tools[\\\/]vim[\\\/].*\.py$',
# TODO(phoglund): should arguably be checked.
r'^tools[\\\/]valgrind-webrtc[\\\/].*\.py$',
r'^tools[\\\/]valgrind[\\\/].*\.py$',
r'^tools[\\\/]win[\\\/].*\.py$',
# TODO(phoglund): should arguably be checked.
r'^tools-webrtc[\\\/]valgrind[\\\/].*\.py$',
r'^xcodebuild.*[\\\/].*\.py$',),
disabled_warnings=['F0401', # Failed to import x
'E0611', # No package y in x

View File

@ -22,8 +22,8 @@ def CheckChange(input_api, output_api):
"""Checks the memcheck suppressions files for bad data."""
# Add the path to the Chrome valgrind dir to the import path:
tools_vg_path = os.path.join(input_api.PresubmitLocalPath(), '..', '..',
'valgrind')
tools_vg_path = os.path.join(input_api.PresubmitLocalPath(), '..', '..', '..',
'tools', 'valgrind')
sys.path.append(tools_vg_path)
import suppressions

View File

@ -0,0 +1,33 @@
# Copyright (c) 2016 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.
# TODO(ehmaldonado): Replace by the new paths once the upstream changes land.
# See https://codereview.chromium.org/2526883002/ for valgrind-binaries.gni and
# https://codereview.chromium.org/2517953007/ for python-google.gni and
# valgrind.gni
import("python-google.gni")
import("valgrind-binaries.gni")
import("valgrind.gni")
valgrind_webrtc_dependencies = [
"../../tools-webrtc/valgrind/gtest_exclude/modules_tests.gtest-memcheck.txt",
"../../tools-webrtc/valgrind/gtest_exclude/modules_unittests.gtest-memcheck.txt",
"../../tools-webrtc/valgrind/gtest_exclude/peerconnection_unittests.gtest-memcheck.txt",
"../../tools-webrtc/valgrind/gtest_exclude/rtc_media_unittests.gtest-memcheck.txt",
"../../tools-webrtc/valgrind/gtest_exclude/rtc_media_unittests.gtest-memcheck_mac.txt",
"../../tools-webrtc/valgrind/gtest_exclude/rtc_pc_unittests.gtest-memcheck.txt",
"../../tools-webrtc/valgrind/gtest_exclude/rtc_unittests.gtest-memcheck.txt",
"../../tools-webrtc/valgrind/gtest_exclude/video_engine_tests.gtest-memcheck.txt",
"../../tools-webrtc/valgrind/gtest_exclude/webrtc_nonparallel_tests.gtest-memcheck.txt",
"../../tools-webrtc/valgrind/memcheck/suppressions.txt",
"../../tools-webrtc/valgrind/memcheck/suppressions_mac.txt",
"../../tools-webrtc/valgrind/memcheck/suppressions_win32.txt",
"../../tools-webrtc/valgrind/webrtc_tests.py",
"../../tools-webrtc/valgrind/webrtc_tests.sh",
] + valgrind_dependencies + valgrind_binaries +
python_google

View File

@ -66,16 +66,15 @@ class WebRTCTest(chrome_tests.ChromeTests):
# this script's location. If Mac or Windows is executing, additional
# platform specific files have also been added.
# Since only the ones located below this directory are added, we must also
# add the ones maintained by Chrome, located in ../valgrind.
# add the ones maintained by Chrome, located in ../../tools/valgrind.
# The idea is to look for --suppression arguments in the cmd list and add a
# modified copy of each suppression file, for the corresponding file in
# ../valgrind. If we would simply replace 'valgrind-webrtc' with 'valgrind'
# we may produce invalid paths if other parts of the path contain that
# string. That's why the code below only replaces the end of the path.
# ../../tools/valgrind.
script_dir = path_utils.ScriptDir()
old_base, _ = os.path.split(script_dir)
new_dir = os.path.join(old_base, 'valgrind')
checkout_src = os.path.abspath(os.path.join(script_dir, os.pardir,
os.pardir))
new_dir = os.path.join(checkout_src, 'tools', 'valgrind')
add_suppressions = []
for token in cmd:
if '--suppressions' in token:

View File

@ -24,9 +24,9 @@ export THISDIR=`dirname $0`
ARGV_COPY="$@"
# We need to set CHROME_VALGRIND iff using Memcheck:
# tools/valgrind-webrtc/webrtc_tests.sh --tool memcheck
# tools-webrtc/valgrind/webrtc_tests.sh --tool memcheck
# or
# tools/valgrind-webrtc/webrtc_tests.sh --tool=memcheck
# tools-webrtc/valgrind/webrtc_tests.sh --tool=memcheck
tool="memcheck" # Default to memcheck.
while (( "$#" ))
do
@ -51,7 +51,7 @@ esac
# For WebRTC, we'll use the locate_valgrind.sh script in Chromium's Valgrind
# scripts dir to locate the Valgrind framework install
CHROME_VALGRIND_SCRIPTS=$THISDIR/../valgrind
CHROME_VALGRIND_SCRIPTS=$THISDIR/../../tools/valgrind
if [ "$NEEDS_VALGRIND" == "1" ]
then
@ -98,5 +98,5 @@ fi
# Add Chrome's Valgrind scripts dir to the PYTHON_PATH since it contains
# the scripts that are needed for this script to run
PYTHONPATH=$THISDIR/../python/google:$CHROME_VALGRIND_SCRIPTS python \
PYTHONPATH=$THISDIR/../../tools/python/google:$CHROME_VALGRIND_SCRIPTS python \
"$THISDIR/webrtc_tests.py" $ARGV_COPY

View File

@ -1113,7 +1113,7 @@ class MetaBuildWrapper(object):
memcheck = is_linux and 'rtc_use_memcheck=true' in vals['gn_args']
memcheck_cmdline = [
'bash',
'../../tools/valgrind-webrtc/webrtc_tests.sh',
'../../tools-webrtc/valgrind/webrtc_tests.sh',
'--tool',
'memcheck',
'--target',

View File

@ -636,7 +636,7 @@ class UnitTest(unittest.TestCase):
'/fake_src/out/Release/base_unittests.runtime_deps': (
"base_unittests\n"
"lots_of_memcheck_dependencies\n"
"../../tools/valgrind-webrtc/webrtc_tests.sh\n"
"../../tools-webrtc/valgrind/webrtc_tests.sh\n"
),
}
mbw = self.check(['gen', '-c', 'gn_memcheck_bot', '//out/Release',
@ -652,14 +652,14 @@ class UnitTest(unittest.TestCase):
self.assertEqual(files, [
'../../testing/test_env.py',
'../../tools/valgrind-webrtc/webrtc_tests.sh',
'../../tools-webrtc/valgrind/webrtc_tests.sh',
'base_unittests',
'lots_of_memcheck_dependencies',
])
self.assertEqual(command, [
'../../testing/test_env.py',
'bash',
'../../tools/valgrind-webrtc/webrtc_tests.sh',
'../../tools-webrtc/valgrind/webrtc_tests.sh',
'--tool',
'memcheck',
'--target',

View File

@ -1,32 +0,0 @@
# Copyright (c) 2016 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.
# TODO(ehmaldonado): Replace by the new paths once the upstream changes land.
# See https://codereview.chromium.org/2526883002/ for valgrind-binaries.gni and
# https://codereview.chromium.org/2517953007/ for python-google.gni and
# valgrind.gni
import("python-google.gni")
import("valgrind-binaries.gni")
import("valgrind.gni")
valgrind_webrtc_dependencies = [
"../../tools/valgrind-webrtc/gtest_exclude/modules_tests.gtest-memcheck.txt",
"../../tools/valgrind-webrtc/gtest_exclude/modules_unittests.gtest-memcheck.txt",
"../../tools/valgrind-webrtc/gtest_exclude/peerconnection_unittests.gtest-memcheck.txt",
"../../tools/valgrind-webrtc/gtest_exclude/rtc_media_unittests.gtest-memcheck.txt",
"../../tools/valgrind-webrtc/gtest_exclude/rtc_media_unittests.gtest-memcheck_mac.txt",
"../../tools/valgrind-webrtc/gtest_exclude/rtc_pc_unittests.gtest-memcheck.txt",
"../../tools/valgrind-webrtc/gtest_exclude/rtc_unittests.gtest-memcheck.txt",
"../../tools/valgrind-webrtc/gtest_exclude/video_engine_tests.gtest-memcheck.txt",
"../../tools/valgrind-webrtc/gtest_exclude/webrtc_nonparallel_tests.gtest-memcheck.txt",
"../../tools/valgrind-webrtc/memcheck/suppressions.txt",
"../../tools/valgrind-webrtc/memcheck/suppressions_mac.txt",
"../../tools/valgrind-webrtc/memcheck/suppressions_win32.txt",
"../../tools/valgrind-webrtc/webrtc_tests.py",
"../../tools/valgrind-webrtc/webrtc_tests.sh",
] + valgrind_dependencies + valgrind_binaries + python_google

View File

@ -12,7 +12,7 @@ if (is_android) {
import("//build/config/android/rules.gni")
}
if (rtc_use_memcheck) {
import("//tools/valgrind-webrtc/valgrind-webrtc.gni")
import("//tools-webrtc/valgrind/valgrind-webrtc.gni")
}
group("test") {