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

Side by Side Diff: gyptest.py

Issue 10909158: Add support for building targets directly from gyp. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: fix nits Created 8 years, 3 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 | pylib/gyp/MSVSVersion.py » ('j') | 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/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2012 Google Inc. All rights reserved. 3 # Copyright (c) 2012 Google Inc. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 __doc__ = """ 7 __doc__ = """
8 gyptest.py -- test runner for GYP tests. 8 gyptest.py -- test runner for GYP tests.
9 """ 9 """
10 10
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 parser.add_option("--path", action="append", default=[], 164 parser.add_option("--path", action="append", default=[],
165 help="additional $PATH directory") 165 help="additional $PATH directory")
166 parser.add_option("-q", "--quiet", action="store_true", 166 parser.add_option("-q", "--quiet", action="store_true",
167 help="quiet, don't print test command lines") 167 help="quiet, don't print test command lines")
168 opts, args = parser.parse_args(argv[1:]) 168 opts, args = parser.parse_args(argv[1:])
169 169
170 if opts.chdir: 170 if opts.chdir:
171 os.chdir(opts.chdir) 171 os.chdir(opts.chdir)
172 172
173 if opts.path: 173 if opts.path:
174 os.environ['PATH'] += ':' + ':'.join(opts.path) 174 extra_path = [os.path.abspath(p) for p in opts.path]
175 extra_path = os.pathsep.join(extra_path)
176 os.environ['PATH'] += os.pathsep + extra_path
175 177
176 if not args: 178 if not args:
177 if not opts.all: 179 if not opts.all:
178 sys.stderr.write('Specify -a to get all tests.\n') 180 sys.stderr.write('Specify -a to get all tests.\n')
179 return 1 181 return 1
180 args = ['test'] 182 args = ['test']
181 183
182 tests = [] 184 tests = []
183 for arg in args: 185 for arg in args:
184 if os.path.isdir(arg): 186 if os.path.isdir(arg):
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 report("No result from", no_result) 257 report("No result from", no_result)
256 258
257 if failed: 259 if failed:
258 return 1 260 return 1
259 else: 261 else:
260 return 0 262 return 0
261 263
262 264
263 if __name__ == "__main__": 265 if __name__ == "__main__":
264 sys.exit(main()) 266 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | pylib/gyp/MSVSVersion.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698