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 that when ULDI is on, we link .objs that make up .libs rather than
      9 the .libs themselves.
     10 """
     11 
     12 import TestGyp
     13 
     14 import sys
     15 
     16 if sys.platform == 'win32':
     17   test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
     18 
     19   CHDIR = 'uldi'
     20   test.run_gyp('uldi.gyp', chdir=CHDIR)
     21   # When linking with ULDI, the duplicated function from the lib will be an
     22   # error.
     23   test.build('uldi.gyp', 'final_uldi', chdir=CHDIR, status=1)
     24   # And when in libs, the duplicated function will be silently dropped, so the
     25   # build succeeds.
     26   test.build('uldi.gyp', 'final_no_uldi', chdir=CHDIR)
     27 
     28   test.pass_test()
     29