OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 |
| 3 # Copyright (c) 2012 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 xcode-style GCC_... settings are handled properly. |
| 9 """ |
| 10 |
| 11 import TestGyp |
| 12 |
| 13 import sys |
| 14 |
| 15 def IgnoreOutput(string, expected_string): |
| 16 return True |
| 17 |
| 18 if sys.platform == 'darwin': |
| 19 test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) |
| 20 |
| 21 CHDIR = 'xcode-gcc' |
| 22 test.run_gyp('test.gyp', chdir=CHDIR) |
| 23 |
| 24 # List of targets that'll pass. It expects targets of the same name with |
| 25 # '-fail' appended that'll fail to build. |
| 26 targets = [ |
| 27 'warn_about_invalid_offsetof_macro', |
| 28 'warn_about_missing_newline', |
| 29 ] |
| 30 |
| 31 for target in targets: |
| 32 test.build('test.gyp', target, chdir=CHDIR) |
| 33 test.built_file_must_exist(target, chdir=CHDIR) |
| 34 fail_target = target + '-fail' |
| 35 test.build('test.gyp', fail_target, chdir=CHDIR, status=None, |
| 36 stderr=None, match=IgnoreOutput) |
| 37 test.built_file_must_not_exist(fail_target, chdir=CHDIR) |
| 38 |
| 39 test.pass_test() |
OLD | NEW |