Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: build/landmines.py

Issue 464263005: landmines: use CHROMIUM_OUT_DIR if set (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 """ 6 """
7 This script runs every build as the first hook (See DEPS). If it detects that 7 This script runs every build as the first hook (See DEPS). If it detects that
8 the build should be clobbered, it will remove the build directory. 8 the build should be clobbered, it will remove the build directory.
9 9
10 A landmine is tripped when a builder checks out a different revision, and the 10 A landmine is tripped when a builder checks out a different revision, and the
(...skipping 25 matching lines...) Expand all
36 r'c:\b\build\slave\win\build\src\out' 36 r'c:\b\build\slave\win\build\src\out'
37 '/mnt/data/b/build/slave/linux/build/src/out' 37 '/mnt/data/b/build/slave/linux/build/src/out'
38 '/b/build/slave/ios_rel_device/build/src/xcodebuild' 38 '/b/build/slave/ios_rel_device/build/src/xcodebuild'
39 39
40 Keep this function in sync with tools/build/scripts/slave/compile.py 40 Keep this function in sync with tools/build/scripts/slave/compile.py
41 """ 41 """
42 ret = None 42 ret = None
43 if build_tool == 'xcode': 43 if build_tool == 'xcode':
44 ret = os.path.join(SRC_DIR, 'xcodebuild') 44 ret = os.path.join(SRC_DIR, 'xcodebuild')
45 elif build_tool in ['make', 'ninja', 'ninja-ios']: # TODO: Remove ninja-ios. 45 elif build_tool in ['make', 'ninja', 'ninja-ios']: # TODO: Remove ninja-ios.
46 ret = os.path.join(SRC_DIR, 'out') 46 ret = os.path.join(SRC_DIR, os.environ.get('CHROMIUM_OUT_DIR', 'out'))
47 elif build_tool in ['msvs', 'vs', 'ib']: 47 elif build_tool in ['msvs', 'vs', 'ib']:
48 ret = os.path.join(SRC_DIR, 'build') 48 ret = os.path.join(SRC_DIR, 'build')
49 else: 49 else:
50 raise NotImplementedError('Unexpected GYP_GENERATORS (%s)' % build_tool) 50 raise NotImplementedError('Unexpected GYP_GENERATORS (%s)' % build_tool)
51 return os.path.abspath(ret) 51 return os.path.abspath(ret)
52 52
53 53
54 def clobber_if_necessary(new_landmines): 54 def clobber_if_necessary(new_landmines):
55 """Does the work of setting, planting, and triggering landmines.""" 55 """Does the work of setting, planting, and triggering landmines."""
56 out_dir = get_build_dir(landmine_utils.builder()) 56 out_dir = get_build_dir(landmine_utils.builder())
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 proc = subprocess.Popen([sys.executable, s], stdout=subprocess.PIPE) 123 proc = subprocess.Popen([sys.executable, s], stdout=subprocess.PIPE)
124 output, _ = proc.communicate() 124 output, _ = proc.communicate()
125 landmines.extend([('%s\n' % l.strip()) for l in output.splitlines()]) 125 landmines.extend([('%s\n' % l.strip()) for l in output.splitlines()])
126 clobber_if_necessary(landmines) 126 clobber_if_necessary(landmines)
127 127
128 return 0 128 return 0
129 129
130 130
131 if __name__ == '__main__': 131 if __name__ == '__main__':
132 sys.exit(main()) 132 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698