Home | History | Annotate | Download | only in mac
      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 OTHER_LDFLAGS is passed to libtool.
      9 """
     10 
     11 import TestGyp
     12 
     13 import sys
     14 
     15 if sys.platform == 'darwin':
     16   test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'],
     17                          match = lambda a, b: True)
     18 
     19   build_error_code = {
     20     'xcode': [1, 65],  # 1 for xcode 3, 65 for xcode 4 (see `man sysexits`)
     21     'make': 2,
     22     'ninja': 1,
     23   }[test.format]
     24 
     25   CHDIR = 'ldflags-libtool'
     26   test.run_gyp('test.gyp', chdir=CHDIR)
     27 
     28   test.build('test.gyp', 'ldflags_passed_to_libtool', chdir=CHDIR,
     29              status=build_error_code)
     30 
     31   test.pass_test()
     32