Commit b065c216 authored by machenbach's avatar machenbach Committed by Commit bot

[Swarming] Isolate valgrind runner.

This creates an isolate with the v8-side valgrind wrapper and
the valgrind binaries from third_party. It's dynamically
checked if the directories are present.

Follow up after https://codereview.chromium.org/1585093002/
and https://codereview.chromium.org/1583933006/

BUG=chromium:535160
LOG=n

Review URL: https://codereview.chromium.org/1700673002

Cr-Commit-Position: refs/heads/master@{#33992}
parent 1d9e9c83
......@@ -37,6 +37,7 @@
'../test/test262/test262.gyp:*',
'../test/webkit/webkit.gyp:*',
'../tools/check-static-initializers.gyp:*',
'../tools/run-valgrind.gyp:*',
],
}],
]
......
#!/usr/bin/env python
# Copyright 2016 the V8 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.
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
VALGRIND_DIR = os.path.join(BASE_DIR, 'third_party', 'valgrind')
LINUX32_DIR = os.path.join(VALGRIND_DIR, 'linux_x86')
LINUX64_DIR = os.path.join(VALGRIND_DIR, 'linux_x64')
def DoMain(_):
"""Hook to be called from gyp without starting a separate python
interpreter."""
return int(os.path.exists(LINUX32_DIR) and os.path.exists(LINUX64_DIR))
if __name__ == '__main__':
print DoMain([])
......@@ -71,6 +71,7 @@
'--config-variable', 'OS=<(OS)',
'--config-variable', 'asan=<(asan)',
'--config-variable', 'cfi_vptr=<(cfi_vptr)',
'--config-variable', 'has_valgrind=<(has_valgrind)',
'--config-variable', 'icu_use_data_file_flag=0',
'--config-variable', 'msan=<(msan)',
'--config-variable', 'tsan=<(tsan)',
......
......@@ -110,6 +110,9 @@
'use_goma%': 0,
'gomadir%': '',
# Check if valgrind directories are present.
'has_valgrind%': '<!pymod_do_main(has_valgrind)',
'conditions': [
# Set default gomadir.
['OS=="win"', {
......@@ -166,6 +169,7 @@
'test_isolation_mode%': '<(test_isolation_mode)',
'fastbuild%': '<(fastbuild)',
'coverage%': '<(coverage)',
'has_valgrind%': '<(has_valgrind)',
# Add a simple extras solely for the purpose of the cctests
'v8_extra_library_files': ['../test/cctest/test-extra.js'],
......
# Copyright 2016 the V8 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.
{
'conditions': [
['test_isolation_mode != "noop"', {
'targets': [
{
'target_name': 'run_valgrind_run',
'type': 'none',
'dependencies': [
'../src/d8.gyp:d8_run',
],
'includes': [
'../build/features.gypi',
'../build/isolate.gypi',
],
'sources': [
'run-valgrind.isolate',
],
},
],
}],
],
}
# Copyright 2016 the V8 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.
{
'variables': {
'command': [
'run-valgrind.py',
],
'files': [
'run-valgrind.py',
],
},
'conditions': [
['has_valgrind==1', {
'variables': {
'files': [
# This assumes vagrind binaries have been fetched as a custom deps
# into v8/third_party/valgrind. It is not clear on which target
# machine this will run, but grabbing both is cheap.
'../third_party/valgrind/linux_x86/',
'../third_party/valgrind/linux_x64/',
],
},
}],
],
'includes': [
'../src/d8.isolate',
],
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment