| 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 """Dart frog buildbot steps | 7 """Dart frog buildbot steps |
| 8 | 8 |
| 9 Runs tests for the frog compiler (running on the vm or the self-hosting version) | 9 Runs tests for the frog compiler (running on the vm or the self-hosting version) |
| 10 """ | 10 """ |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 elif web_pattern: | 84 elif web_pattern: |
| 85 compiler = 'frog' | 85 compiler = 'frog' |
| 86 runtime = web_pattern.group(1) | 86 runtime = web_pattern.group(1) |
| 87 mode = 'release' | 87 mode = 'release' |
| 88 system = web_pattern.group(2) | 88 system = web_pattern.group(2) |
| 89 | 89 |
| 90 # TODO(jmesserly): do we want to do anything different for the second IE | 90 # TODO(jmesserly): do we want to do anything different for the second IE |
| 91 # bot? For now we're using it to track down flakiness. | 91 # bot? For now we're using it to track down flakiness. |
| 92 number = web_pattern.group(4) | 92 number = web_pattern.group(4) |
| 93 | |
| 94 # TODO(efortuna): This is a temporary repurposing of one of the IE bots so | |
| 95 # that the VM team can debug the VM crash on Windows (and not have to | |
| 96 # modify the buildbot master code). Get rid of this code once it is fixed. | |
| 97 if number == '2': | |
| 98 mode = 'debug' | |
| 99 runtime = 'chrome' # Use chrome for runtime because it's the fastest. | |
| 100 | 93 |
| 101 if system == 'windows': | 94 if system == 'windows': |
| 102 system = 'win7' | 95 system = 'win7' |
| 103 | 96 |
| 104 if (system == 'win7' and platform.system() != 'Windows') or ( | 97 if (system == 'win7' and platform.system() != 'Windows') or ( |
| 105 system == 'mac' and platform.system() != 'Darwin') or ( | 98 system == 'mac' and platform.system() != 'Darwin') or ( |
| 106 system == 'linux' and platform.system() != 'Linux'): | 99 system == 'linux' and platform.system() != 'Linux'): |
| 107 print ('Error: You cannot emulate a buildbot with a platform different ' | 100 print ('Error: You cannot emulate a buildbot with a platform different ' |
| 108 'from your own.') | 101 'from your own.') |
| 109 sys.exit(1) | 102 sys.exit(1) |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 144 |
| 152 def BuildFrog(compiler, mode, system): | 145 def BuildFrog(compiler, mode, system): |
| 153 """ build frog. | 146 """ build frog. |
| 154 Args: | 147 Args: |
| 155 - compiler: either 'dart2js', 'frog', 'frogsh' (frog self-hosted) | 148 - compiler: either 'dart2js', 'frog', 'frogsh' (frog self-hosted) |
| 156 - mode: either 'debug' or 'release' | 149 - mode: either 'debug' or 'release' |
| 157 - system: either 'linux', 'mac', or 'win7' | 150 - system: either 'linux', 'mac', or 'win7' |
| 158 """ | 151 """ |
| 159 # TODO(efortuna): Currently we always clobber Windows builds. The VM | 152 # TODO(efortuna): Currently we always clobber Windows builds. The VM |
| 160 # team thinks there's a problem with dependency tracking on Windows that | 153 # team thinks there's a problem with dependency tracking on Windows that |
| 161 # is leading to these VM heisenbugs. Remove this when the dependency issue has | 154 # is leading to occasional build failures. Remove when this gyp issue has |
| 162 # been ironed out. See bug 2124. | 155 # been ironed out. |
| 163 if system == 'win7': | 156 if system == 'win7': |
| 164 for build in ['Release_', 'Debug_']: | 157 for build in ['Release_', 'Debug_']: |
| 165 for arch in ['ia32', 'x64']: | 158 for arch in ['ia32', 'x64']: |
| 166 outdir = build + arch | 159 outdir = build + arch |
| 167 shutil.rmtree(outdir, ignore_errors=True) | 160 shutil.rmtree(outdir, ignore_errors=True) |
| 168 shutil.rmtree('frog/%s' % outdir, ignore_errors=True) | 161 shutil.rmtree('frog/%s' % outdir, ignore_errors=True) |
| 169 shutil.rmtree('runtime/%s' % outdir, ignore_errors=True) | 162 shutil.rmtree('runtime/%s' % outdir, ignore_errors=True) |
| 170 | 163 |
| 171 os.chdir(DART_PATH) | 164 os.chdir(DART_PATH) |
| 172 | 165 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 print '@@@STEP_FAILURE@@@' | 301 print '@@@STEP_FAILURE@@@' |
| 309 | 302 |
| 310 if compiler == 'frog' and runtime in ['ff', 'chrome', 'safari', 'opera', | 303 if compiler == 'frog' and runtime in ['ff', 'chrome', 'safari', 'opera', |
| 311 'ie', 'drt']: | 304 'ie', 'drt']: |
| 312 CleanUpTemporaryFiles(system, runtime) | 305 CleanUpTemporaryFiles(system, runtime) |
| 313 return status | 306 return status |
| 314 | 307 |
| 315 | 308 |
| 316 if __name__ == '__main__': | 309 if __name__ == '__main__': |
| 317 sys.exit(main()) | 310 sys.exit(main()) |
| OLD | NEW |