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

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

Issue 1454433002: Python 3 compatibility Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Rebase with master (4ec6c4e3a94bd04a6da2858163d40b2429b8aad1) Created 4 years, 8 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
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 ar_expected = 'ar' 62 ar_expected = 'ar'
63 if test.format == 'make': 63 if test.format == 'make':
64 test.must_contain('Makefile', 'AR.host ?= %s' % ar_expected) 64 test.must_contain('Makefile', 'AR.host ?= %s' % ar_expected)
65 elif test.format in ['ninja', 'xcode-ninja']: 65 elif test.format in ['ninja', 'xcode-ninja']:
66 test.must_contain('out/Default/build.ninja', 'ar_host = %s' % ar_expected) 66 test.must_contain('out/Default/build.ninja', 'ar_host = %s' % ar_expected)
67 else: 67 else:
68 test.fail_test() 68 test.fail_test()
69 69
70 70
71 test_format = ['ninja'] 71 test_format = ['ninja']
72 if sys.platform in ('linux2', 'darwin'): 72 if sys.platform.startswith('linux') or sys.platform == 'darwin':
73 test_format += ['make'] 73 test_format += ['make']
74 74
75 test = TestGyp.TestGyp(formats=test_format) 75 test = TestGyp.TestGyp(formats=test_format)
76 76
77 # Check default values 77 # Check default values
78 test.run_gyp('make_global_settings_ar.gyp') 78 test.run_gyp('make_global_settings_ar.gyp')
79 verify_ar_target(test) 79 verify_ar_target(test)
80 80
81 81
82 # Check default values with GYP_CROSSCOMPILE enabled. 82 # Check default values with GYP_CROSSCOMPILE enabled.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 # Test 'AR' in 'make_global_settings' with $AR_host environment variable. 118 # Test 'AR' in 'make_global_settings' with $AR_host environment variable.
119 with TestGyp.LocalEnv({'AR_host': 'my_ar_host3'}): 119 with TestGyp.LocalEnv({'AR_host': 'my_ar_host3'}):
120 test.run_gyp('make_global_settings_ar.gyp', 120 test.run_gyp('make_global_settings_ar.gyp',
121 '-Dcustom_ar_target=my_ar_target3') 121 '-Dcustom_ar_target=my_ar_target3')
122 verify_ar_target(test, ar='my_ar_target3', rel_path=True) 122 verify_ar_target(test, ar='my_ar_target3', rel_path=True)
123 verify_ar_host(test, ar='my_ar_host3', rel_path=False) 123 verify_ar_host(test, ar='my_ar_host3', rel_path=False)
124 124
125 125
126 test.pass_test() 126 test.pass_test()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698