gyptest-ldflags-passed-to-libtool.py 752 B

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/env python
  2. # Copyright (c) 2012 Google Inc. All rights reserved.
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. """
  6. Verifies that OTHER_LDFLAGS is passed to libtool.
  7. """
  8. import TestGyp
  9. import sys
  10. if sys.platform == 'darwin':
  11. test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'],
  12. match = lambda a, b: True)
  13. build_error_code = {
  14. 'xcode': [1, 65], # 1 for xcode 3, 65 for xcode 4 (see `man sysexits`)
  15. 'make': 2,
  16. 'ninja': 1,
  17. }[test.format]
  18. CHDIR = 'ldflags-libtool'
  19. test.run_gyp('test.gyp', chdir=CHDIR)
  20. test.build('test.gyp', 'ldflags_passed_to_libtool', chdir=CHDIR,
  21. status=build_error_code)
  22. test.pass_test()