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

Side by Side Diff: tools/bots/editor.py

Issue 12450026: Added tools/bots/editor.py to build the editor (using gyp/build.py) and run editor tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/bots/bot.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/python
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
4 # BSD-style license that can be found in the LICENSE file.
5
6 import os
7 import sys
8
9 import bot
10
11 def GetEditorExecutable(mode, arch):
12 configuration_dir = mode + arch.upper()
13 linux_path = os.path.join('out', configuration_dir, 'editor')
14 win_path = os.path.join('build', configuration_dir, 'editor')
15 mac_path = os.path.join('xcodebuild', configuration_dir, 'editor')
16
17 if sys.platform == 'darwin':
18 executable = os.path.join('DartEditor.app', 'Contents', 'MacOS',
19 'DartEditor')
20 # TODO(kustermann,ricow): Maybe we're able to get rid of this in the future.
21 # We use ninja on bots which use out/ instead of xcodebuild/
22 if os.path.exists(linux_path) and os.path.isdir(linux_path):
23 return os.path.join(linux_path, executable)
24 else:
25 return os.path.join(mac_path, executable)
26 elif sys.platform == 'win32':
27 return os.path.join(win_path, 'DartEditor.exe')
28 elif sys.platform == 'linux2':
29 return os.path.join(linux_path, 'DartEditor')
30 else:
31 raise Exception('Unknown platform %s' % sys.platform)
32
33
34 def main():
35 build_py = os.path.join('tools', 'build.py')
36 architectures = ['ia32', 'x64']
37 test_architectures = ['x64']
38
39 for arch in architectures:
40 with bot.BuildStep('Build Editor %s' % arch):
41 args = [sys.executable, build_py,
42 '-mrelease', '--arch=%s' % arch, 'editor']
43 print 'Running: %s' % (' '.join(args))
44 sys.stdout.flush()
45 bot.RunProcess(args)
46
47 for arch in test_architectures:
48 editor_executable = GetEditorExecutable('Release', arch)
49 with bot.BuildStep('Test Editor %s' % arch):
50 args = [editor_executable, '--test', '--auto-exit']
51 print 'Running: %s' % (' '.join(args))
52 sys.stdout.flush()
53 bot.RunProcess(args)
54 return 0
55
56 if __name__ == '__main__':
57 try:
58 sys.exit(main())
59 except OSError as e:
60 sys.exit(e.errno)
OLDNEW
« no previous file with comments | « tools/bots/bot.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698