Home | History | Annotate | Download | only in invalid
      1 #!/usr/bin/env python
      2 
      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
      5 # found in the LICENSE file.
      6 
      7 """
      8 Verifies build of an executable in three different configurations.
      9 """
     10 
     11 import TestGyp
     12 
     13 # Keys that do not belong inside a configuration dictionary.
     14 invalid_configuration_keys = [
     15   'actions',
     16   'all_dependent_settings',
     17   'configurations',
     18   'dependencies',
     19   'direct_dependent_settings',
     20   'libraries',
     21   'link_settings',
     22   'sources',
     23   'standalone_static_library',
     24   'target_name',
     25   'type',
     26 ]
     27 
     28 test = TestGyp.TestGyp()
     29 
     30 for test_key in invalid_configuration_keys:
     31   test.run_gyp('%s.gyp' % test_key, status=1, stderr=None)
     32   expect = ['%s not allowed in the Debug configuration, found in target '
     33             '%s.gyp:configurations#target' % (test_key, test_key)]
     34   test.must_contain_all_lines(test.stderr(), expect)
     35 
     36 test.pass_test()
     37