OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2010 Google Inc. All rights reserved. | 3 # Copyright (c) 2010 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 build of an executable in three different configurations. | 8 Verifies build of an executable in three different configurations. |
9 """ | 9 """ |
10 | 10 |
11 import TestGyp | 11 import TestGyp |
12 | 12 |
13 # Keys that do not belong inside a configuration dictionary. | 13 # Keys that do not belong inside a configuration dictionary. |
14 invalid_configuration_keys = [ | 14 invalid_configuration_keys = [ |
15 'actions', | 15 'actions', |
16 'all_dependent_settings', | 16 'all_dependent_settings', |
17 'configurations', | 17 'configurations', |
18 'dependencies', | 18 'dependencies', |
19 'direct_dependent_settings', | 19 'direct_dependent_settings', |
20 'libraries', | 20 'libraries', |
21 'link_settings', | 21 'link_settings', |
22 'sources', | 22 'sources', |
23 'standalone_static_library', | 23 'standalone_static_library', |
24 'target_name', | 24 'target_name', |
25 'type', | 25 'type', |
26 ] | 26 ] |
27 | 27 |
28 test = TestGyp.TestGyp() | 28 test = TestGyp.TestGyp() |
29 | 29 |
30 if test.format == 'scons': | |
31 test.skip_test('TODO: http://code.google.com/p/gyp/issues/detail?id=176\n') | |
32 | |
33 for test_key in invalid_configuration_keys: | 30 for test_key in invalid_configuration_keys: |
34 test.run_gyp('%s.gyp' % test_key, status=1, stderr=None) | 31 test.run_gyp('%s.gyp' % test_key, status=1, stderr=None) |
35 expect = ['%s not allowed in the Debug configuration, found in target ' | 32 expect = ['%s not allowed in the Debug configuration, found in target ' |
36 '%s.gyp:configurations#target' % (test_key, test_key)] | 33 '%s.gyp:configurations#target' % (test_key, test_key)] |
37 test.must_contain_all_lines(test.stderr(), expect) | 34 test.must_contain_all_lines(test.stderr(), expect) |
38 | 35 |
39 test.pass_test() | 36 test.pass_test() |
OLD | NEW |