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

Side by Side Diff: editor/build/build.py

Issue 8896015: Fix error in buildbot dart-editor-linux (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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 | « client/tools/buildbot_annotated_steps.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
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 """Copyright (c) 2011 The Chromium Authors. All rights reserved. 3 """Copyright (c) 2011 The Chromium Authors. All rights reserved.
4 4
5 Use of this source code is governed by a BSD-style license that can be 5 Use of this source code is governed by a BSD-style license that can be
6 found in the LICENSE file. 6 found in the LICENSE file.
7 7
8 Eclipse Dart Editor buildbot steps. 8 Eclipse Dart Editor buildbot steps.
9 """ 9 """
10 10
(...skipping 15 matching lines...) Expand all
26 26
27 def __init__(self, antpath='/usr/bin', bzippath=None): 27 def __init__(self, antpath='/usr/bin', bzippath=None):
28 """Initialize the class with the ant path. 28 """Initialize the class with the ant path.
29 29
30 Args: 30 Args:
31 antpath: the path to ant 31 antpath: the path to ant
32 bzippath: the path to the bzip jar 32 bzippath: the path to the bzip jar
33 """ 33 """
34 self._antpath = antpath 34 self._antpath = antpath
35 self._bzippath = bzippath 35 self._bzippath = bzippath
36 print 'AntWrapper.__init__({0}, {1}'.format(self._antpath, self._bzippath) 36 print 'AntWrapper.__init__({0}, {1})'.format(self._antpath,
37 self._bzippath)
37 38
38 def RunAnt(self, build_dir, antfile, revision, name, 39 def RunAnt(self, build_dir, antfile, revision, name,
39 buildroot, buildout, sourcepath, buildos, 40 buildroot, buildout, sourcepath, buildos,
40 extra_args=None): 41 extra_args=None):
41 """Run the given Ant script from the given directory. 42 """Run the given Ant script from the given directory.
42 43
43 Args: 44 Args:
44 build_dir: the directory to run the ant script from 45 build_dir: the directory to run the ant script from
45 antfile: the ant file to run 46 antfile: the ant file to run
46 revision: the SVN revision of this build 47 revision: the SVN revision of this build
(...skipping 21 matching lines...) Expand all
68 69
69 cwd = os.getcwd() 70 cwd = os.getcwd()
70 os.chdir(build_dir) 71 os.chdir(build_dir)
71 print 'cwd = {0}'.format(os.getcwd()) 72 print 'cwd = {0}'.format(os.getcwd())
72 print 'ant path = {0}'.format(self._antpath) 73 print 'ant path = {0}'.format(self._antpath)
73 # run the ant file given 74 # run the ant file given
74 args = [os_shell, 75 args = [os_shell,
75 os.path.join(self._antpath, ant_exec), 76 os.path.join(self._antpath, ant_exec),
76 '-lib', 77 '-lib',
77 os.path.join(self._bzippath, 'bzip2.jar'), 78 os.path.join(self._bzippath, 'bzip2.jar'),
78 '-f',
79 antfile,
80 '-noinput', 79 '-noinput',
81 '-Dbuild.revision=' + revision, 80 '-nouserlib'
82 '-Dbuild.builder=' + name,
83 '-Dbuild.root=' + buildroot,
84 '-Dbuild.out=' + buildout,
85 '-Dbuild.source=' + sourcepath,
86 '-nouserlib',
87 ] 81 ]
82 if antfile:
83 args.append('-f')
84 args.append(antfile)
85 if revision:
86 args.append('-Dbuild.revision=' + revision)
87 if name:
88 args.append('-Dbuild.builder=' + name)
89 if buildroot:
90 args.append('-Dbuild.root=' + buildroot)
91 if buildout:
92 args.append('-Dbuild.out=' + buildout)
93 if sourcepath:
94 args.append('-Dbuild.source=' + sourcepath)
88 if buildos: 95 if buildos:
89 args.append('-Dbuild.os={0}'.format(buildos)) 96 args.append('-Dbuild.os={0}'.format(buildos))
90 if extra_args: 97 if extra_args:
91 args.extend(extra_args) 98 args.extend(extra_args)
92 99
93 extra_args = os.environ.get('ANT_EXTRA_ARGS') 100 extra_args = os.environ.get('ANT_EXTRA_ARGS')
94 if extra_args is not None: 101 if extra_args is not None:
95 parsed_extra = extra_args.split() 102 parsed_extra = extra_args.split()
96 for arg in parsed_extra: 103 for arg in parsed_extra:
97 args.append(arg) 104 args.append(arg)
98 105
99 print ' '.join(args) 106 print ' '.join(args)
100
101 status = subprocess.call(args) 107 status = subprocess.call(args)
102
103 os.chdir(cwd) 108 os.chdir(cwd)
104 return status 109 return status
105 110
106 111
107 def _BuildOptions(): 112 def _BuildOptions():
108 """Setup the argument processing for this program.""" 113 """Setup the argument processing for this program."""
109 result = optparse.OptionParser() 114 result = optparse.OptionParser()
110 result.set_default('dest', 'gs://dart-editor-archive-continuous') 115 result.set_default('dest', 'gs://dart-editor-archive-continuous')
111 result.add_option('-m', '--mode', 116 result.add_option('-m', '--mode',
112 help='Build variants (comma-separated).', 117 help='Build variants (comma-separated).',
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 515
511 print error_sep 516 print error_sep
512 print error_sep 517 print error_sep
513 print error_text.format(text) 518 print error_text.format(text)
514 print error_sep 519 print error_sep
515 print error_sep 520 print error_sep
516 521
517 522
518 if __name__ == '__main__': 523 if __name__ == '__main__':
519 sys.exit(main()) 524 sys.exit(main())
OLDNEW
« no previous file with comments | « client/tools/buildbot_annotated_steps.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698