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

Side by Side Diff: test/make_global_settings/ld/gyptest-make_global_settings_ld.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 'LD' in make_global_settings. 8 Verifies 'LD' in make_global_settings.
9 """ 9 """
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 ld_expected = '$cc_host' 69 ld_expected = '$cc_host'
70 if test.format == 'make': 70 if test.format == 'make':
71 test.must_contain('Makefile', 'LD.host ?= %s' % ld_expected) 71 test.must_contain('Makefile', 'LD.host ?= %s' % ld_expected)
72 elif test.format in ['ninja', 'xcode-ninja']: 72 elif test.format in ['ninja', 'xcode-ninja']:
73 test.must_contain('out/Default/build.ninja', 'ld_host = %s' % ld_expected) 73 test.must_contain('out/Default/build.ninja', 'ld_host = %s' % ld_expected)
74 else: 74 else:
75 test.fail_test() 75 test.fail_test()
76 76
77 77
78 test_format = ['ninja'] 78 test_format = ['ninja']
79 if sys.platform in ('linux2', 'darwin'): 79 if sys.platform.startswith('linux') or sys.platform == 'darwin':
80 test_format += ['make'] 80 test_format += ['make']
81 81
82 test = TestGyp.TestGyp(formats=test_format) 82 test = TestGyp.TestGyp(formats=test_format)
83 83
84 # Check default values 84 # Check default values
85 test.run_gyp('make_global_settings_ld.gyp') 85 test.run_gyp('make_global_settings_ld.gyp')
86 verify_ld_target(test) 86 verify_ld_target(test)
87 87
88 88
89 # Check default values with GYP_CROSSCOMPILE enabled. 89 # Check default values with GYP_CROSSCOMPILE enabled.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 test.run_gyp('make_global_settings_ld.gyp') 121 test.run_gyp('make_global_settings_ld.gyp')
122 if test.format == 'make': 122 if test.format == 'make':
123 test.must_not_contain('Makefile', 'my_ld_target2') 123 test.must_not_contain('Makefile', 'my_ld_target2')
124 test.must_not_contain('Makefile', 'my_ld_host2') 124 test.must_not_contain('Makefile', 'my_ld_host2')
125 elif test.format == 'ninja': 125 elif test.format == 'ninja':
126 test.must_not_contain('out/Default/build.ninja', 'my_ld_target2') 126 test.must_not_contain('out/Default/build.ninja', 'my_ld_target2')
127 test.must_not_contain('out/Default/build.ninja', 'my_ld_host2') 127 test.must_not_contain('out/Default/build.ninja', 'my_ld_host2')
128 128
129 129
130 test.pass_test() 130 test.pass_test()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698