Chromium Code Reviews| Index: build/has_valgrind.py |
| diff --git a/build/has_valgrind.py b/build/has_valgrind.py |
| new file mode 100755 |
| index 0000000000000000000000000000000000000000..4532b7a9ab79bbfa5597cdbb007be9325b524d19 |
| --- /dev/null |
| +++ b/build/has_valgrind.py |
| @@ -0,0 +1,19 @@ |
| +#!/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') |
| + |
|
kjellander_chromium
2016/02/15 08:48:28
two blank lines before top-level function
Michael Achenbach
2016/02/15 09:55:45
Done.
|
| +def DoMain(_): |
|
kjellander_chromium
2016/02/15 08:48:28
name this main(_):
https://google.github.io/style
Michael Achenbach
2016/02/15 09:55:45
Won't work. This is not the python main function b
kjellander_chromium
2016/02/15 11:49:26
Ah, I didn't pay attention to (or knew about) that
|
| + """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)) |
| + |
|
kjellander_chromium
2016/02/15 08:48:28
+1 blank line
Michael Achenbach
2016/02/15 09:55:45
Done.
|
| +if __name__ == '__main__': |
| + print DoMain([]) |