OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import optparse | 6 import optparse |
7 import os | 7 import os |
8 import subprocess | 8 import subprocess |
9 import sys | 9 import sys |
10 import time | 10 import time |
11 | 11 |
12 import build_projects | 12 import build_projects |
13 import build_version | 13 import build_version |
14 import buildbot_common | 14 import buildbot_common |
15 import parse_dsc | 15 import parse_dsc |
16 | 16 |
17 from build_paths import OUT_DIR, SRC_DIR, SDK_SRC_DIR, SCRIPT_DIR | 17 from build_paths import OUT_DIR, SRC_DIR, SDK_SRC_DIR, SCRIPT_DIR |
18 | 18 |
19 sys.path.append(os.path.join(SDK_SRC_DIR, 'tools')) | 19 sys.path.append(os.path.join(SDK_SRC_DIR, 'tools')) |
20 import getos | 20 import getos |
21 platform = getos.GetPlatform() | 21 platform = getos.GetPlatform() |
22 | 22 |
23 # TODO(binji): ugly hack -- can I get the browser in a cleaner way? | 23 # TODO(binji): ugly hack -- can I get the browser in a cleaner way? |
24 sys.path.append(os.path.join(SRC_DIR, 'chrome', 'test', 'nacl_test_injection')) | 24 sys.path.append(os.path.join(SRC_DIR, 'chrome', 'test', 'nacl_test_injection')) |
25 import find_chrome | 25 import find_chrome |
26 browser_path = find_chrome.FindChrome(SRC_DIR, ['Debug', 'Release']) | 26 browser_path = find_chrome.FindChrome(SRC_DIR, ['Debug', 'Release']) |
27 | 27 |
| 28 # Fall back to using CHROME_PATH (same as in common.mk) |
| 29 if not browser_path: |
| 30 browser_path = os.environ['CHROME_PATH'] |
| 31 |
28 | 32 |
29 pepper_ver = str(int(build_version.ChromeMajorVersion())) | 33 pepper_ver = str(int(build_version.ChromeMajorVersion())) |
30 pepperdir = os.path.join(OUT_DIR, 'pepper_' + pepper_ver) | 34 pepperdir = os.path.join(OUT_DIR, 'pepper_' + pepper_ver) |
31 | 35 |
32 browser_tester_py = os.path.join(SRC_DIR, 'ppapi', 'native_client', 'tools', | 36 browser_tester_py = os.path.join(SRC_DIR, 'ppapi', 'native_client', 'tools', |
33 'browser_tester', 'browser_tester.py') | 37 'browser_tester', 'browser_tester.py') |
34 | 38 |
35 | 39 |
36 ALL_CONFIGS = ['Debug', 'Release'] | 40 ALL_CONFIGS = ['Debug', 'Release'] |
37 ALL_TOOLCHAINS = ['newlib', 'glibc', 'pnacl', 'win', 'linux', 'mac'] | 41 ALL_TOOLCHAINS = ['newlib', 'glibc', 'pnacl', 'win', 'linux', 'mac'] |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 | 367 |
364 | 368 |
365 if __name__ == '__main__': | 369 if __name__ == '__main__': |
366 script_name = os.path.basename(sys.argv[0]) | 370 script_name = os.path.basename(sys.argv[0]) |
367 try: | 371 try: |
368 sys.exit(main(sys.argv[1:])) | 372 sys.exit(main(sys.argv[1:])) |
369 except parse_dsc.ValidationError as e: | 373 except parse_dsc.ValidationError as e: |
370 buildbot_common.ErrorExit('%s: %s' % (script_name, e)) | 374 buildbot_common.ErrorExit('%s: %s' % (script_name, e)) |
371 except KeyboardInterrupt: | 375 except KeyboardInterrupt: |
372 buildbot_common.ErrorExit('%s: interrupted' % script_name) | 376 buildbot_common.ErrorExit('%s: interrupted' % script_name) |
OLD | NEW |