diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-12 01:59:29 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-12 01:59:29 +0000 |
commit | 256f4bd66fd000e2414495fc12c8d7a6152ab003 (patch) | |
tree | 6a3454007015206edfd69f58e2fa3491c1fa0f73 /net | |
parent | 5793906a89da44f153d3ec999544653fae5e58e1 (diff) | |
download | chromium_src-256f4bd66fd000e2414495fc12c8d7a6152ab003.zip chromium_src-256f4bd66fd000e2414495fc12c8d7a6152ab003.tar.gz chromium_src-256f4bd66fd000e2414495fc12c8d7a6152ab003.tar.bz2 |
Convert isolate.py to exclusively use .isolate files.
Convert base_unittests_run and net_unittests_run to use the new format.
Rename isolate_files to isolate_dependency_tracked and ..._dirs to ..._untracked.
Rewrite merge_isolate.py to have fully deterministic and sane behavior, especially for 'else' conditions.
Convert 'python' to sys.executable when running the command.
Add a lot of unit tests.
Move hashtable default directory into dirname(result) + '/hashtable'.
R=rogerta@chromium.org
R=mark@chromium.org
R=rsleevi@chromium.org
BUG=98834
TEST=
Review URL: http://codereview.chromium.org/10019014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131896 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/net.gyp | 57 | ||||
-rw-r--r-- | net/net_unittests.isolate | 46 |
2 files changed, 57 insertions, 46 deletions
diff --git a/net/net.gyp b/net/net.gyp index f4ab7b5..d33fc22 100644 --- a/net/net.gyp +++ b/net/net.gyp @@ -1356,63 +1356,28 @@ 'dependencies': [ 'net_unittests', ], + 'includes': [ + 'net_unittests.isolate', + ], 'actions': [ { - 'action_name': 'response_file', - 'inputs': [ - '<(PRODUCT_DIR)/net_unittests<(EXECUTABLE_SUFFIX)', - '<(DEPTH)/testing/test_env.py', - '<(DEPTH)/testing/xvfb.py', - '<(DEPTH)/third_party/pyftpdlib/src/pyftpdlib/__init__.py', - '<(DEPTH)/third_party/pyftpdlib/src/pyftpdlib/ftpserver.py', - ], - 'conditions': [ - ['OS=="linux"', { - 'inputs': [ - '<(PRODUCT_DIR)/xdisplaycheck<(EXECUTABLE_SUFFIX)', - ], - }], - ], - 'outputs': [ - '<(PRODUCT_DIR)/net_unittests.inputs', - ], - 'action': [ - 'python', - '-c', - 'import sys; ' - 'open(sys.argv[1], \'w\').write(\'\\n\'.join(sys.argv[2:]))', - '<@(_outputs)', - '<@(_inputs)', - ], - }, - { 'action_name': 'isolate', 'inputs': [ - '<(PRODUCT_DIR)/net_unittests.inputs', + 'net_unittests.isolate', + '<@(isolate_dependency_tracked)', ], 'outputs': [ '<(PRODUCT_DIR)/net_unittests.results', ], 'action': [ 'python', - '<(DEPTH)/tools/isolate/isolate.py', - '--mode=<(tests_run)', - '--root', '<(DEPTH)', + '../tools/isolate/isolate.py', + '--mode', '<(tests_run)', + '--variable', 'DEPTH=<(DEPTH)', + '--variable', 'PRODUCT_DIR=<(PRODUCT_DIR)', + '--variable', 'OS=<(OS)', '--result', '<@(_outputs)', - '--files', '<@(_inputs)', - # Directories can't be tracked by build tools (make, msbuild, xcode, - # etc) so we just put it on the command line without specifying it - # as an input. - # TODO(maruel): Revisit the support for this at all and list each - # individual test files instead. - 'data/', - 'tools/testserver/', - '<(DEPTH)/third_party/tlslite/tlslite/', - '--', - # Wraps net_unittests under xvfb. - '<(DEPTH)/testing/xvfb.py', - '<(PRODUCT_DIR)', - '<(PRODUCT_DIR)/net_unittests<(EXECUTABLE_SUFFIX)', + 'net_unittests.isolate', ], }, ], diff --git a/net/net_unittests.isolate b/net/net_unittests.isolate new file mode 100644 index 0000000..0fdbdaf --- /dev/null +++ b/net/net_unittests.isolate @@ -0,0 +1,46 @@ +# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'variables': { + 'isolate_dependency_tracked': [ + '<(PRODUCT_DIR)/net_unittests<(EXECUTABLE_SUFFIX)', + '../testing/test_env.py', + '../third_party/pyftpdlib/src/pyftpdlib/__init__.py', + '../third_party/pyftpdlib/src/pyftpdlib/ftpserver.py', + ], + 'isolate_dependency_untracked': [ + 'data/', + 'tools/testserver/', + '../third_party/tlslite/tlslite/', + ], + }, + 'conditions': [ + ['OS=="linux"', { + 'variables': { + 'isolate_dependency_tracked': [ + '../testing/xvfb.py', + '<(PRODUCT_DIR)/xdisplaycheck<(EXECUTABLE_SUFFIX)', + ], + 'command': [ + '../testing/xvfb.py', + '<(PRODUCT_DIR)', + '<(PRODUCT_DIR)/net_unittests<(EXECUTABLE_SUFFIX)', + ], + }, + }, { # else + 'variables': { + 'command': [ + '../testing/test_env.py', + '<(PRODUCT_DIR)/net_unittests<(EXECUTABLE_SUFFIX)', + ], + }, + }], + ['OS=="win"', { + 'variables': { + 'isolate_dependency_tracked': [ + ], + }, + }], + ], +} |