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

Unified Diff: test/lib/TestGyp.py

Issue 10830232: Add msvs version option to gyptest. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 4 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 | « gyptest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/lib/TestGyp.py
===================================================================
--- test/lib/TestGyp.py (revision 1464)
+++ test/lib/TestGyp.py (working copy)
@@ -82,6 +82,7 @@
def __init__(self, gyp=None, *args, **kw):
self.origin_cwd = os.path.abspath(os.path.dirname(sys.argv[0]))
+ self.extra_args = sys.argv[1:]
if not gyp:
gyp = os.environ.get('TESTGYP_GYP')
@@ -244,8 +245,10 @@
# TODO: --depth=. works around Chromium-specific tree climbing.
depth = kw.pop('depth', '.')
- args = ('--depth='+depth, '--format='+self.format, gyp_file) + args
- return self.run(program=self.gyp, arguments=args, **kw)
+ run_args = ['--depth='+depth, '--format='+self.format, gyp_file]
+ run_args.extend(self.extra_args)
+ run_args.extend(args)
+ return self.run(program=self.gyp, arguments=run_args, **kw)
def run(self, *args, **kw):
"""
@@ -615,7 +618,12 @@
'2010': r'Microsoft Visual Studio 10.0\Common7\IDE\devenv.com',
'2008': r'Microsoft Visual Studio 9.0\Common7\IDE\devenv.com',
'2005': r'Microsoft Visual Studio 8\Common7\IDE\devenv.com'}
- msvs_version = os.environ.get('GYP_MSVS_VERSION', 'auto')
+
+ msvs_version = 'auto'
+ for flag in (f for f in sys.argv if f.startswith('msvs_version=')):
+ msvs_version = flag.split('=')[-1]
+ msvs_version = os.environ.get('GYP_MSVS_VERSION', msvs_version)
+
build_tool = None
if msvs_version in possible_paths:
# Check that the path to the specified GYP_MSVS_VERSION exists.
« no previous file with comments | « gyptest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698