summaryrefslogtreecommitdiffstats
path: root/third_party/python/gyp/test/actions-none/src
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/python/gyp/test/actions-none/src')
-rw-r--r--third_party/python/gyp/test/actions-none/src/fake_cross.py12
-rw-r--r--third_party/python/gyp/test/actions-none/src/foo.cc1
-rw-r--r--third_party/python/gyp/test/actions-none/src/none_with_source_files.gyp35
3 files changed, 48 insertions, 0 deletions
diff --git a/third_party/python/gyp/test/actions-none/src/fake_cross.py b/third_party/python/gyp/test/actions-none/src/fake_cross.py
new file mode 100644
index 0000000000..a03ea87fc9
--- /dev/null
+++ b/third_party/python/gyp/test/actions-none/src/fake_cross.py
@@ -0,0 +1,12 @@
+#!/usr/bin/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.
+
+
+import sys
+
+fh = open(sys.argv[-1], 'w')
+for filename in sys.argv[1:-1]:
+ fh.write(open(filename).read())
+fh.close()
diff --git a/third_party/python/gyp/test/actions-none/src/foo.cc b/third_party/python/gyp/test/actions-none/src/foo.cc
new file mode 100644
index 0000000000..c6c61745ba
--- /dev/null
+++ b/third_party/python/gyp/test/actions-none/src/foo.cc
@@ -0,0 +1 @@
+foo.cc
diff --git a/third_party/python/gyp/test/actions-none/src/none_with_source_files.gyp b/third_party/python/gyp/test/actions-none/src/none_with_source_files.gyp
new file mode 100644
index 0000000000..e2aaebc10a
--- /dev/null
+++ b/third_party/python/gyp/test/actions-none/src/none_with_source_files.gyp
@@ -0,0 +1,35 @@
+# 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.
+
+# Test that 'none' type targets can have .cc files in them.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'none_with_sources',
+ 'type': 'none',
+ 'msvs_cygwin_shell': 0,
+ 'sources': [
+ 'foo.cc',
+ ],
+ 'actions': [
+ {
+ 'action_name': 'fake_cross',
+ 'inputs': [
+ 'fake_cross.py',
+ '<@(_sources)',
+ ],
+ 'outputs': [
+ '<(PRODUCT_DIR)/fake.out',
+ ],
+ 'action': [
+ 'python', '<@(_inputs)', '<@(_outputs)',
+ ],
+ # Allows the test to run without hermetic cygwin on windows.
+ 'msvs_cygwin_shell': 0,
+ }
+ ],
+ },
+ ],
+}