OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 |
| 3 # Copyright (c) 2013 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 *_wrapper in make_global_settings. |
| 9 """ |
| 10 |
| 11 import sys |
| 12 import TestGyp |
| 13 |
| 14 test_format = ['ninja'] |
| 15 if sys.platform in ('linux2', 'darwin'): |
| 16 test_format += ['make'] |
| 17 |
| 18 test = TestGyp.TestGyp(formats=test_format) |
| 19 |
| 20 test.run_gyp('wrapper.gyp') |
| 21 |
| 22 if test.format == 'make': |
| 23 cc_expected = """ifneq (,$(filter $(origin CC), undefined default)) |
| 24 CC = $(abspath distcc) $(abspath clang) |
| 25 endif |
| 26 """ |
| 27 link_expected = 'LINK ?= $(abspath distlink) $(abspath clang++)' |
| 28 test.must_contain('Makefile', cc_expected) |
| 29 test.must_contain('Makefile', link_expected) |
| 30 if test.format == 'ninja': |
| 31 cc_expected = 'cc = ../../distcc ../../clang' |
| 32 ld_expected = 'ld = ../../distlink $cxx' |
| 33 test.must_contain('out/Default/build.ninja', cc_expected) |
| 34 test.must_contain('out/Default/build.ninja', ld_expected) |
| 35 |
| 36 test.pass_test() |
OLD | NEW |