blob: 3880247b4ae3a5b8da6abcc3904a42d9555c2756 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Make sure delay load setting is extracted properly.
"""
import TestGyp
import sys
if sys.platform == 'win32':
test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
CHDIR = 'linker-flags'
test.run_gyp('delay-load-dlls.gyp', chdir=CHDIR)
test.build('delay-load-dlls.gyp', test.ALL, chdir=CHDIR)
prefix = 'contains the following delay load imports:'
shell32_look_for = prefix + '\r\n\r\n SHELL32.dll'
output = test.run_dumpbin(
'/all', test.built_file_path('test_dld_none.exe', chdir=CHDIR))
if prefix in output:
test.fail_test()
output = test.run_dumpbin(
'/all', test.built_file_path('test_dld_shell32.exe', chdir=CHDIR))
if shell32_look_for not in output:
test.fail_test()
test.pass_test()
|