v8/build/has_valgrind.py
machenbach b065c216e7 [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}
2016-02-15 12:47:54 +00:00

22 lines
666 B
Python
Executable File

#!/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([])