summaryrefslogtreecommitdiffstats
path: root/third_party/python/gyp/test/intermediate_dir/src
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /third_party/python/gyp/test/intermediate_dir/src
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/python/gyp/test/intermediate_dir/src')
-rwxr-xr-xthird_party/python/gyp/test/intermediate_dir/src/script.py22
-rw-r--r--third_party/python/gyp/test/intermediate_dir/src/shared_infile.txt1
-rw-r--r--third_party/python/gyp/test/intermediate_dir/src/test.gyp42
-rw-r--r--third_party/python/gyp/test/intermediate_dir/src/test2.gyp42
4 files changed, 107 insertions, 0 deletions
diff --git a/third_party/python/gyp/test/intermediate_dir/src/script.py b/third_party/python/gyp/test/intermediate_dir/src/script.py
new file mode 100755
index 0000000000..2eb73ac206
--- /dev/null
+++ b/third_party/python/gyp/test/intermediate_dir/src/script.py
@@ -0,0 +1,22 @@
+#!/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.
+
+# Takes 3 arguments. Writes the 1st argument to the file in the 2nd argument,
+# and writes the absolute path to the file in the 2nd argument to the file in
+# the 3rd argument.
+
+import os
+import shlex
+import sys
+
+if len(sys.argv) == 3 and ' ' in sys.argv[2]:
+ sys.argv[2], fourth = shlex.split(sys.argv[2].replace('\\', '\\\\'))
+ sys.argv.append(fourth)
+
+with open(sys.argv[2], 'w') as f:
+ f.write(sys.argv[1])
+
+with open(sys.argv[3], 'w') as f:
+ f.write(os.path.abspath(sys.argv[2]))
diff --git a/third_party/python/gyp/test/intermediate_dir/src/shared_infile.txt b/third_party/python/gyp/test/intermediate_dir/src/shared_infile.txt
new file mode 100644
index 0000000000..e2aba15d04
--- /dev/null
+++ b/third_party/python/gyp/test/intermediate_dir/src/shared_infile.txt
@@ -0,0 +1 @@
+dummy input
diff --git a/third_party/python/gyp/test/intermediate_dir/src/test.gyp b/third_party/python/gyp/test/intermediate_dir/src/test.gyp
new file mode 100644
index 0000000000..b61e7e8ea5
--- /dev/null
+++ b/third_party/python/gyp/test/intermediate_dir/src/test.gyp
@@ -0,0 +1,42 @@
+# Copyright (c) 2011 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': 'target1',
+ 'type': 'none',
+ 'actions': [
+ {
+ 'action_name': 'intermediate',
+ 'inputs': [],
+ 'outputs': [
+ '<(INTERMEDIATE_DIR)/intermediate_out.txt',
+ 'outfile.txt',
+ ],
+ 'action': [
+ 'python', 'script.py', 'target1', '<(_outputs)',
+ ],
+ # Allows the test to run without hermetic cygwin on windows.
+ 'msvs_cygwin_shell': 0,
+ },
+ {
+ 'action_name': 'shared_intermediate',
+ 'inputs': [
+ 'shared_infile.txt',
+ ],
+ 'outputs': [
+ '<(SHARED_INTERMEDIATE_DIR)/intermediate_out.txt',
+ 'shared_outfile.txt',
+ ],
+ 'action': [
+ 'python', 'script.py', 'shared_target1', '<(_outputs)',
+ ],
+ # Allows the test to run without hermetic cygwin on windows.
+ 'msvs_cygwin_shell': 0,
+ },
+ ],
+ },
+ ],
+}
diff --git a/third_party/python/gyp/test/intermediate_dir/src/test2.gyp b/third_party/python/gyp/test/intermediate_dir/src/test2.gyp
new file mode 100644
index 0000000000..41f5564663
--- /dev/null
+++ b/third_party/python/gyp/test/intermediate_dir/src/test2.gyp
@@ -0,0 +1,42 @@
+# Copyright (c) 2011 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': 'target2',
+ 'type': 'none',
+ 'actions': [
+ {
+ 'action_name': 'intermediate',
+ 'inputs': [],
+ 'outputs': [
+ '<(INTERMEDIATE_DIR)/intermediate_out.txt',
+ 'outfile.txt',
+ ],
+ 'action': [
+ 'python', 'script.py', 'target2', '<(_outputs)',
+ ],
+ # Allows the test to run without hermetic cygwin on windows.
+ 'msvs_cygwin_shell': 0,
+ },
+ {
+ 'action_name': 'shared_intermediate',
+ 'inputs': [
+ 'shared_infile.txt',
+ ],
+ 'outputs': [
+ '<(SHARED_INTERMEDIATE_DIR)/intermediate_out.txt',
+ 'shared_outfile.txt',
+ ],
+ 'action': [
+ 'python', 'script.py', 'shared_target2', '<(_outputs)',
+ ],
+ # Allows the test to run without hermetic cygwin on windows.
+ 'msvs_cygwin_shell': 0,
+ },
+ ],
+ },
+ ],
+}