diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /media/webrtc/trunk/tools/gyp/test/variables/filelist | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'media/webrtc/trunk/tools/gyp/test/variables/filelist')
8 files changed, 295 insertions, 0 deletions
diff --git a/media/webrtc/trunk/tools/gyp/test/variables/filelist/filelist.gyp.stdout b/media/webrtc/trunk/tools/gyp/test/variables/filelist/filelist.gyp.stdout new file mode 100644 index 000000000..595a19c68 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/variables/filelist/filelist.gyp.stdout @@ -0,0 +1,26 @@ +VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'names.txt <@(names', 'is_array': '', 'replace': '<|(names.txt <@(names)', 'type': '<|', 'command_string': None} +VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'names', 'is_array': '', 'replace': '<@(names)', 'type': '<@', 'command_string': None} +VARIABLES:input.py:797:ExpandVariables Found output 'names.txt John Jacob Jingleheimer Schmidt', recursing. +VARIABLES:input.py:797:ExpandVariables Found output 'names.txt', recursing. +VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'names_listfile', 'is_array': '', 'replace': '<(names_listfile)', 'type': '<', 'command_string': None} +VARIABLES:input.py:797:ExpandVariables Found output 'names.txt', recursing. +VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'names_listfile', 'is_array': '', 'replace': '<(names_listfile)', 'type': '<', 'command_string': None} +VARIABLES:input.py:797:ExpandVariables Found output 'names.txt', recursing. +VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'cat <(names_listfile', 'is_array': '', 'replace': '<!@(cat <(names_listfile)', 'type': '<!@', 'command_string': None} +VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'names_listfile', 'is_array': '', 'replace': '<(names_listfile)', 'type': '<', 'command_string': None} +VARIABLES:input.py:797:ExpandVariables Found output 'cat names.txt', recursing. +VARIABLES:input.py:676:ExpandVariables Executing command 'cat names.txt' in directory 'src' +VARIABLES:input.py:797:ExpandVariables Found output ['John', 'Jacob', 'Jingleheimer', 'Schmidt'], recursing. +VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'sources.txt <@(_sources', 'is_array': '', 'replace': '<|(sources.txt <@(_sources)', 'type': '<|', 'command_string': None} +VARIABLES:input.py:562:ExpandVariables Matches: {'content': '_sources', 'is_array': '', 'replace': '<@(_sources)', 'type': '<@', 'command_string': None} +VARIABLES:input.py:797:ExpandVariables Found output 'sources.txt John Jacob Jingleheimer Schmidt', recursing. +VARIABLES:input.py:797:ExpandVariables Found output 'sources.txt', recursing. +VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'sources_listfile', 'is_array': '', 'replace': '<(sources_listfile)', 'type': '<', 'command_string': None} +VARIABLES:input.py:797:ExpandVariables Found output 'sources.txt', recursing. +VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'sources_listfile', 'is_array': '', 'replace': '<(sources_listfile)', 'type': '<', 'command_string': None} +VARIABLES:input.py:797:ExpandVariables Found output 'sources.txt', recursing. +VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'cat <(sources_listfile', 'is_array': '', 'replace': '<!@(cat <(sources_listfile)', 'type': '<!@', 'command_string': None} +VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'sources_listfile', 'is_array': '', 'replace': '<(sources_listfile)', 'type': '<', 'command_string': None} +VARIABLES:input.py:797:ExpandVariables Found output 'cat sources.txt', recursing. +VARIABLES:input.py:676:ExpandVariables Executing command 'cat sources.txt' in directory 'src' +VARIABLES:input.py:797:ExpandVariables Found output ['John', 'Jacob', 'Jingleheimer', 'Schmidt'], recursing. diff --git a/media/webrtc/trunk/tools/gyp/test/variables/filelist/filelist.gypd.golden b/media/webrtc/trunk/tools/gyp/test/variables/filelist/filelist.gypd.golden new file mode 100644 index 000000000..09d911604 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/variables/filelist/filelist.gypd.golden @@ -0,0 +1,43 @@ +{'_DEPTH': '.', + 'included_files': ['filelist.gyp'], + 'targets': [{'actions': [{'action': ['python', 'dummy.py', 'names.txt'], + 'action_name': 'test_action', + 'inputs': ['names.txt', + 'John', + 'Jacob', + 'Jingleheimer', + 'Schmidt'], + 'outputs': ['dummy_foo']}], + 'configurations': {'Default': {}}, + 'default_configuration': 'Default', + 'target_name': 'foo', + 'toolset': 'target', + 'type': 'none', + 'variables': {'names_listfile': 'names.txt'}}, + {'actions': [{'action': ['python', 'dummy.py', 'sources.txt'], + 'action_name': 'test_action', + 'inputs': ['sources.txt', + 'John', + 'Jacob', + 'Jingleheimer', + 'Schmidt'], + 'outputs': ['dummy_foo']}], + 'configurations': {'Default': {}}, + 'default_configuration': 'Default', + 'sources': ['John', 'Jacob', 'Jingleheimer', 'Schmidt'], + 'sources_excluded': ['Astor', 'Jerome', 'Schultz'], + 'target_name': 'bar', + 'toolset': 'target', + 'type': 'none', + 'variables': {'sources_listfile': 'sources.txt'}}], + 'variables': {'names': ['John', + 'Jacob', + 'Astor', + 'Jingleheimer', + 'Jerome', + 'Schmidt', + 'Schultz'], + 'names!': ['Astor'], + 'names/': [['exclude', 'Sch.*'], + ['include', '.*dt'], + ['exclude', 'Jer.*']]}} diff --git a/media/webrtc/trunk/tools/gyp/test/variables/filelist/gyptest-filelist-golden.py b/media/webrtc/trunk/tools/gyp/test/variables/filelist/gyptest-filelist-golden.py new file mode 100644 index 000000000..55eaf9db4 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/variables/filelist/gyptest-filelist-golden.py @@ -0,0 +1,51 @@ +#!/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. + +""" +Test variable expansion of '<|(list.txt ...)' syntax commands. +""" + +import os +import sys + +import TestGyp + +test = TestGyp.TestGyp(format='gypd') + +expect = test.read('filelist.gyp.stdout') +if sys.platform == 'win32': + expect = expect.replace('/', r'\\').replace('\r\n', '\n') + +test.run_gyp('src/filelist.gyp', + '--debug', 'variables', + stdout=expect, ignore_line_numbers=True) + +# Verify the filelist.gypd against the checked-in expected contents. +# +# Normally, we should canonicalize line endings in the expected +# contents file setting the Subversion svn:eol-style to native, +# but that would still fail if multiple systems are sharing a single +# workspace on a network-mounted file system. Consequently, we +# massage the Windows line endings ('\r\n') in the output to the +# checked-in UNIX endings ('\n'). + +contents = test.read('src/filelist.gypd').replace( + '\r', '').replace('\\\\', '/') +expect = test.read('filelist.gypd.golden').replace('\r', '') +if not test.match(contents, expect): + print "Unexpected contents of `src/filelist.gypd'" + test.diff(expect, contents, 'src/filelist.gypd ') + test.fail_test() + +contents = test.read('src/names.txt') +expect = 'John\nJacob\nJingleheimer\nSchmidt\n' +if not test.match(contents, expect): + print "Unexpected contents of `src/names.txt'" + test.diff(expect, contents, 'src/names.txt ') + test.fail_test() + +test.pass_test() + diff --git a/media/webrtc/trunk/tools/gyp/test/variables/filelist/gyptest-filelist.py b/media/webrtc/trunk/tools/gyp/test/variables/filelist/gyptest-filelist.py new file mode 100755 index 000000000..84a6cba5f --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/variables/filelist/gyptest-filelist.py @@ -0,0 +1,29 @@ +#!/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. + +""" +Test variable expansion of '<|(list.txt ...)' syntax commands. +""" + +import os +import sys + +import TestGyp + +test = TestGyp.TestGyp() + +CHDIR = 'src' +test.run_gyp('filelist2.gyp', chdir=CHDIR) + +test.build('filelist2.gyp', 'foo', chdir=CHDIR) +contents = test.read('src/dummy_foo').replace('\r', '') +expect = 'John\nJacob\nJingleheimer\nSchmidt\n' +if not test.match(contents, expect): + print "Unexpected contents of `src/dummy_foo'" + test.diff(expect, contents, 'src/dummy_foo') + test.fail_test() + +test.pass_test() diff --git a/media/webrtc/trunk/tools/gyp/test/variables/filelist/src/dummy.py b/media/webrtc/trunk/tools/gyp/test/variables/filelist/src/dummy.py new file mode 100644 index 000000000..e41fc9f8e --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/variables/filelist/src/dummy.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python + +import sys + +open(sys.argv[1], 'w').write(open(sys.argv[2]).read()) diff --git a/media/webrtc/trunk/tools/gyp/test/variables/filelist/src/filelist.gyp b/media/webrtc/trunk/tools/gyp/test/variables/filelist/src/filelist.gyp new file mode 100644 index 000000000..df48eb3e4 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/variables/filelist/src/filelist.gyp @@ -0,0 +1,93 @@ +# 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 test to make sure that <|(foo.txt a b c) generates +# a pre-calculated file list at gyp time and returns foo.txt. +# This feature is useful to work around limits in the number of arguments that +# can be passed to rule/action. + +{ + 'variables': { + 'names': [ + 'John', + 'Jacob', + 'Astor', + 'Jingleheimer', + 'Jerome', + 'Schmidt', + 'Schultz', + ], + 'names!': [ + 'Astor', + ], + 'names/': [ + ['exclude', 'Sch.*'], + ['include', '.*dt'], + ['exclude', 'Jer.*'], + ], + }, + 'targets': [ + { + 'target_name': 'foo', + 'type': 'none', + 'variables': { + 'names_listfile': '<|(names.txt <@(names))', + }, + 'actions': [ + { + 'action_name': 'test_action', + 'inputs' : [ + '<(names_listfile)', + '<!@(cat <(names_listfile))', + ], + 'outputs': [ + 'dummy_foo', + ], + 'action': [ + 'python', 'dummy.py', '<(names_listfile)', + ], + }, + ], + }, + { + 'target_name': 'bar', + 'type': 'none', + 'sources': [ + 'John', + 'Jacob', + 'Astor', + 'Jingleheimer', + 'Jerome', + 'Schmidt', + 'Schultz', + ], + 'sources!': [ + 'Astor', + ], + 'sources/': [ + ['exclude', 'Sch.*'], + ['include', '.*dt'], + ['exclude', 'Jer.*'], + ], + 'variables': { + 'sources_listfile': '<|(sources.txt <@(_sources))', + }, + 'actions': [ + { + 'action_name': 'test_action', + 'inputs' : [ + '<(sources_listfile)', + '<!@(cat <(sources_listfile))', + ], + 'outputs': [ + 'dummy_foo', + ], + 'action': [ + 'python', 'dummy.py', '<(sources_listfile)', + ], + }, + ], + }, + ], +} diff --git a/media/webrtc/trunk/tools/gyp/test/variables/filelist/src/filelist2.gyp b/media/webrtc/trunk/tools/gyp/test/variables/filelist/src/filelist2.gyp new file mode 100644 index 000000000..ec215dbb7 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/variables/filelist/src/filelist2.gyp @@ -0,0 +1,40 @@ +# Copyright (c) 2013 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 test to make sure that <|(foo.txt a b c) generates +# a pre-calculated file list at gyp time and returns foo.txt. +# This feature is useful to work around limits in the number of arguments that +# can be passed to rule/action. + +{ + 'variables': { + 'names': [ + 'John', + 'Jacob', + 'Jingleheimer', + 'Schmidt', + ], + }, + 'targets': [ + { + 'target_name': 'foo', + 'type': 'none', + 'variables': { + 'names_listfile': '<|(names.txt <@(names))', + }, + 'actions': [ + { + 'action_name': 'test_action', + 'msvs_cygwin_shell': 0, + 'inputs' : [ '<(names_listfile)' ], + 'outputs': [ 'dummy_foo' ], + 'action': [ + 'python', 'dummy.py', '<@(_outputs)', '<(names_listfile)', + ], + }, + ], + }, + ], +} + diff --git a/media/webrtc/trunk/tools/gyp/test/variables/filelist/update_golden b/media/webrtc/trunk/tools/gyp/test/variables/filelist/update_golden new file mode 100755 index 000000000..b4d489a34 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/variables/filelist/update_golden @@ -0,0 +1,8 @@ +#!/bin/bash + +# 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. + +python ../../../gyp --debug variables --debug general --format gypd --depth . src/filelist.gyp > filelist.gyp.stdout +cp -f src/filelist.gypd filelist.gypd.golden |