gyptest-link-uldi.py 777 B

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