summaryrefslogtreecommitdiffstats
path: root/third_party/python/gyp/test/win/gyptest-link-delay-load-dlls.py
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/python/gyp/test/win/gyptest-link-delay-load-dlls.py')
-rw-r--r--third_party/python/gyp/test/win/gyptest-link-delay-load-dlls.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/third_party/python/gyp/test/win/gyptest-link-delay-load-dlls.py b/third_party/python/gyp/test/win/gyptest-link-delay-load-dlls.py
new file mode 100644
index 0000000000..3880247b4a
--- /dev/null
+++ b/third_party/python/gyp/test/win/gyptest-link-delay-load-dlls.py
@@ -0,0 +1,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()