summaryrefslogtreecommitdiffstats
path: root/media/webrtc/trunk/tools/gyp/test/msvs/config_attrs
diff options
context:
space:
mode:
Diffstat (limited to 'media/webrtc/trunk/tools/gyp/test/msvs/config_attrs')
-rw-r--r--media/webrtc/trunk/tools/gyp/test/msvs/config_attrs/gyptest-config_attrs.py39
-rw-r--r--media/webrtc/trunk/tools/gyp/test/msvs/config_attrs/hello.c11
-rw-r--r--media/webrtc/trunk/tools/gyp/test/msvs/config_attrs/hello.gyp21
3 files changed, 71 insertions, 0 deletions
diff --git a/media/webrtc/trunk/tools/gyp/test/msvs/config_attrs/gyptest-config_attrs.py b/media/webrtc/trunk/tools/gyp/test/msvs/config_attrs/gyptest-config_attrs.py
new file mode 100644
index 000000000..d5603744d
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/msvs/config_attrs/gyptest-config_attrs.py
@@ -0,0 +1,39 @@
+#!/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 that msvs_configuration_attributes and
+msbuild_configuration_attributes are applied by using
+them to set the OutputDirectory.
+"""
+
+import TestGyp
+import os
+
+import sys
+
+if sys.platform == 'win32':
+ print "This test is currently disabled: https://crbug.com/483696."
+ sys.exit(0)
+
+
+
+test = TestGyp.TestGyp(workdir='workarea_all',formats=['msvs'])
+
+vc_version = 'VC90'
+
+if os.getenv('GYP_MSVS_VERSION'):
+ vc_version = ['VC90','VC100'][int(os.getenv('GYP_MSVS_VERSION')) >= 2010]
+
+expected_exe_file = os.path.join(test.workdir, vc_version, 'hello.exe')
+
+test.run_gyp('hello.gyp')
+
+test.build('hello.gyp')
+
+test.must_exist(expected_exe_file)
+
+test.pass_test()
diff --git a/media/webrtc/trunk/tools/gyp/test/msvs/config_attrs/hello.c b/media/webrtc/trunk/tools/gyp/test/msvs/config_attrs/hello.c
new file mode 100644
index 000000000..faadc75e2
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/msvs/config_attrs/hello.c
@@ -0,0 +1,11 @@
+/* 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. */
+
+#include <stdio.h>
+
+int main(void)
+{
+ printf("Hello, world!\n");
+ return 0;
+}
diff --git a/media/webrtc/trunk/tools/gyp/test/msvs/config_attrs/hello.gyp b/media/webrtc/trunk/tools/gyp/test/msvs/config_attrs/hello.gyp
new file mode 100644
index 000000000..810a80edd
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/msvs/config_attrs/hello.gyp
@@ -0,0 +1,21 @@
+# 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.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'hello',
+ 'type': 'executable',
+ 'sources': [
+ 'hello.c',
+ ],
+ 'msvs_configuration_attributes': {
+ 'OutputDirectory':'$(SolutionDir)VC90/'
+ },
+ 'msbuild_configuration_attributes': {
+ 'OutputDirectory':'$(SolutionDir)VC100/',
+ },
+ },
+ ],
+}