blob: 27245f7ec85ca5be7ee6c96fbb2ea7621f66916c [file] [log] [blame]
Ben Murdoch097c5b22016-05-18 11:27:45 +01001#!/usr/bin/env python
2
3# Copyright (c) 2014 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"""
8Ensure that ninja includes the .pdb as an output file from linking.
9"""
10
11import TestGyp
12
13import os
14import sys
15
16if sys.platform == 'win32':
17 test = TestGyp.TestGyp(formats=['ninja'])
18 CHDIR = 'linker-flags'
19 test.run_gyp('pdb-output.gyp', chdir=CHDIR)
20 # Note, building the pdbs rather than ALL or gyp target.
21 test.build('pdb-output.gyp', 'output_exe.pdb', chdir=CHDIR)
22 test.build('pdb-output.gyp', 'output_dll.pdb', chdir=CHDIR)
23
24 def FindFile(pdb):
25 full_path = test.built_file_path(pdb, chdir=CHDIR)
26 return os.path.isfile(full_path)
27
28 if not FindFile('output_exe.pdb'):
29 test.fail_test()
30 if not FindFile('output_dll.pdb'):
31 test.fail_test()
32
33 test.pass_test()