| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
| 6 | 6 |
| 7 import glob | 7 import glob |
| 8 import gsutil | 8 import gsutil |
| 9 import hashlib | 9 import hashlib |
| 10 import imp | 10 import imp |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 def RunEditorTests(buildout, buildos): | 750 def RunEditorTests(buildout, buildos): |
| 751 StartBuildStep('run_tests') | 751 StartBuildStep('run_tests') |
| 752 | 752 |
| 753 for editorArchive in _GetTestableRcpArchives(buildout): | 753 for editorArchive in _GetTestableRcpArchives(buildout): |
| 754 with utils.TempDir('editor_') as tempDir: | 754 with utils.TempDir('editor_') as tempDir: |
| 755 print 'Running tests for %s...' % editorArchive | 755 print 'Running tests for %s...' % editorArchive |
| 756 | 756 |
| 757 zipper = ziputils.ZipUtil(join(buildout, editorArchive), buildos) | 757 zipper = ziputils.ZipUtil(join(buildout, editorArchive), buildos) |
| 758 zipper.UnZip(tempDir) | 758 zipper.UnZip(tempDir) |
| 759 | 759 |
| 760 # before we run the editor, suppress any 'restore windows' dialogs |
| 761 if sys.platform == 'darwin': |
| 762 args = ['defaults', 'write', 'org.eclipse.eclipse.savedState', |
| 763 'NSQuitAlwaysKeepsWindows', '-bool', 'false'] |
| 764 subprocess.call(args, shell=IsWindows()) |
| 765 |
| 760 editorExecutable = GetEditorExecutable(join(tempDir, 'dart')) | 766 editorExecutable = GetEditorExecutable(join(tempDir, 'dart')) |
| 761 args = [editorExecutable, '--test', '--auto-exit', | 767 args = [editorExecutable, '--test', '--auto-exit', |
| 762 '-data', join(tempDir, 'workspace')] | 768 '-data', join(tempDir, 'workspace')] |
| 763 | 769 |
| 764 # Issue 12638. Enable this as soon as we can run editor tests in xvfb | 770 # Issue 12638. Enable this as soon as we can run editor tests in xvfb |
| 765 # again. | 771 # again. |
| 766 ##if sys.platform == 'linux2': | 772 ##if sys.platform == 'linux2': |
| 767 ## args = ['xvfb-run', '-a'] + args | 773 ## args = ['xvfb-run', '-a'] + args |
| 768 | 774 |
| 769 # this can hang if a 32 bit jvm is not available on windows... | 775 # this can hang if a 32 bit jvm is not available on windows... |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1075 """delete the given file - do not re-throw any exceptions that occur""" | 1081 """delete the given file - do not re-throw any exceptions that occur""" |
| 1076 if os.path.exists(f): | 1082 if os.path.exists(f): |
| 1077 try: | 1083 try: |
| 1078 os.remove(f) | 1084 os.remove(f) |
| 1079 except OSError: | 1085 except OSError: |
| 1080 print 'error deleting %s' % f | 1086 print 'error deleting %s' % f |
| 1081 | 1087 |
| 1082 | 1088 |
| 1083 if __name__ == '__main__': | 1089 if __name__ == '__main__': |
| 1084 sys.exit(main()) | 1090 sys.exit(main()) |
| OLD | NEW |