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

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

Issue 19152002: Run bots/editor.py commands in xvfb-run to make ensure a valid DISPLAY (Closed) Base URL: https://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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | 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
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 shutil 8 import shutil
9 import sys 9 import sys
10 import tempfile 10 import tempfile
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 'DartEditor') 57 'DartEditor')
58 elif sys.platform == 'win32': 58 elif sys.platform == 'win32':
59 executable = 'DartEditor.exe' 59 executable = 'DartEditor.exe'
60 elif sys.platform == 'linux2': 60 elif sys.platform == 'linux2':
61 executable = 'DartEditor' 61 executable = 'DartEditor'
62 else: 62 else:
63 raise Exception('Unknown platform %s' % sys.platform) 63 raise Exception('Unknown platform %s' % sys.platform)
64 return os.path.join(editor_dir, executable) 64 return os.path.join(editor_dir, executable)
65 65
66 def RunProcess(args): 66 def RunProcess(args):
67 if sys.platform == 'linux':
68 args = ['xvfb-run', '-a'] + args
67 print 'Running: %s' % (' '.join(args)) 69 print 'Running: %s' % (' '.join(args))
68 sys.stdout.flush() 70 sys.stdout.flush()
69 bot.RunProcess(args) 71 bot.RunProcess(args)
70 72
71 def DownloadDartium(temp_dir, zip_file): 73 def DownloadDartium(temp_dir, zip_file):
72 """Returns the filename of the unpacked archive""" 74 """Returns the filename of the unpacked archive"""
73 local_path = os.path.join(temp_dir, zip_file) 75 local_path = os.path.join(temp_dir, zip_file)
74 uri = "%s/%s" % (GCS_DARTIUM_BUCKET, zip_file) 76 uri = "%s/%s" % (GCS_DARTIUM_BUCKET, zip_file)
75 RunProcess([GSUTIL, 'cp', uri, local_path]) 77 RunProcess([GSUTIL, 'cp', uri, local_path])
76 RunProcess(['unzip', local_path, '-d', temp_dir]) 78 RunProcess(['unzip', local_path, '-d', temp_dir])
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 else: 147 else:
146 print ("We currently don't build installers for sys.platform=%s" 148 print ("We currently don't build installers for sys.platform=%s"
147 % sys.platform) 149 % sys.platform)
148 return 0 150 return 0
149 151
150 if __name__ == '__main__': 152 if __name__ == '__main__':
151 try: 153 try:
152 sys.exit(main()) 154 sys.exit(main())
153 except OSError as e: 155 except OSError as e:
154 sys.exit(e.errno) 156 sys.exit(e.errno)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698