diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /third_party/python/gyp/test/variables/commands/commands.gyp | |
parent | Initial commit. (diff) | |
download | firefox-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 '')
5 files changed, 372 insertions, 0 deletions
diff --git a/third_party/python/gyp/test/variables/commands/commands.gyp b/third_party/python/gyp/test/variables/commands/commands.gyp new file mode 100644 index 0000000000..7d460b1810 --- /dev/null +++ b/third_party/python/gyp/test/variables/commands/commands.gyp @@ -0,0 +1,91 @@ +# Copyright (c) 2009 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. + +# This is a simple test file to make sure that variable substitution +# happens correctly. Run "run_tests.py" using python to generate the +# output from this gyp file. + +{ + 'variables': { + 'pi': 'import math; print(math.pi)', + 'third_letters': "<(other_letters)HIJK", + 'letters_list': 'ABCD', + 'other_letters': '<(letters_list)EFG', + 'check_included': '<(included_variable)', + 'check_lists': [ + '<(included_variable)', + '<(third_letters)', + ], + 'check_int': 5, + 'check_str_int': '6', + 'check_list_int': [ + 7, + '8', + 9, + ], + 'not_int_1': ' 10', + 'not_int_2': '11 ', + 'not_int_3': '012', + 'not_int_4': '13.0', + 'not_int_5': '+14', + 'negative_int': '-15', + 'zero_int': '0', + }, + 'includes': [ + 'commands.gypi', + ], + 'targets': [ + { + 'target_name': 'foo', + 'type': 'none', + 'variables': { + 'var1': '<!(["python", "-c", "<(pi)"])', + 'var2': '<!(python -c "print(\'<!(python -c "<(pi)") <(letters_list)\')")', + 'var3': '<!(python -c "print(\'<(letters_list)\')")', + 'var4': '<(<!(python -c "print(\'letters_list\')"))', + 'var5': 'letters_', + 'var6': 'list', + 'var7': '<(check_int)', + 'var8': '<(check_int)blah', + 'var9': '<(check_str_int)', + 'var10': '<(check_list_int)', + 'var11': ['<@(check_list_int)'], + 'var12': '<(not_int_1)', + 'var13': '<(not_int_2)', + 'var14': '<(not_int_3)', + 'var15': '<(not_int_4)', + 'var16': '<(not_int_5)', + 'var17': '<(negative_int)', + 'var18': '<(zero_int)', + 'var19': ['<!@(python test.py)'], + 'var20': '<!(python test.py)', + 'var21': '<(default_str)', + 'var22': '<(default_empty_str)', + 'var23': '<(default_int)', + 'var24': '<(default_empty_files)', + 'var25': '<(default_int_files)', + }, + 'actions': [ + { + 'action_name': 'test_action', + 'variables': { + 'var7': '<!(echo <(var5)<(var6))', + }, + 'inputs' : [ + '<(var2)', + ], + 'outputs': [ + '<(var4)', + '<(var7)', + ], + 'action': [ + 'echo', + '<(_inputs)', + '<(_outputs)', + ], + }, + ], + }, + ], +} diff --git a/third_party/python/gyp/test/variables/commands/commands.gyp.ignore-env.stdout b/third_party/python/gyp/test/variables/commands/commands.gyp.ignore-env.stdout new file mode 100644 index 0000000000..1b721d805b --- /dev/null +++ b/third_party/python/gyp/test/variables/commands/commands.gyp.ignore-env.stdout @@ -0,0 +1,96 @@ +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'other_letters', 'is_array': '', 'replace': '<(other_letters)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '<(letters_list)EFGHIJK', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'ABCDEFGHIJK', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'ABCDEFG', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'included_variable', 'is_array': '', 'replace': '<(included_variable)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'XYZ', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'included_variable', 'is_array': '', 'replace': '<(included_variable)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'XYZ', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'third_letters', 'is_array': '', 'replace': '<(third_letters)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '<(other_letters)HIJK', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'other_letters', 'is_array': '', 'replace': '<(other_letters)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '<(letters_list)EFGHIJK', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'ABCDEFGHIJK', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'default_empty_files', 'is_array': '', 'replace': '<(default_empty_files)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'default_int_files', 'is_array': '', 'replace': '<(default_int_files)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '0', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'python test.py', 'is_array': '', 'replace': '<!(python test.py)', 'type': '<!', 'command_string': None} +VARIABLES:input.py:838:ExpandVariables Executing command 'python test.py' in directory 'None' +VARIABLES:input.py:964:ExpandVariables Found output 'sample\\path\\foo.cpp', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'default_str', 'is_array': '', 'replace': '<(default_str)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'my_str', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'default_empty_str', 'is_array': '', 'replace': '<(default_empty_str)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'default_int', 'is_array': '', 'replace': '<(default_int)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '0', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': '<!(python -c "print(\'letters_list\'', 'is_array': '', 'replace': '<(<!(python -c "print(\'letters_list\')', 'type': '<', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'python -c "print(\'letters_list\'', 'is_array': '', 'replace': '<!(python -c "print(\'letters_list\')', 'type': '<!', 'command_string': None} +VARIABLES:input.py:838:ExpandVariables Executing command 'python -c "print('letters_list')"' in directory 'None' +VARIABLES:input.py:964:ExpandVariables Found output 'letters_list', recursing. +VARIABLES:input.py:964:ExpandVariables Found output 'ABCD', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'check_int', 'is_array': '', 'replace': '<(check_int)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '5', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': '"python", "-c", "<(pi', 'is_array': '[', 'replace': '<!(["python", "-c", "<(pi)', 'type': '<!', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'pi', 'is_array': '', 'replace': '<(pi)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '["python", "-c", "import math; print(math.pi)"]', recursing. +VARIABLES:input.py:838:ExpandVariables Executing command '['python', '-c', 'import math; print(math.pi)']' in directory 'None' +VARIABLES:input.py:964:ExpandVariables Found output '3.14159265359', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'python -c "print(\'<(letters_list', 'is_array': '', 'replace': '<!(python -c "print(\'<(letters_list)', 'type': '<!', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'python -c "print(\'ABCD\')"', recursing. +VARIABLES:input.py:838:ExpandVariables Executing command 'python -c "print('ABCD')"' in directory 'None' +VARIABLES:input.py:964:ExpandVariables Found output 'ABCD', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'python -c "print(\'<!(python -c "<(pi', 'is_array': '', 'replace': '<!(python -c "print(\'<!(python -c "<(pi)', 'type': '<!', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'python -c "<(pi', 'is_array': '', 'replace': '<!(python -c "<(pi)', 'type': '<!', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'pi', 'is_array': '', 'replace': '<(pi)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'python -c "import math; print(math.pi)"', recursing. +VARIABLES:input.py:838:ExpandVariables Executing command 'python -c "import math; print(math.pi)"' in directory 'None' +VARIABLES:input.py:964:ExpandVariables Found output 'python -c "print(\'3.14159265359 ABCD\')"', recursing. +VARIABLES:input.py:838:ExpandVariables Executing command 'python -c "print('3.14159265359 ABCD')"' in directory 'None' +VARIABLES:input.py:964:ExpandVariables Found output '3.14159265359 ABCD', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'check_str_int', 'is_array': '', 'replace': '<(check_str_int)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '6', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'check_int', 'is_array': '', 'replace': '<(check_int)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '5blah', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'not_int_4', 'is_array': '', 'replace': '<(not_int_4)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '13.0', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'not_int_3', 'is_array': '', 'replace': '<(not_int_3)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '012', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'negative_int', 'is_array': '', 'replace': '<(negative_int)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '-15', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'not_int_5', 'is_array': '', 'replace': '<(not_int_5)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '+14', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'check_list_int', 'is_array': '', 'replace': '<(check_list_int)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '7 8 9', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'not_int_2', 'is_array': '', 'replace': '<(not_int_2)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '11 ', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'not_int_1', 'is_array': '', 'replace': '<(not_int_1)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output ' 10', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'zero_int', 'is_array': '', 'replace': '<(zero_int)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '0', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'check_list_int', 'is_array': '', 'replace': '<@(check_list_int)', 'type': '<@', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output [7, 8, 9], recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'python test.py', 'is_array': '', 'replace': '<!@(python test.py)', 'type': '<!@', 'command_string': None} +VARIABLES:input.py:889:ExpandVariables Had cache value for command 'python test.py' in directory 'None' +VARIABLES:input.py:964:ExpandVariables Found output ['samplepathfoo.cpp'], recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'var6', 'is_array': '', 'replace': '<(var6)', 'type': '<', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'echo <(var5', 'is_array': '', 'replace': '<!(echo <(var5)', 'type': '<!', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'var5', 'is_array': '', 'replace': '<(var5)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'echo letters_list', recursing. +VARIABLES:input.py:838:ExpandVariables Executing command 'echo letters_list' in directory 'None' +VARIABLES:input.py:964:ExpandVariables Found output 'letters_list', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': '_inputs', 'is_array': '', 'replace': '<(_inputs)', 'type': '<', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'var2', 'is_array': '', 'replace': '<(var2)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '3.14159265359 ABCD', recursing. +VARIABLES:input.py:964:ExpandVariables Found output '"3.14159265359 ABCD"', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': '_outputs', 'is_array': '', 'replace': '<(_outputs)', 'type': '<', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'var4', 'is_array': '', 'replace': '<(var4)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'ABCD', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'var7', 'is_array': '', 'replace': '<(var7)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'letters_list', recursing. +VARIABLES:input.py:964:ExpandVariables Found output 'ABCD letters_list', recursing. diff --git a/third_party/python/gyp/test/variables/commands/commands.gyp.stdout b/third_party/python/gyp/test/variables/commands/commands.gyp.stdout new file mode 100644 index 0000000000..1b721d805b --- /dev/null +++ b/third_party/python/gyp/test/variables/commands/commands.gyp.stdout @@ -0,0 +1,96 @@ +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'other_letters', 'is_array': '', 'replace': '<(other_letters)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '<(letters_list)EFGHIJK', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'ABCDEFGHIJK', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'ABCDEFG', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'included_variable', 'is_array': '', 'replace': '<(included_variable)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'XYZ', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'included_variable', 'is_array': '', 'replace': '<(included_variable)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'XYZ', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'third_letters', 'is_array': '', 'replace': '<(third_letters)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '<(other_letters)HIJK', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'other_letters', 'is_array': '', 'replace': '<(other_letters)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '<(letters_list)EFGHIJK', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'ABCDEFGHIJK', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'default_empty_files', 'is_array': '', 'replace': '<(default_empty_files)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'default_int_files', 'is_array': '', 'replace': '<(default_int_files)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '0', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'python test.py', 'is_array': '', 'replace': '<!(python test.py)', 'type': '<!', 'command_string': None} +VARIABLES:input.py:838:ExpandVariables Executing command 'python test.py' in directory 'None' +VARIABLES:input.py:964:ExpandVariables Found output 'sample\\path\\foo.cpp', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'default_str', 'is_array': '', 'replace': '<(default_str)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'my_str', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'default_empty_str', 'is_array': '', 'replace': '<(default_empty_str)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'default_int', 'is_array': '', 'replace': '<(default_int)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '0', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': '<!(python -c "print(\'letters_list\'', 'is_array': '', 'replace': '<(<!(python -c "print(\'letters_list\')', 'type': '<', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'python -c "print(\'letters_list\'', 'is_array': '', 'replace': '<!(python -c "print(\'letters_list\')', 'type': '<!', 'command_string': None} +VARIABLES:input.py:838:ExpandVariables Executing command 'python -c "print('letters_list')"' in directory 'None' +VARIABLES:input.py:964:ExpandVariables Found output 'letters_list', recursing. +VARIABLES:input.py:964:ExpandVariables Found output 'ABCD', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'check_int', 'is_array': '', 'replace': '<(check_int)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '5', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': '"python", "-c", "<(pi', 'is_array': '[', 'replace': '<!(["python", "-c", "<(pi)', 'type': '<!', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'pi', 'is_array': '', 'replace': '<(pi)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '["python", "-c", "import math; print(math.pi)"]', recursing. +VARIABLES:input.py:838:ExpandVariables Executing command '['python', '-c', 'import math; print(math.pi)']' in directory 'None' +VARIABLES:input.py:964:ExpandVariables Found output '3.14159265359', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'python -c "print(\'<(letters_list', 'is_array': '', 'replace': '<!(python -c "print(\'<(letters_list)', 'type': '<!', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'python -c "print(\'ABCD\')"', recursing. +VARIABLES:input.py:838:ExpandVariables Executing command 'python -c "print('ABCD')"' in directory 'None' +VARIABLES:input.py:964:ExpandVariables Found output 'ABCD', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'python -c "print(\'<!(python -c "<(pi', 'is_array': '', 'replace': '<!(python -c "print(\'<!(python -c "<(pi)', 'type': '<!', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'python -c "<(pi', 'is_array': '', 'replace': '<!(python -c "<(pi)', 'type': '<!', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'pi', 'is_array': '', 'replace': '<(pi)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'python -c "import math; print(math.pi)"', recursing. +VARIABLES:input.py:838:ExpandVariables Executing command 'python -c "import math; print(math.pi)"' in directory 'None' +VARIABLES:input.py:964:ExpandVariables Found output 'python -c "print(\'3.14159265359 ABCD\')"', recursing. +VARIABLES:input.py:838:ExpandVariables Executing command 'python -c "print('3.14159265359 ABCD')"' in directory 'None' +VARIABLES:input.py:964:ExpandVariables Found output '3.14159265359 ABCD', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'check_str_int', 'is_array': '', 'replace': '<(check_str_int)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '6', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'check_int', 'is_array': '', 'replace': '<(check_int)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '5blah', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'not_int_4', 'is_array': '', 'replace': '<(not_int_4)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '13.0', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'not_int_3', 'is_array': '', 'replace': '<(not_int_3)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '012', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'negative_int', 'is_array': '', 'replace': '<(negative_int)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '-15', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'not_int_5', 'is_array': '', 'replace': '<(not_int_5)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '+14', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'check_list_int', 'is_array': '', 'replace': '<(check_list_int)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '7 8 9', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'not_int_2', 'is_array': '', 'replace': '<(not_int_2)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '11 ', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'not_int_1', 'is_array': '', 'replace': '<(not_int_1)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output ' 10', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'zero_int', 'is_array': '', 'replace': '<(zero_int)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '0', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'check_list_int', 'is_array': '', 'replace': '<@(check_list_int)', 'type': '<@', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output [7, 8, 9], recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'python test.py', 'is_array': '', 'replace': '<!@(python test.py)', 'type': '<!@', 'command_string': None} +VARIABLES:input.py:889:ExpandVariables Had cache value for command 'python test.py' in directory 'None' +VARIABLES:input.py:964:ExpandVariables Found output ['samplepathfoo.cpp'], recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'var6', 'is_array': '', 'replace': '<(var6)', 'type': '<', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'echo <(var5', 'is_array': '', 'replace': '<!(echo <(var5)', 'type': '<!', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'var5', 'is_array': '', 'replace': '<(var5)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'echo letters_list', recursing. +VARIABLES:input.py:838:ExpandVariables Executing command 'echo letters_list' in directory 'None' +VARIABLES:input.py:964:ExpandVariables Found output 'letters_list', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': '_inputs', 'is_array': '', 'replace': '<(_inputs)', 'type': '<', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'var2', 'is_array': '', 'replace': '<(var2)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output '3.14159265359 ABCD', recursing. +VARIABLES:input.py:964:ExpandVariables Found output '"3.14159265359 ABCD"', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': '_outputs', 'is_array': '', 'replace': '<(_outputs)', 'type': '<', 'command_string': None} +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'var4', 'is_array': '', 'replace': '<(var4)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'ABCD', recursing. +VARIABLES:input.py:724:ExpandVariables Matches: {'content': 'var7', 'is_array': '', 'replace': '<(var7)', 'type': '<', 'command_string': None} +VARIABLES:input.py:964:ExpandVariables Found output 'letters_list', recursing. +VARIABLES:input.py:964:ExpandVariables Found output 'ABCD letters_list', recursing. diff --git a/third_party/python/gyp/test/variables/commands/commands.gypd.golden b/third_party/python/gyp/test/variables/commands/commands.gypd.golden new file mode 100644 index 0000000000..13abba26c4 --- /dev/null +++ b/third_party/python/gyp/test/variables/commands/commands.gypd.golden @@ -0,0 +1,66 @@ +{'_DEPTH': '.', + 'included_files': ['commands.gyp', 'commands.gypi'], + 'targets': [{'actions': [{'action': ['echo', + '"3.14159265359 ABCD"', + 'ABCD letters_list'], + 'action_name': 'test_action', + 'inputs': ['3.14159265359 ABCD'], + 'outputs': ['ABCD', 'letters_list'], + 'variables': {'var7': 'letters_list'}}], + 'configurations': {'Default': {}}, + 'default_configuration': 'Default', + 'target_name': 'foo', + 'toolset': 'target', + 'type': 'none', + 'variables': {'var1': '3.14159265359', + 'var10': '7 8 9', + 'var11': ['7', '8', '9'], + 'var12': ' 10', + 'var13': '11 ', + 'var14': '012', + 'var15': '13.0', + 'var16': '+14', + 'var17': '-15', + 'var18': '0', + 'var19': ['samplepathfoo.cpp'], + 'var2': '3.14159265359 ABCD', + 'var20': 'sample\\path\\foo.cpp', + 'var21': 'my_str', + 'var22': '', + 'var23': '0', + 'var24': '', + 'var25': '0', + 'var3': 'ABCD', + 'var4': 'ABCD', + 'var5': 'letters_', + 'var6': 'list', + 'var7': '5', + 'var8': '5blah', + 'var9': '6'}}, + {'configurations': {'Default': {}}, + 'default_configuration': 'Default', + 'target_name': 'dummy', + 'toolset': 'target', + 'type': 'none'}], + 'variables': {'check_included': 'XYZ', + 'check_int': '5', + 'check_list_int': ['7', '8', '9'], + 'check_lists': ['XYZ', 'ABCDEFGHIJK'], + 'check_str_int': '6', + 'default_empty_files%': '', + 'default_empty_str%': '', + 'default_int%': '0', + 'default_int_files%': '0', + 'default_str%': 'my_str', + 'included_variable': 'XYZ', + 'letters_list': 'ABCD', + 'negative_int': '-15', + 'not_int_1': ' 10', + 'not_int_2': '11 ', + 'not_int_3': '012', + 'not_int_4': '13.0', + 'not_int_5': '+14', + 'other_letters': 'ABCDEFG', + 'pi': 'import math; print(math.pi)', + 'third_letters': 'ABCDEFGHIJK', + 'zero_int': '0'}} diff --git a/third_party/python/gyp/test/variables/commands/commands.gypi b/third_party/python/gyp/test/variables/commands/commands.gypi new file mode 100644 index 0000000000..839cb30b7e --- /dev/null +++ b/third_party/python/gyp/test/variables/commands/commands.gypi @@ -0,0 +1,23 @@ +# Copyright (c) 2009 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. + +# This file is included from commands.gyp to test evaluation order of includes. +{ + 'variables': { + 'included_variable': 'XYZ', + + 'default_str%': 'my_str', + 'default_empty_str%': '', + 'default_int%': 0, + + 'default_empty_files%': '', + 'default_int_files%': 0, + }, + 'targets': [ + { + 'target_name': 'dummy', + 'type': 'none', + }, + ], +} |