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

Side by Side Diff: test/make_global_settings/ar/gyptest-make_global_settings_ar.py

Issue 321843002: Teach Ninja generator about 'AR' in 'make_global_settings' (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Rebase Created 6 years, 6 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 | « pylib/gyp/generator/ninja.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/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2014 Google Inc. All rights reserved. 3 # Copyright (c) 2014 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 """ 7 """
8 Verifies 'AR' in make_global_settings. 8 Verifies 'AR' in make_global_settings.
9 """ 9 """
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 test = TestGyp.TestGyp(formats=test_format) 79 test = TestGyp.TestGyp(formats=test_format)
80 80
81 # Check default values 81 # Check default values
82 test.run_gyp('make_global_settings_ar.gyp') 82 test.run_gyp('make_global_settings_ar.gyp')
83 verify_ar_target(test) 83 verify_ar_target(test)
84 84
85 85
86 # Test 'AR' in 'make_global_settings'. 86 # Test 'AR' in 'make_global_settings'.
87 test.run_gyp('make_global_settings_ar.gyp', '-Dcustom_ar_target=my_ar') 87 test.run_gyp('make_global_settings_ar.gyp', '-Dcustom_ar_target=my_ar')
88 # TODO(yukawa): Support 'AR' in Ninja generator 88 verify_ar_target(test, ar='my_ar', rel_path=True)
89 if test.format == 'make':
90 verify_ar_target(test, ar='my_ar', rel_path=True)
91 89
92 90
93 # Test 'AR'/'AR.host' in 'make_global_settings'. 91 # Test 'AR'/'AR.host' in 'make_global_settings'.
94 test.run_gyp('make_global_settings_ar.gyp', 92 test.run_gyp('make_global_settings_ar.gyp',
95 '-Dcustom_ar_target=my_ar_target1', 93 '-Dcustom_ar_target=my_ar_target1',
96 '-Dcustom_ar_host=my_ar_host1') 94 '-Dcustom_ar_host=my_ar_host1')
97 # TODO(yukawa): Support 'AR'/'AR.host' in Ninja generator 95 verify_ar_target(test, ar='my_ar_target1', rel_path=True)
96 # TODO(yukawa): Support 'AR.host' in Ninja generator
98 if test.format == 'make': 97 if test.format == 'make':
99 verify_ar_target(test, ar='my_ar_target1', rel_path=True)
100 verify_ar_host(test, ar='my_ar_host1', rel_path=True) 98 verify_ar_host(test, ar='my_ar_host1', rel_path=True)
101 99
102 100
103 # Test $AR and $AR_host environment variables. 101 # Test $AR and $AR_host environment variables.
104 with TestGyp.LocalEnv({'AR': 'my_ar_target2', 102 with TestGyp.LocalEnv({'AR': 'my_ar_target2',
105 'AR_host': 'my_ar_host2'}): 103 'AR_host': 'my_ar_host2'}):
106 test.run_gyp('make_global_settings_ar.gyp') 104 test.run_gyp('make_global_settings_ar.gyp')
107 # Ninja generator resolves $AR in gyp phase. Make generator doesn't. 105 # Ninja generator resolves $AR in gyp phase. Make generator doesn't.
108 if test.format == 'ninja': 106 if test.format == 'ninja':
109 if sys.platform == 'win32': 107 if sys.platform == 'win32':
110 # TODO(yukawa): Make sure if this is an expected result or not. 108 # TODO(yukawa): Make sure if this is an expected result or not.
111 verify_ar_target(test, ar='lib.exe', rel_path=False) 109 verify_ar_target(test, ar='lib.exe', rel_path=False)
112 else: 110 else:
113 verify_ar_target(test, ar='my_ar_target2', rel_path=False) 111 verify_ar_target(test, ar='my_ar_target2', rel_path=False)
114 verify_ar_host(test, ar='my_ar_host2', rel_path=False) 112 verify_ar_host(test, ar='my_ar_host2', rel_path=False)
115 113
116 114
117 # Test 'AR' in 'make_global_settings' with $AR_host environment variable. 115 # Test 'AR' in 'make_global_settings' with $AR_host environment variable.
118 with TestGyp.LocalEnv({'AR_host': 'my_ar_host3'}): 116 with TestGyp.LocalEnv({'AR_host': 'my_ar_host3'}):
119 test.run_gyp('make_global_settings_ar.gyp', 117 test.run_gyp('make_global_settings_ar.gyp',
120 '-Dcustom_ar_target=my_ar_target3') 118 '-Dcustom_ar_target=my_ar_target3')
121 # TODO(yukawa): Support 'AR' in Ninja generator 119 verify_ar_target(test, ar='my_ar_target3', rel_path=True)
122 if test.format == 'make':
123 verify_ar_target(test, ar='my_ar_target3', rel_path=True)
124 verify_ar_host(test, ar='my_ar_host3', rel_path=False) 120 verify_ar_host(test, ar='my_ar_host3', rel_path=False)
125 121
126 122
127 test.pass_test() 123 test.pass_test()
OLDNEW
« no previous file with comments | « pylib/gyp/generator/ninja.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698