OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """Dart2js buildbot steps | 7 """Dart2js buildbot steps |
8 | 8 |
9 Runs tests for the dart2js compiler. | 9 Runs tests for the dart2js compiler. |
10 """ | 10 """ |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 print '@@@STEP_FAILURE@@@' | 135 print '@@@STEP_FAILURE@@@' |
136 return exit_code | 136 return exit_code |
137 | 137 |
138 | 138 |
139 def BuildSDK(mode, system): | 139 def BuildSDK(mode, system): |
140 """ build the SDK. | 140 """ build the SDK. |
141 Args: | 141 Args: |
142 - mode: either 'debug' or 'release' | 142 - mode: either 'debug' or 'release' |
143 - system: either 'linux', 'mac', or 'win7' | 143 - system: either 'linux', 'mac', or 'win7' |
144 """ | 144 """ |
145 # TODO(efortuna): Currently we always clobber Windows builds. The VM | |
146 # team thinks there's a problem with dependency tracking on Windows that | |
147 # is leading to occasional build failures. Remove when this gyp issue has | |
148 # been ironed out. | |
149 if system == 'win7': | |
150 for build in ['Release_', 'Debug_']: | |
151 for arch in ['ia32', 'x64']: | |
152 outdir = build + arch | |
153 shutil.rmtree(outdir, ignore_errors=True) | |
154 shutil.rmtree('runtime/%s' % outdir, ignore_errors=True) | |
155 | |
156 os.chdir(DART_PATH) | 145 os.chdir(DART_PATH) |
157 | 146 |
158 args = [sys.executable, './tools/build.py', '--mode=' + mode, 'create_sdk'] | 147 args = [sys.executable, './tools/build.py', '--mode=' + mode, 'create_sdk'] |
159 print 'running %s' % (' '.join(args)) | 148 print 'running %s' % (' '.join(args)) |
160 return subprocess.call(args, env=NO_COLOR_ENV) | 149 return subprocess.call(args, env=NO_COLOR_ENV) |
161 | 150 |
162 | 151 |
163 def TestCompiler(runtime, mode, system, option, flags, is_buildbot): | 152 def TestCompiler(runtime, mode, system, option, flags, is_buildbot): |
164 """ test the compiler. | 153 """ test the compiler. |
165 Args: | 154 Args: |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 if status == 0 and option != 'checked' and runtime == 'd8': | 336 if status == 0 and option != 'checked' and runtime == 'd8': |
348 status = TestCompiler(runtime, mode, system, option, | 337 status = TestCompiler(runtime, mode, system, option, |
349 test_flags + ['--checked'], is_buildbot) | 338 test_flags + ['--checked'], is_buildbot) |
350 | 339 |
351 if runtime != 'd8': CleanUpTemporaryFiles(system, runtime) | 340 if runtime != 'd8': CleanUpTemporaryFiles(system, runtime) |
352 if status != 0: print '@@@STEP_FAILURE@@@' | 341 if status != 0: print '@@@STEP_FAILURE@@@' |
353 return status | 342 return status |
354 | 343 |
355 if __name__ == '__main__': | 344 if __name__ == '__main__': |
356 sys.exit(main()) | 345 sys.exit(main()) |
OLD | NEW |