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.
8 Verifies that xcode-style GCC_... settings are handled properly.
15 def IgnoreOutput(string
, expected_string
):
18 if sys
.platform
== 'darwin':
19 test
= TestGyp
.TestGyp(formats
=['ninja', 'make', 'xcode'])
22 test
.run_gyp('test.gyp', chdir
=CHDIR
)
24 # List of targets that'll pass. It expects targets of the same name with
25 # '-fail' appended that'll fail to build.
27 'warn_about_invalid_offsetof_macro',
28 'warn_about_missing_newline',
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
)