gyptest-link-debug-info.py 701 B

1234567891011121314151617181920212223242526
  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 debug info setting is extracted properly.
  7. """
  8. import TestGyp
  9. import sys
  10. if sys.platform == 'win32':
  11. test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
  12. CHDIR = 'linker-flags'
  13. test.run_gyp('debug-info.gyp', chdir=CHDIR)
  14. test.build('debug-info.gyp', test.ALL, chdir=CHDIR)
  15. suffix = '.exe.pdb' if test.format == 'ninja' else '.pdb'
  16. test.built_file_must_not_exist('test_debug_off%s' % suffix, chdir=CHDIR)
  17. test.built_file_must_exist('test_debug_on%s' % suffix, chdir=CHDIR)
  18. test.pass_test()