Home | History | Annotate | Download | only in win
      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 Make sure libpath is extracted properly.
      9 """
     10 
     11 import TestGyp
     12 
     13 import sys
     14 
     15 if sys.platform == 'win32':
     16   test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
     17 
     18   CHDIR = 'linker-flags'
     19 
     20   # Build subdirectory library.
     21   test.run_gyp('subdir/library.gyp', chdir=CHDIR)
     22   test.build('subdir/library.gyp', test.ALL, chdir=CHDIR)
     23 
     24   # And then try to link the main project against the library using only
     25   # LIBPATH to find it.
     26   test.run_gyp('library-directories.gyp', chdir=CHDIR)
     27 
     28   # Without additional paths specified, should fail.
     29   test.build('library-directories.gyp', 'test_libdirs_none', chdir=CHDIR,
     30       status=1)
     31 
     32   # With the additional library directory, should pass.
     33   test.build('library-directories.gyp', 'test_libdirs_with', chdir=CHDIR)
     34 
     35   test.pass_test()
     36