| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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() |
| OLD | NEW |