From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../python/gyp/test/intermediate_dir/src/script.py | 22 ++++++++++++ .../test/intermediate_dir/src/shared_infile.txt | 1 + .../python/gyp/test/intermediate_dir/src/test.gyp | 42 ++++++++++++++++++++++ .../python/gyp/test/intermediate_dir/src/test2.gyp | 42 ++++++++++++++++++++++ 4 files changed, 107 insertions(+) create mode 100755 third_party/python/gyp/test/intermediate_dir/src/script.py create mode 100644 third_party/python/gyp/test/intermediate_dir/src/shared_infile.txt create mode 100644 third_party/python/gyp/test/intermediate_dir/src/test.gyp create mode 100644 third_party/python/gyp/test/intermediate_dir/src/test2.gyp (limited to 'third_party/python/gyp/test/intermediate_dir/src') 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, + }, + ], + }, + ], +} -- cgit v1.2.3