OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 |
| 3 # Copyright (c) 2009 Google Inc. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. |
| 6 |
| 7 """ |
| 8 Verifies that the user can override the compiler and linker using LD_target |
| 9 and CC_target. |
| 10 """ |
| 11 |
| 12 import TestGyp |
| 13 import os |
| 14 |
| 15 here = os.path.dirname(os.path.abspath(__file__)) |
| 16 |
| 17 test = TestGyp.TestGyp(formats=['ninja', 'make']) |
| 18 |
| 19 os.environ['CC_target'] = "%s/my_cc.py" % here |
| 20 os.environ['CXX_target'] = "%s/my_cxx.py" % here |
| 21 os.environ['LINK_target'] = "%s/my_ld.py" % here |
| 22 |
| 23 test.run_gyp('compiler.gyp') |
| 24 |
| 25 test.build('compiler.gyp') |
| 26 |
| 27 # We can't test to presence of my_ld.py in the output since |
| 28 # ninja will use CXX_target as the linker regardless |
| 29 test.must_contain_all_lines(test.stdout(), ['my_cc.py', 'my_cxx.py']) |
| 30 |
| 31 test.pass_test() |
OLD | NEW |