Home | History | Annotate | Download | only in config_attrs
      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 msvs_configuration_attributes and
      9 msbuild_configuration_attributes are applied by using
     10 them to set the OutputDirectory.
     11 """
     12 
     13 import TestGyp
     14 import os
     15 
     16 test = TestGyp.TestGyp(workdir='workarea_all',formats=['msvs'])
     17 
     18 vc_version = 'VC90'
     19 
     20 if os.getenv('GYP_MSVS_VERSION'):
     21   vc_version = ['VC90','VC100'][int(os.getenv('GYP_MSVS_VERSION')) >= 2010]
     22 
     23 expected_exe_file = os.path.join(test.workdir, vc_version, 'hello.exe')
     24 
     25 test.run_gyp('hello.gyp')
     26 
     27 test.build('hello.gyp')
     28 
     29 test.must_exist(expected_exe_file)
     30 
     31 test.pass_test()
     32