1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/webrtc/trunk/tools/gyp/test/variables/commands/commands.gyp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,86 @@ 1.4 +# Copyright (c) 2009 Google Inc. All rights reserved. 1.5 +# Use of this source code is governed by a BSD-style license that can be 1.6 +# found in the LICENSE file. 1.7 + 1.8 +# This is a simple test file to make sure that variable substitution 1.9 +# happens correctly. Run "run_tests.py" using python to generate the 1.10 +# output from this gyp file. 1.11 + 1.12 +{ 1.13 + 'variables': { 1.14 + 'pi': 'import math; print math.pi', 1.15 + 'third_letters': "<(other_letters)HIJK", 1.16 + 'letters_list': 'ABCD', 1.17 + 'other_letters': '<(letters_list)EFG', 1.18 + 'check_included': '<(included_variable)', 1.19 + 'check_lists': [ 1.20 + '<(included_variable)', 1.21 + '<(third_letters)', 1.22 + ], 1.23 + 'check_int': 5, 1.24 + 'check_str_int': '6', 1.25 + 'check_list_int': [ 1.26 + 7, 1.27 + '8', 1.28 + 9, 1.29 + ], 1.30 + 'not_int_1': ' 10', 1.31 + 'not_int_2': '11 ', 1.32 + 'not_int_3': '012', 1.33 + 'not_int_4': '13.0', 1.34 + 'not_int_5': '+14', 1.35 + 'negative_int': '-15', 1.36 + 'zero_int': '0', 1.37 + }, 1.38 + 'includes': [ 1.39 + 'commands.gypi', 1.40 + ], 1.41 + 'targets': [ 1.42 + { 1.43 + 'target_name': 'foo', 1.44 + 'type': 'none', 1.45 + 'variables': { 1.46 + 'var1': '<!(["python", "-c", "<(pi)"])', 1.47 + 'var2': '<!(python -c "print \'<!(python -c "<(pi)") <(letters_list)\'")', 1.48 + 'var3': '<!(python -c "print \'<(letters_list)\'")', 1.49 + 'var4': '<(<!(python -c "print \'letters_list\'"))', 1.50 + 'var5': 'letters_', 1.51 + 'var6': 'list', 1.52 + 'var7': '<(check_int)', 1.53 + 'var8': '<(check_int)blah', 1.54 + 'var9': '<(check_str_int)', 1.55 + 'var10': '<(check_list_int)', 1.56 + 'var11': ['<@(check_list_int)'], 1.57 + 'var12': '<(not_int_1)', 1.58 + 'var13': '<(not_int_2)', 1.59 + 'var14': '<(not_int_3)', 1.60 + 'var15': '<(not_int_4)', 1.61 + 'var16': '<(not_int_5)', 1.62 + 'var17': '<(negative_int)', 1.63 + 'var18': '<(zero_int)', 1.64 + 'var19': ['<!@(python test.py)'], 1.65 + 'var20': '<!(python test.py)', 1.66 + }, 1.67 + 'actions': [ 1.68 + { 1.69 + 'action_name': 'test_action', 1.70 + 'variables': { 1.71 + 'var7': '<!(echo <(var5)<(var6))', 1.72 + }, 1.73 + 'inputs' : [ 1.74 + '<(var2)', 1.75 + ], 1.76 + 'outputs': [ 1.77 + '<(var4)', 1.78 + '<(var7)', 1.79 + ], 1.80 + 'action': [ 1.81 + 'echo', 1.82 + '<(_inputs)', 1.83 + '<(_outputs)', 1.84 + ], 1.85 + }, 1.86 + ], 1.87 + }, 1.88 + ], 1.89 +}