gyptest-cl-pdbname.py 861 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python
  2. # Copyright (c) 2013 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 pdb is named as expected (shared between .cc files).
  7. """
  8. import TestGyp
  9. import sys
  10. if sys.platform == 'win32':
  11. test = TestGyp.TestGyp(formats=['ninja'])
  12. CHDIR = 'compiler-flags'
  13. test.run_gyp('pdbname.gyp', chdir=CHDIR)
  14. test.build('pdbname.gyp', test.ALL, chdir=CHDIR)
  15. # Confirm that the default behaviour is to name the .pdb per-target (rather
  16. # than per .cc file).
  17. test.built_file_must_exist('obj/test_pdbname.cc.pdb', chdir=CHDIR)
  18. # Confirm that there should be a .pdb alongside the executable.
  19. test.built_file_must_exist('test_pdbname.exe', chdir=CHDIR)
  20. test.built_file_must_exist('test_pdbname.exe.pdb', chdir=CHDIR)
  21. test.pass_test()