summaryrefslogtreecommitdiff
path: root/deps/gyp/test/configurations/x64
diff options
context:
space:
mode:
Diffstat (limited to 'deps/gyp/test/configurations/x64')
-rw-r--r--deps/gyp/test/configurations/x64/configurations.c12
-rw-r--r--deps/gyp/test/configurations/x64/configurations.gyp38
-rwxr-xr-xdeps/gyp/test/configurations/x64/gyptest-x86.py31
3 files changed, 81 insertions, 0 deletions
diff --git a/deps/gyp/test/configurations/x64/configurations.c b/deps/gyp/test/configurations/x64/configurations.c
new file mode 100644
index 0000000000..37018438fc
--- /dev/null
+++ b/deps/gyp/test/configurations/x64/configurations.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+
+int main(void) {
+ if (sizeof(void*) == 4) {
+ printf("Running Win32\n");
+ } else if (sizeof(void*) == 8) {
+ printf("Running x64\n");
+ } else {
+ printf("Unexpected platform\n");
+ }
+ return 0;
+}
diff --git a/deps/gyp/test/configurations/x64/configurations.gyp b/deps/gyp/test/configurations/x64/configurations.gyp
new file mode 100644
index 0000000000..8b0139f141
--- /dev/null
+++ b/deps/gyp/test/configurations/x64/configurations.gyp
@@ -0,0 +1,38 @@
+# Copyright (c) 2009 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.
+
+{
+ 'target_defaults': {
+ 'configurations': {
+ 'Debug': {
+ 'msvs_configuration_platform': 'Win32',
+ },
+ 'Debug_x64': {
+ 'inherit_from': ['Debug'],
+ 'msvs_configuration_platform': 'x64',
+ },
+ },
+ },
+ 'targets': [
+ {
+ 'target_name': 'configurations',
+ 'type': 'executable',
+ 'sources': [
+ 'configurations.c',
+ ],
+ },
+ {
+ 'target_name': 'configurations64',
+ 'type': 'executable',
+ 'sources': [
+ 'configurations.c',
+ ],
+ 'configurations': {
+ 'Debug': {
+ 'msvs_target_platform': 'x64',
+ },
+ },
+ },
+ ],
+}
diff --git a/deps/gyp/test/configurations/x64/gyptest-x86.py b/deps/gyp/test/configurations/x64/gyptest-x86.py
new file mode 100755
index 0000000000..8675d8f7e7
--- /dev/null
+++ b/deps/gyp/test/configurations/x64/gyptest-x86.py
@@ -0,0 +1,31 @@
+#!/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.
+
+"""
+Verifies build of an executable in three different configurations.
+"""
+
+import TestGyp
+
+import sys
+
+formats = ['msvs']
+if sys.platform == 'win32':
+ formats += ['ninja']
+test = TestGyp.TestGyp(formats=formats)
+
+test.run_gyp('configurations.gyp')
+test.set_configuration('Debug|Win32')
+test.build('configurations.gyp', test.ALL)
+
+for machine, suffix in [('14C machine (x86)', ''),
+ ('8664 machine (x64)', '64')]:
+ output = test.run_dumpbin(
+ '/headers', test.built_file_path('configurations%s.exe' % suffix))
+ if machine not in output:
+ test.fail_test()
+
+test.pass_test()