| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 import os | 6 import os |
| 7 import re | 7 import re |
| 8 import sys | 8 import sys |
| 9 | 9 |
| 10 import bot | 10 import bot |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 if sys.platform == 'win32': | 115 if sys.platform == 'win32': |
| 116 # Our windows bots pull in only a 32 bit JVM. | 116 # Our windows bots pull in only a 32 bit JVM. |
| 117 test_architectures = ['ia32'] | 117 test_architectures = ['ia32'] |
| 118 | 118 |
| 119 for arch in architectures: | 119 for arch in architectures: |
| 120 with bot.BuildStep('Build Editor %s' % arch): | 120 with bot.BuildStep('Build Editor %s' % arch): |
| 121 args = [sys.executable, build_py, | 121 args = [sys.executable, build_py, |
| 122 '-mrelease', '--arch=%s' % arch, 'editor', 'create_sdk'] | 122 '-mrelease', '--arch=%s' % arch, 'editor', 'create_sdk'] |
| 123 RunProcess(args) | 123 RunProcess(args) |
| 124 | 124 |
| 125 # before we run the editor, suppress any 'restore windows' dialogs |
| 126 if sys.platform == 'darwin': |
| 127 bot.RunProcess(['defaults', 'write', 'org.eclipse.eclipse.savedState', |
| 128 'NSQuitAlwaysKeepsWindows', '-bool', 'false']) |
| 129 |
| 125 for arch in test_architectures: | 130 for arch in test_architectures: |
| 126 editor_executable = GetEditorExecutable('Release', arch) | 131 editor_executable = GetEditorExecutable('Release', arch) |
| 127 with bot.BuildStep('Test Editor %s' % arch): | 132 with bot.BuildStep('Test Editor %s' % arch): |
| 128 with utils.TempDir('eclipse') as temp_dir: | 133 with utils.TempDir('eclipse') as temp_dir: |
| 129 args = [editor_executable, '--test', '--auto-exit', '-data', temp_dir] | 134 args = [editor_executable, '--test', '--auto-exit', '-data', temp_dir] |
| 130 RunProcess(args) | 135 RunProcess(args) |
| 131 | 136 |
| 132 # TODO: Permissions need to be clarified | 137 # TODO: Permissions need to be clarified |
| 133 for arch in test_architectures: | 138 for arch in test_architectures: |
| 134 with bot.BuildStep('Build Installer %s' % arch): | 139 with bot.BuildStep('Build Installer %s' % arch): |
| 135 if sys.platform == 'darwin': | 140 if sys.platform == 'darwin': |
| 136 CreateAndUploadMacInstaller(arch) | 141 CreateAndUploadMacInstaller(arch) |
| 137 else: | 142 else: |
| 138 print ("We currently don't build installers for sys.platform=%s" | 143 print ("We currently don't build installers for sys.platform=%s" |
| 139 % sys.platform) | 144 % sys.platform) |
| 140 return 0 | 145 return 0 |
| 141 | 146 |
| 142 if __name__ == '__main__': | 147 if __name__ == '__main__': |
| 143 try: | 148 try: |
| 144 sys.exit(main()) | 149 sys.exit(main()) |
| 145 except OSError as e: | 150 except OSError as e: |
| 146 sys.exit(e.errno) | 151 sys.exit(e.errno) |
| OLD | NEW |