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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/bots/bot.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bots/editor.py
diff --git a/tools/bots/editor.py b/tools/bots/editor.py
new file mode 100755
index 0000000000000000000000000000000000000000..43403da42813caf0c5944f9212257b67c7c7dd0f
--- /dev/null
+++ b/tools/bots/editor.py
@@ -0,0 +1,60 @@
+#!/usr/bin/python
+# Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+import os
+import sys
+
+import bot
+
+def GetEditorExecutable(mode, arch):
+ configuration_dir = mode + arch.upper()
+ linux_path = os.path.join('out', configuration_dir, 'editor')
+ win_path = os.path.join('build', configuration_dir, 'editor')
+ mac_path = os.path.join('xcodebuild', configuration_dir, 'editor')
+
+ if sys.platform == 'darwin':
+ executable = os.path.join('DartEditor.app', 'Contents', 'MacOS',
+ 'DartEditor')
+ # TODO(kustermann,ricow): Maybe we're able to get rid of this in the future.
+ # We use ninja on bots which use out/ instead of xcodebuild/
+ if os.path.exists(linux_path) and os.path.isdir(linux_path):
+ return os.path.join(linux_path, executable)
+ else:
+ return os.path.join(mac_path, executable)
+ elif sys.platform == 'win32':
+ return os.path.join(win_path, 'DartEditor.exe')
+ elif sys.platform == 'linux2':
+ return os.path.join(linux_path, 'DartEditor')
+ else:
+ raise Exception('Unknown platform %s' % sys.platform)
+
+
+def main():
+ build_py = os.path.join('tools', 'build.py')
+ architectures = ['ia32', 'x64']
+ test_architectures = ['x64']
+
+ for arch in architectures:
+ with bot.BuildStep('Build Editor %s' % arch):
+ args = [sys.executable, build_py,
+ '-mrelease', '--arch=%s' % arch, 'editor']
+ print 'Running: %s' % (' '.join(args))
+ sys.stdout.flush()
+ bot.RunProcess(args)
+
+ for arch in test_architectures:
+ editor_executable = GetEditorExecutable('Release', arch)
+ with bot.BuildStep('Test Editor %s' % arch):
+ args = [editor_executable, '--test', '--auto-exit']
+ print 'Running: %s' % (' '.join(args))
+ sys.stdout.flush()
+ bot.RunProcess(args)
+ return 0
+
+if __name__ == '__main__':
+ try:
+ sys.exit(main())
+ except OSError as e:
+ sys.exit(e.errno)
« 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