summaryrefslogtreecommitdiffstats
path: root/third_party/python/gyp/test/variables/variable-in-path
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/python/gyp/test/variables/variable-in-path')
-rw-r--r--third_party/python/gyp/test/variables/variable-in-path/C1/hello.cc7
-rw-r--r--third_party/python/gyp/test/variables/variable-in-path/gyptest-variable-in-path.py23
-rw-r--r--third_party/python/gyp/test/variables/variable-in-path/variable-in-path.gyp31
3 files changed, 61 insertions, 0 deletions
diff --git a/third_party/python/gyp/test/variables/variable-in-path/C1/hello.cc b/third_party/python/gyp/test/variables/variable-in-path/C1/hello.cc
new file mode 100644
index 0000000000..1711567ef5
--- /dev/null
+++ b/third_party/python/gyp/test/variables/variable-in-path/C1/hello.cc
@@ -0,0 +1,7 @@
+// 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.
+
+int main() {
+ return 0;
+}
diff --git a/third_party/python/gyp/test/variables/variable-in-path/gyptest-variable-in-path.py b/third_party/python/gyp/test/variables/variable-in-path/gyptest-variable-in-path.py
new file mode 100644
index 0000000000..b73a279da7
--- /dev/null
+++ b/third_party/python/gyp/test/variables/variable-in-path/gyptest-variable-in-path.py
@@ -0,0 +1,23 @@
+#!/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 <(CONFIGURATION_NAME) variable is correctly expanded.
+"""
+
+import TestGyp
+
+import sys
+
+test = TestGyp.TestGyp()
+test.set_configuration('C1')
+
+test.run_gyp('variable-in-path.gyp')
+test.build('variable-in-path.gyp', 'hello1')
+test.build('variable-in-path.gyp', 'hello2')
+
+
+test.pass_test()
diff --git a/third_party/python/gyp/test/variables/variable-in-path/variable-in-path.gyp b/third_party/python/gyp/test/variables/variable-in-path/variable-in-path.gyp
new file mode 100644
index 0000000000..908d21eb66
--- /dev/null
+++ b/third_party/python/gyp/test/variables/variable-in-path/variable-in-path.gyp
@@ -0,0 +1,31 @@
+# Copyright (c) 2010 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': 'hello1',
+ 'type': 'executable',
+ 'sources': [
+ '<(CONFIGURATION_NAME)/hello.cc',
+ ],
+ },
+ {
+ 'target_name': 'hello2',
+ 'type': 'executable',
+ 'sources': [
+ './<(CONFIGURATION_NAME)/hello.cc',
+ ],
+ },
+ ],
+ 'target_defaults': {
+ 'default_configuration': 'C1',
+ 'configurations': {
+ 'C1': {
+ },
+ 'C2': {
+ },
+ },
+ },
+}