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