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

Unified Diff: editor/build/build.py

Issue 19552002: Fix for running the tests on the dart-editor-win bot. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/bots/editor.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/build/build.py
===================================================================
--- editor/build/build.py (revision 25092)
+++ editor/build/build.py (working copy)
@@ -766,23 +766,36 @@
def RunEditorTests(buildout, buildos):
StartBuildStep('run_tests')
- for editorArchive in _FindRcpZipFiles(buildout):
- if (editorArchive.endswith('_64.zip')):
- with utils.TempDir('editor_') as tempDir:
- print 'Running tests for %s...' % editorArchive
+ for editorArchive in _GetTestableRcpArchives(buildout):
+ with utils.TempDir('editor_') as tempDir:
+ print 'Running tests for %s...' % editorArchive
- zipper = ziputils.ZipUtil(join(buildout, editorArchive), buildos)
- zipper.UnZip(tempDir)
+ zipper = ziputils.ZipUtil(join(buildout, editorArchive), buildos)
+ zipper.UnZip(tempDir)
- editorExecutable = GetEditorExecutable(join(tempDir, 'dart'))
- args = [editorExecutable, '-consoleLog', '--test', '--auto-exit',
- '-data', join(tempDir, 'workspace')]
- if sys.platform == 'linux':
- args = ['xvfb-run', '-a'] + args
- if (subprocess.call(args, shell=IsWindows())):
- BuildStepFailure()
+ editorExecutable = GetEditorExecutable(join(tempDir, 'dart'))
+ args = [editorExecutable, '--test', '--auto-exit',
+ '-data', join(tempDir, 'workspace')]
+ if sys.platform == 'linux':
+ args = ['xvfb-run', '-a'] + args
+ # this can hang if a 32 bit jvm is not available on windows...
+ if (subprocess.call(args, shell=IsWindows())):
kustermann 2013/07/17 13:47:06 No need for outermost '(', ')'.
devoncarew 2013/07/17 16:29:49 Done.
+ BuildStepFailure()
+# Return x86_64.zip (64 bit) on mac and linux; x86.zip (32 bit) on windows
+def _GetTestableRcpArchives(buildout):
+ result = []
+
+ for archive in _FindRcpZipFiles(buildout):
+ if IsWindows() and archive.endswith('x86.zip'):
+ result.append(archive)
+ elif not IsWindows() and archive.endswith('x86_64.zip'):
+ result.append(archive)
+
+ return result
+
+
def GetEditorExecutable(editorDir):
if sys.platform == 'darwin':
executable = join('DartEditor.app', 'Contents', 'MacOS', 'DartEditor')
« no previous file with comments | « no previous file | tools/bots/editor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698