From f32bcc73dfef6e5d282c6b37fd3e25da441a0c94 Mon Sep 17 00:00:00 2001 From: agrieve Date: Mon, 4 Apr 2016 07:57:40 -0700 Subject: [PATCH] Reland #2 of Include isolate.py in data for Android unit tests Now unconditionally including some directory trees to capture imports that differ based on python version (at least those that have come up so far). BUG=589318, 599692 Review URL: https://codereview.chromium.org/1846103005 Cr-Commit-Position: refs/heads/master@{#384907} --- PRESUBMIT.py | 105 ++++++++ PRESUBMIT_test.py | 101 +++++++- PRESUBMIT_test_mocks.py | 7 +- build/android/BUILD.gn | 39 ++- build/android/test_runner.pydeps | 152 ++++++++++++ build/print_python_deps.py | 104 ++++++++ .../secondary/tools/swarming_client/BUILD.gn | 14 ++ .../tools/swarming_client/isolate.pydeps | 224 ++++++++++++++++++ 8 files changed, 717 insertions(+), 29 deletions(-) create mode 100644 build/android/test_runner.pydeps create mode 100755 build/print_python_deps.py create mode 100644 build/secondary/tools/swarming_client/BUILD.gn create mode 100644 build/secondary/tools/swarming_client/isolate.pydeps diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 33e704e545d7c1..51ae552ef65b51 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -306,6 +306,17 @@ ) +_ANDROID_SPECIFIC_PYDEPS_FILES = [ + 'build/android/test_runner.pydeps', +] + +_GENERIC_PYDEPS_FILES = [ + 'build/secondary/tools/swarming_client/isolate.pydeps', +] + +_ALL_PYDEPS_FILES = _ANDROID_SPECIFIC_PYDEPS_FILES + _GENERIC_PYDEPS_FILES + + def _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api): """Attempts to prevent use of functions intended only for testing in non-testing code. For now this is just a best-effort implementation @@ -1509,6 +1520,99 @@ def _CheckAndroidNewMdpiAssetLocation(input_api, output_api): return results +class PydepsChecker(object): + def __init__(self, input_api, pydeps_files): + self._file_cache = {} + self._input_api = input_api + self._pydeps_files = pydeps_files + + def _LoadFile(self, path): + """Returns the list of paths within a .pydeps file relative to //.""" + if path not in self._file_cache: + with open(path) as f: + self._file_cache[path] = f.read() + return self._file_cache[path] + + def _ComputeNormalizedPydepsEntries(self, pydeps_path): + """Returns an interable of paths within the .pydep, relativized to //.""" + os_path = self._input_api.os_path + pydeps_dir = os_path.dirname(pydeps_path) + entries = (l.rstrip() for l in self._LoadFile(pydeps_path).splitlines() + if not l.startswith('*')) + return (os_path.normpath(os_path.join(pydeps_dir, e)) for e in entries) + + def _CreateFilesToPydepsMap(self): + """Returns a map of local_path -> list_of_pydeps.""" + ret = {} + for pydep_local_path in self._pydeps_files: + for path in self._ComputeNormalizedPydepsEntries(pydep_local_path): + ret.setdefault(path, []).append(pydep_local_path) + return ret + + def ComputeAffectedPydeps(self): + """Returns an iterable of .pydeps files that might need regenerating.""" + affected_pydeps = set() + file_to_pydeps_map = None + for f in self._input_api.AffectedFiles(include_deletes=True): + local_path = f.LocalPath() + if local_path == 'DEPS': + return self._pydeps_files + elif local_path.endswith('.pydeps'): + if local_path in self._pydeps_files: + affected_pydeps.add(local_path) + elif local_path.endswith('.py'): + if file_to_pydeps_map is None: + file_to_pydeps_map = self._CreateFilesToPydepsMap() + affected_pydeps.update(file_to_pydeps_map.get(local_path, ())) + return affected_pydeps + + def DetermineIfStale(self, pydeps_path): + """Runs print_python_deps.py to see if the files is stale.""" + old_pydeps_data = self._LoadFile(pydeps_path).splitlines() + cmd = old_pydeps_data[1][1:].strip() + new_pydeps_data = self._input_api.subprocess.check_output( + cmd + ' --output ""', shell=True) + if old_pydeps_data[2:] != new_pydeps_data.splitlines()[2:]: + return cmd + + +def _CheckPydepsNeedsUpdating(input_api, output_api, checker_for_tests=None): + """Checks if a .pydeps file needs to be regenerated.""" + # TODO(agrieve): Update when there's a better way to detect this: crbug/570091 + is_android = input_api.os_path.exists('third_party/android_tools') + pydeps_files = _ALL_PYDEPS_FILES if is_android else _GENERIC_PYDEPS_FILES + results = [] + # First, check for new / deleted .pydeps. + for f in input_api.AffectedFiles(include_deletes=True): + if f.LocalPath().endswith('.pydeps'): + if f.Action() == 'D' and f.LocalPath() in _ALL_PYDEPS_FILES: + results.append(output_api.PresubmitError( + 'Please update _ALL_PYDEPS_FILES within //PRESUBMIT.py to ' + 'remove %s' % f.LocalPath())) + elif f.Action() != 'D' and f.LocalPath() not in _ALL_PYDEPS_FILES: + results.append(output_api.PresubmitError( + 'Please update _ALL_PYDEPS_FILES within //PRESUBMIT.py to ' + 'include %s' % f.LocalPath())) + + if results: + return results + + checker = checker_for_tests or PydepsChecker(input_api, pydeps_files) + + for pydep_path in checker.ComputeAffectedPydeps(): + try: + cmd = checker.DetermineIfStale(pydep_path) + if cmd: + results.append(output_api.PresubmitError( + 'File is stale: %s\nTo regenerate, run:\n\n %s' % + (pydep_path, cmd))) + except input_api.subprocess.CalledProcessError as error: + return [output_api.PresubmitError('Error running: %s' % error.cmd, + long_text=error.output)] + + return results + + def _CheckForCopyrightedCode(input_api, output_api): """Verifies that newly added code doesn't contain copyrighted material and is properly licensed under the standard Chromium license. @@ -1712,6 +1816,7 @@ def _CommonChecks(input_api, output_api): results.extend(_CheckForWindowsLineEndings(input_api, output_api)) results.extend(_CheckSingletonInHeaders(input_api, output_api)) results.extend(_CheckNoDeprecatedCompiledResourcesGYP(input_api, output_api)) + results.extend(_CheckPydepsNeedsUpdating(input_api, output_api)) if any('PRESUBMIT.py' == f.LocalPath() for f in input_api.AffectedFiles()): results.extend(input_api.canned_checks.RunUnitTestsInDirectory( diff --git a/PRESUBMIT_test.py b/PRESUBMIT_test.py index 7c528c57175b59..d2eb524df94888 100755 --- a/PRESUBMIT_test.py +++ b/PRESUBMIT_test.py @@ -3,12 +3,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import glob -import json -import os import re import subprocess -import sys import unittest import PRESUBMIT @@ -835,6 +831,103 @@ def testUserMetricsActionNotAddedToActions(self): output[0].message) +class PydepsNeedsUpdatingTest(unittest.TestCase): + + class MockSubprocess(object): + CalledProcessError = subprocess.CalledProcessError + + def setUp(self): + mock_all_pydeps = ['A.pydeps', 'B.pydeps'] + self.old_ALL_PYDEPS_FILES = PRESUBMIT._ALL_PYDEPS_FILES + PRESUBMIT._ALL_PYDEPS_FILES = mock_all_pydeps + self.mock_input_api = MockInputApi() + self.mock_output_api = MockOutputApi() + self.mock_input_api.subprocess = PydepsNeedsUpdatingTest.MockSubprocess() + self.checker = PRESUBMIT.PydepsChecker(self.mock_input_api, mock_all_pydeps) + self.checker._file_cache = { + 'A.pydeps': '# Generated by:\n# CMD A\nA.py\nC.py\n', + 'B.pydeps': '# Generated by:\n# CMD B\nB.py\nC.py\n', + } + + def tearDown(self): + PRESUBMIT._ALL_PYDEPS_FILES = self.old_ALL_PYDEPS_FILES + + def _RunCheck(self): + return PRESUBMIT._CheckPydepsNeedsUpdating(self.mock_input_api, + self.mock_output_api, + checker_for_tests=self.checker) + + def testAddedPydep(self): + self.mock_input_api.files = [ + MockAffectedFile('new.pydeps', [], action='A'), + ] + + results = self._RunCheck() + self.assertEqual(1, len(results)) + self.assertTrue('PYDEPS_FILES' in str(results[0])) + + def testRemovedPydep(self): + self.mock_input_api.files = [ + MockAffectedFile(PRESUBMIT._ALL_PYDEPS_FILES[0], [], action='D'), + ] + + results = self._RunCheck() + self.assertEqual(1, len(results)) + self.assertTrue('PYDEPS_FILES' in str(results[0])) + + def testRandomPyIgnored(self): + self.mock_input_api.files = [ + MockAffectedFile('random.py', []), + ] + + results = self._RunCheck() + self.assertEqual(0, len(results), 'Unexpected results: %r' % results) + + def testRelevantPyNoChange(self): + self.mock_input_api.files = [ + MockAffectedFile('A.py', []), + ] + + def mock_check_output(cmd, shell=False): + self.assertEqual('CMD A --output ""', cmd) + return self.checker._file_cache['A.pydeps'] + + self.mock_input_api.subprocess.check_output = mock_check_output + + results = self._RunCheck() + self.assertEqual(0, len(results), 'Unexpected results: %r' % results) + + def testRelevantPyOneChange(self): + self.mock_input_api.files = [ + MockAffectedFile('A.py', []), + ] + + def mock_check_output(cmd, shell=False): + self.assertEqual('CMD A --output ""', cmd) + return 'changed data' + + self.mock_input_api.subprocess.check_output = mock_check_output + + results = self._RunCheck() + self.assertEqual(1, len(results)) + self.assertTrue('File is stale' in str(results[0])) + + def testRelevantPyTwoChanges(self): + self.mock_input_api.files = [ + MockAffectedFile('C.py', []), + ] + + def mock_check_output(cmd, shell=False): + return 'changed data' + + self.mock_input_api.subprocess.check_output = mock_check_output + + results = self._RunCheck() + self.assertEqual(2, len(results)) + self.assertTrue('File is stale' in str(results[0])) + self.assertTrue('File is stale' in str(results[1])) + + class LogUsageTest(unittest.TestCase): def testCheckAndroidCrLogUsage(self): diff --git a/PRESUBMIT_test_mocks.py b/PRESUBMIT_test_mocks.py index 5230c872107359..373b52c6d3c686 100644 --- a/PRESUBMIT_test_mocks.py +++ b/PRESUBMIT_test_mocks.py @@ -26,7 +26,7 @@ def __init__(self): self.is_committing = False self.change = MockChange([]) - def AffectedFiles(self, file_filter=None): + def AffectedFiles(self, file_filter=None, include_deletes=False): return self.files def AffectedSourceFiles(self, file_filter=None): @@ -92,13 +92,14 @@ class MockFile(object): MockInputApi for presubmit unittests. """ - def __init__(self, local_path, new_contents): + def __init__(self, local_path, new_contents, action='A'): self._local_path = local_path self._new_contents = new_contents self._changed_contents = [(i + 1, l) for i, l in enumerate(new_contents)] + self._action = action def Action(self): - return 'A' # TODO(dbeam): feel free to change if your test actually uses. + return self._action def ChangedContents(self): return self._changed_contents diff --git a/build/android/BUILD.gn b/build/android/BUILD.gn index 73b25cde9299a7..af819ed3ce62c8 100644 --- a/build/android/BUILD.gn +++ b/build/android/BUILD.gn @@ -84,30 +84,25 @@ action("cpplib_stripped") { ] } -group("devil_py") { - data = [ - "devil_chromium.json", - "devil_chromium.py", - "//third_party/android_tools/sdk/build-tools/23.0.1/aapt", - "//third_party/android_tools/sdk/build-tools/23.0.1/dexdump", - "//third_party/android_tools/sdk/build-tools/23.0.1/lib/libc++.so", - "//third_party/android_tools/sdk/build-tools/23.0.1/split-select", - "//third_party/android_tools/sdk/platform-tools/adb", - "//third_party/catapult/catapult_base/catapult_base/", - "//third_party/catapult/dependency_manager/dependency_manager/", - "//third_party/catapult/third_party/gsutil/", - "//third_party/catapult/devil/devil/", - ] -} - group("test_runner_py") { - data = [ - "test_runner.py", - "pylib/", - "//build/util/lib/common/", - ] + _py_files = read_file("test_runner.pydeps", "list lines") + + # Filter out comments. + set_sources_assignment_filter([ "#*" ]) + sources = _py_files + + data = sources + [ + "devil_chromium.json", + "//third_party/android_tools/sdk/build-tools/23.0.1/aapt", + "//third_party/android_tools/sdk/build-tools/23.0.1/dexdump", + "//third_party/android_tools/sdk/build-tools/23.0.1/lib/libc++.so", + "//third_party/android_tools/sdk/build-tools/23.0.1/split-select", + "//third_party/android_tools/sdk/platform-tools/adb", + "//third_party/catapult/third_party/gsutil/", + "//third_party/catapult/devil/devil/devil_dependencies.json", + ] data_deps = [ - ":devil_py", + "//tools/swarming_client:isolate_py", ] } diff --git a/build/android/test_runner.pydeps b/build/android/test_runner.pydeps new file mode 100644 index 00000000000000..17e37eea3b0007 --- /dev/null +++ b/build/android/test_runner.pydeps @@ -0,0 +1,152 @@ +# Generated by running: +# build/print_python_deps.py --root build/android --output build/android/test_runner.pydeps build/android/test_runner.py +../../third_party/appurify-python/src/appurify/__init__.py +../../third_party/appurify-python/src/appurify/api.py +../../third_party/appurify-python/src/appurify/constants.py +../../third_party/appurify-python/src/appurify/utils.py +../../third_party/catapult/catapult_base/catapult_base/__init__.py +../../third_party/catapult/catapult_base/catapult_base/cloud_storage.py +../../third_party/catapult/catapult_base/catapult_base/util.py +../../third_party/catapult/dependency_manager/dependency_manager/__init__.py +../../third_party/catapult/dependency_manager/dependency_manager/archive_info.py +../../third_party/catapult/dependency_manager/dependency_manager/base_config.py +../../third_party/catapult/dependency_manager/dependency_manager/cloud_storage_info.py +../../third_party/catapult/dependency_manager/dependency_manager/dependency_info.py +../../third_party/catapult/dependency_manager/dependency_manager/dependency_manager_util.py +../../third_party/catapult/dependency_manager/dependency_manager/exceptions.py +../../third_party/catapult/dependency_manager/dependency_manager/local_path_info.py +../../third_party/catapult/dependency_manager/dependency_manager/manager.py +../../third_party/catapult/dependency_manager/dependency_manager/uploader.py +../../third_party/catapult/devil/devil/__init__.py +../../third_party/catapult/devil/devil/android/__init__.py +../../third_party/catapult/devil/devil/android/apk_helper.py +../../third_party/catapult/devil/devil/android/battery_utils.py +../../third_party/catapult/devil/devil/android/constants/__init__.py +../../third_party/catapult/devil/devil/android/constants/file_system.py +../../third_party/catapult/devil/devil/android/decorators.py +../../third_party/catapult/devil/devil/android/device_blacklist.py +../../third_party/catapult/devil/devil/android/device_errors.py +../../third_party/catapult/devil/devil/android/device_list.py +../../third_party/catapult/devil/devil/android/device_signal.py +../../third_party/catapult/devil/devil/android/device_temp_file.py +../../third_party/catapult/devil/devil/android/device_utils.py +../../third_party/catapult/devil/devil/android/flag_changer.py +../../third_party/catapult/devil/devil/android/forwarder.py +../../third_party/catapult/devil/devil/android/install_commands.py +../../third_party/catapult/devil/devil/android/logcat_monitor.py +../../third_party/catapult/devil/devil/android/md5sum.py +../../third_party/catapult/devil/devil/android/ports.py +../../third_party/catapult/devil/devil/android/sdk/__init__.py +../../third_party/catapult/devil/devil/android/sdk/aapt.py +../../third_party/catapult/devil/devil/android/sdk/adb_wrapper.py +../../third_party/catapult/devil/devil/android/sdk/build_tools.py +../../third_party/catapult/devil/devil/android/sdk/gce_adb_wrapper.py +../../third_party/catapult/devil/devil/android/sdk/intent.py +../../third_party/catapult/devil/devil/android/sdk/keyevent.py +../../third_party/catapult/devil/devil/android/sdk/split_select.py +../../third_party/catapult/devil/devil/android/sdk/version_codes.py +../../third_party/catapult/devil/devil/android/valgrind_tools/__init__.py +../../third_party/catapult/devil/devil/android/valgrind_tools/base_tool.py +../../third_party/catapult/devil/devil/base_error.py +../../third_party/catapult/devil/devil/constants/__init__.py +../../third_party/catapult/devil/devil/constants/exit_codes.py +../../third_party/catapult/devil/devil/devil_env.py +../../third_party/catapult/devil/devil/utils/__init__.py +../../third_party/catapult/devil/devil/utils/cmd_helper.py +../../third_party/catapult/devil/devil/utils/file_utils.py +../../third_party/catapult/devil/devil/utils/host_utils.py +../../third_party/catapult/devil/devil/utils/lazy/__init__.py +../../third_party/catapult/devil/devil/utils/lazy/weak_constant.py +../../third_party/catapult/devil/devil/utils/parallelizer.py +../../third_party/catapult/devil/devil/utils/reraiser_thread.py +../../third_party/catapult/devil/devil/utils/run_tests_helper.py +../../third_party/catapult/devil/devil/utils/timeout_retry.py +../../third_party/catapult/devil/devil/utils/watchdog_timer.py +../../third_party/catapult/devil/devil/utils/zip_utils.py +../util/lib/common/perf_result_data_type.py +../util/lib/common/perf_tests_results_helper.py +../util/lib/common/unittest_util.py +devil_chromium.py +pylib/__init__.py +pylib/base/__init__.py +pylib/base/base_setup.py +pylib/base/base_test_result.py +pylib/base/base_test_runner.py +pylib/base/environment.py +pylib/base/environment_factory.py +pylib/base/test_collection.py +pylib/base/test_dispatcher.py +pylib/base/test_instance.py +pylib/base/test_instance_factory.py +pylib/base/test_run.py +pylib/base/test_run_factory.py +pylib/base/test_server.py +pylib/chrome_test_server_spawner.py +pylib/constants/__init__.py +pylib/constants/host_paths.py +pylib/gtest/__init__.py +pylib/gtest/gtest_test_instance.py +pylib/host_driven/__init__.py +pylib/host_driven/setup.py +pylib/host_driven/test_case.py +pylib/host_driven/test_info_collection.py +pylib/host_driven/test_runner.py +pylib/host_driven/tests_annotations.py +pylib/instrumentation/__init__.py +pylib/instrumentation/instrumentation_parser.py +pylib/instrumentation/instrumentation_test_instance.py +pylib/instrumentation/json_perf_parser.py +pylib/instrumentation/setup.py +pylib/instrumentation/test_jar.py +pylib/instrumentation/test_options.py +pylib/instrumentation/test_package.py +pylib/instrumentation/test_result.py +pylib/instrumentation/test_runner.py +pylib/junit/__init__.py +pylib/junit/setup.py +pylib/junit/test_dispatcher.py +pylib/junit/test_runner.py +pylib/linker/__init__.py +pylib/linker/setup.py +pylib/linker/test_case.py +pylib/linker/test_runner.py +pylib/local/__init__.py +pylib/local/device/__init__.py +pylib/local/device/local_device_environment.py +pylib/local/device/local_device_gtest_run.py +pylib/local/device/local_device_instrumentation_test_run.py +pylib/local/device/local_device_test_run.py +pylib/local/local_test_server_spawner.py +pylib/monkey/__init__.py +pylib/monkey/setup.py +pylib/monkey/test_options.py +pylib/monkey/test_runner.py +pylib/perf/__init__.py +pylib/perf/setup.py +pylib/perf/test_options.py +pylib/perf/test_runner.py +pylib/remote/__init__.py +pylib/remote/device/__init__.py +pylib/remote/device/appurify_constants.py +pylib/remote/device/appurify_sanitized.py +pylib/remote/device/remote_device_environment.py +pylib/remote/device/remote_device_gtest_run.py +pylib/remote/device/remote_device_helper.py +pylib/remote/device/remote_device_instrumentation_test_run.py +pylib/remote/device/remote_device_test_run.py +pylib/remote/device/remote_device_uirobot_test_run.py +pylib/results/__init__.py +pylib/results/flakiness_dashboard/__init__.py +pylib/results/flakiness_dashboard/json_results_generator.py +pylib/results/flakiness_dashboard/results_uploader.py +pylib/results/json_results.py +pylib/results/report_results.py +pylib/uirobot/__init__.py +pylib/uirobot/uirobot_test_instance.py +pylib/utils/__init__.py +pylib/utils/isolator.py +pylib/utils/proguard.py +pylib/utils/repo_utils.py +pylib/utils/test_environment.py +pylib/valgrind_tools.py +test_runner.py diff --git a/build/print_python_deps.py b/build/print_python_deps.py new file mode 100755 index 00000000000000..3d0c9a8e140795 --- /dev/null +++ b/build/print_python_deps.py @@ -0,0 +1,104 @@ +#!/usr/bin/env python +# Copyright 2016 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. + +"""Prints all non-system dependencies for the given module. + +The primary use-case for this script is to genererate the list of python modules +required for .isolate files. +""" + +import argparse +import imp +import os +import pipes +import sys + +# Don't use any helper modules, or else they will end up in the results. + + +_SRC_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) + + +def _ComputePythonDependencies(): + """Gets the paths of imported non-system python modules. + + A path is assumed to be a "system" import if it is outside of chromium's + src/. The paths will be relative to the current directory. + """ + module_paths = (m.__file__ for m in sys.modules.values() + if m and hasattr(m, '__file__')) + + src_paths = set() + for path in module_paths: + if path == __file__: + continue + path = os.path.abspath(path) + if not path.startswith(_SRC_ROOT): + continue + + if path.endswith('.pyc'): + path = path[:-1] + src_paths.add(path) + + return src_paths + + +def _NormalizeCommandLine(options): + """Returns a string that when run from SRC_ROOT replicates the command.""" + args = ['build/print_python_deps.py'] + root = os.path.relpath(options.root, _SRC_ROOT) + if root != '.': + args.extend(('--root', root)) + if options.output: + args.extend(('--output', os.path.relpath(options.output, _SRC_ROOT))) + for whitelist in sorted(options.whitelists): + args.extend(('--whitelist', os.path.relpath(whitelist, _SRC_ROOT))) + args.append(os.path.relpath(options.module, _SRC_ROOT)) + return ' '.join(pipes.quote(x) for x in args) + + +def _FindPythonInDirectory(directory): + """Returns an iterable of all non-test python files in the given directory.""" + files = [] + for root, _dirnames, filenames in os.walk(directory): + for filename in filenames: + if filename.endswith('.py') and not filename.endswith('_test.py'): + yield os.path.join(root, filename) + + +def main(): + parser = argparse.ArgumentParser( + description='Prints all non-system dependencies for the given module.') + parser.add_argument('module', + help='The python module to analyze.') + parser.add_argument('--root', default='.', + help='Directory to make paths relative to.') + parser.add_argument('--output', + help='Write output to a file rather than stdout.') + parser.add_argument('--whitelist', default=[], action='append', + dest='whitelists', + help='Recursively include all non-test python files ' + 'within this directory. May be specified multiple times.') + options = parser.parse_args() + sys.path.append(os.path.dirname(options.module)) + imp.load_source('NAME', options.module) + + paths_set = _ComputePythonDependencies() + for path in options.whitelists: + paths_set.update(os.path.abspath(p) for p in _FindPythonInDirectory(path)) + + paths = [os.path.relpath(p, options.root) for p in paths_set] + + normalized_cmdline = _NormalizeCommandLine(options) + out = open(options.output, 'w') if options.output else sys.stdout + with out: + out.write('# Generated by running:\n') + out.write('# %s\n' % normalized_cmdline) + for path in sorted(paths): + out.write(path + '\n') + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/build/secondary/tools/swarming_client/BUILD.gn b/build/secondary/tools/swarming_client/BUILD.gn new file mode 100644 index 00000000000000..f4860523c7c31d --- /dev/null +++ b/build/secondary/tools/swarming_client/BUILD.gn @@ -0,0 +1,14 @@ +# Copyright 2016 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. + +group("isolate_py") { + _py_files = + read_file("//build/secondary/tools/swarming_client/isolate.pydeps", + "list lines") + + # Filter out comments. + set_sources_assignment_filter([ "#*" ]) + sources = _py_files + data = sources +} diff --git a/build/secondary/tools/swarming_client/isolate.pydeps b/build/secondary/tools/swarming_client/isolate.pydeps new file mode 100644 index 00000000000000..d7a918919a061e --- /dev/null +++ b/build/secondary/tools/swarming_client/isolate.pydeps @@ -0,0 +1,224 @@ +# Generated by running: +# build/print_python_deps.py --root tools/swarming_client --output build/secondary/tools/swarming_client/isolate.pydeps --whitelist tools/swarming_client/third_party tools/swarming_client/isolate.py +auth.py +isolate.py +isolate_format.py +isolated_format.py +isolateserver.py +run_isolated.py +third_party/__init__.py +third_party/chromium/__init__.py +third_party/chromium/natsort.py +third_party/colorama/__init__.py +third_party/colorama/ansi.py +third_party/colorama/ansitowin32.py +third_party/colorama/initialise.py +third_party/colorama/win32.py +third_party/colorama/winterm.py +third_party/depot_tools/__init__.py +third_party/depot_tools/auto_stub.py +third_party/depot_tools/fix_encoding.py +third_party/depot_tools/subcommand.py +third_party/google/__init__.py +third_party/google/protobuf/__init__.py +third_party/google/protobuf/compiler/__init__.py +third_party/google/protobuf/compiler/plugin_pb2.py +third_party/google/protobuf/descriptor.py +third_party/google/protobuf/descriptor_database.py +third_party/google/protobuf/descriptor_pb2.py +third_party/google/protobuf/descriptor_pool.py +third_party/google/protobuf/internal/__init__.py +third_party/google/protobuf/internal/api_implementation.py +third_party/google/protobuf/internal/containers.py +third_party/google/protobuf/internal/cpp_message.py +third_party/google/protobuf/internal/decoder.py +third_party/google/protobuf/internal/encoder.py +third_party/google/protobuf/internal/enum_type_wrapper.py +third_party/google/protobuf/internal/message_listener.py +third_party/google/protobuf/internal/python_message.py +third_party/google/protobuf/internal/type_checkers.py +third_party/google/protobuf/internal/wire_format.py +third_party/google/protobuf/message.py +third_party/google/protobuf/message_factory.py +third_party/google/protobuf/reflection.py +third_party/google/protobuf/service.py +third_party/google/protobuf/service_reflection.py +third_party/google/protobuf/symbol_database.py +third_party/google/protobuf/text_encoding.py +third_party/google/protobuf/text_format.py +third_party/googleapiclient/__init__.py +third_party/googleapiclient/channel.py +third_party/googleapiclient/discovery.py +third_party/googleapiclient/discovery_cache/__init__.py +third_party/googleapiclient/discovery_cache/appengine_memcache.py +third_party/googleapiclient/discovery_cache/base.py +third_party/googleapiclient/discovery_cache/file_cache.py +third_party/googleapiclient/errors.py +third_party/googleapiclient/http.py +third_party/googleapiclient/mimeparse.py +third_party/googleapiclient/model.py +third_party/googleapiclient/sample_tools.py +third_party/googleapiclient/schema.py +third_party/httplib2/__init__.py +third_party/httplib2/iri2uri.py +third_party/httplib2/socks.py +third_party/infra_libs/__init__.py +third_party/infra_libs/app.py +third_party/infra_libs/authentication.py +third_party/infra_libs/event_mon/__init__.py +third_party/infra_libs/event_mon/checkouts.py +third_party/infra_libs/event_mon/config.py +third_party/infra_libs/event_mon/monitoring.py +third_party/infra_libs/event_mon/protos/__init__.py +third_party/infra_libs/event_mon/protos/chrome_infra_log_pb2.py +third_party/infra_libs/event_mon/protos/goma_stats_pb2.py +third_party/infra_libs/event_mon/protos/log_request_lite_pb2.py +third_party/infra_libs/event_mon/router.py +third_party/infra_libs/experiments.py +third_party/infra_libs/httplib2_utils.py +third_party/infra_libs/infra_types/__init__.py +third_party/infra_libs/infra_types/infra_types.py +third_party/infra_libs/instrumented_requests.py +third_party/infra_libs/logs/__init__.py +third_party/infra_libs/logs/logs.py +third_party/infra_libs/memoize.py +third_party/infra_libs/time_functions/__init__.py +third_party/infra_libs/time_functions/testing.py +third_party/infra_libs/time_functions/timestamp.py +third_party/infra_libs/time_functions/zulu.py +third_party/infra_libs/ts_mon/__init__.py +third_party/infra_libs/ts_mon/common/__init__.py +third_party/infra_libs/ts_mon/common/distribution.py +third_party/infra_libs/ts_mon/common/errors.py +third_party/infra_libs/ts_mon/common/helpers.py +third_party/infra_libs/ts_mon/common/http_metrics.py +third_party/infra_libs/ts_mon/common/interface.py +third_party/infra_libs/ts_mon/common/metric_store.py +third_party/infra_libs/ts_mon/common/metrics.py +third_party/infra_libs/ts_mon/common/monitors.py +third_party/infra_libs/ts_mon/common/standard_metrics.py +third_party/infra_libs/ts_mon/common/targets.py +third_party/infra_libs/ts_mon/config.py +third_party/infra_libs/ts_mon/protos/__init__.py +third_party/infra_libs/ts_mon/protos/acquisition_network_device_pb2.py +third_party/infra_libs/ts_mon/protos/acquisition_task_pb2.py +third_party/infra_libs/ts_mon/protos/metrics_pb2.py +third_party/infra_libs/utils.py +third_party/oauth2client/__init__.py +third_party/oauth2client/_helpers.py +third_party/oauth2client/_openssl_crypt.py +third_party/oauth2client/_pycrypto_crypt.py +third_party/oauth2client/client.py +third_party/oauth2client/clientsecrets.py +third_party/oauth2client/crypt.py +third_party/oauth2client/file.py +third_party/oauth2client/gce.py +third_party/oauth2client/keyring_storage.py +third_party/oauth2client/locked_file.py +third_party/oauth2client/multistore_file.py +third_party/oauth2client/service_account.py +third_party/oauth2client/tools.py +third_party/oauth2client/util.py +third_party/oauth2client/xsrfutil.py +third_party/pyasn1/pyasn1/__init__.py +third_party/pyasn1/pyasn1/codec/__init__.py +third_party/pyasn1/pyasn1/codec/ber/__init__.py +third_party/pyasn1/pyasn1/codec/ber/decoder.py +third_party/pyasn1/pyasn1/codec/ber/encoder.py +third_party/pyasn1/pyasn1/codec/ber/eoo.py +third_party/pyasn1/pyasn1/codec/cer/__init__.py +third_party/pyasn1/pyasn1/codec/cer/decoder.py +third_party/pyasn1/pyasn1/codec/cer/encoder.py +third_party/pyasn1/pyasn1/codec/der/__init__.py +third_party/pyasn1/pyasn1/codec/der/decoder.py +third_party/pyasn1/pyasn1/codec/der/encoder.py +third_party/pyasn1/pyasn1/compat/__init__.py +third_party/pyasn1/pyasn1/compat/binary.py +third_party/pyasn1/pyasn1/compat/octets.py +third_party/pyasn1/pyasn1/debug.py +third_party/pyasn1/pyasn1/error.py +third_party/pyasn1/pyasn1/type/__init__.py +third_party/pyasn1/pyasn1/type/base.py +third_party/pyasn1/pyasn1/type/char.py +third_party/pyasn1/pyasn1/type/constraint.py +third_party/pyasn1/pyasn1/type/error.py +third_party/pyasn1/pyasn1/type/namedtype.py +third_party/pyasn1/pyasn1/type/namedval.py +third_party/pyasn1/pyasn1/type/tag.py +third_party/pyasn1/pyasn1/type/tagmap.py +third_party/pyasn1/pyasn1/type/univ.py +third_party/pyasn1/pyasn1/type/useful.py +third_party/requests/__init__.py +third_party/requests/adapters.py +third_party/requests/api.py +third_party/requests/auth.py +third_party/requests/certs.py +third_party/requests/compat.py +third_party/requests/cookies.py +third_party/requests/exceptions.py +third_party/requests/hooks.py +third_party/requests/models.py +third_party/requests/packages/__init__.py +third_party/requests/packages/urllib3/__init__.py +third_party/requests/packages/urllib3/_collections.py +third_party/requests/packages/urllib3/connection.py +third_party/requests/packages/urllib3/connectionpool.py +third_party/requests/packages/urllib3/contrib/__init__.py +third_party/requests/packages/urllib3/contrib/appengine.py +third_party/requests/packages/urllib3/contrib/ntlmpool.py +third_party/requests/packages/urllib3/contrib/pyopenssl.py +third_party/requests/packages/urllib3/exceptions.py +third_party/requests/packages/urllib3/fields.py +third_party/requests/packages/urllib3/filepost.py +third_party/requests/packages/urllib3/packages/__init__.py +third_party/requests/packages/urllib3/packages/ordered_dict.py +third_party/requests/packages/urllib3/packages/six.py +third_party/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py +third_party/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py +third_party/requests/packages/urllib3/poolmanager.py +third_party/requests/packages/urllib3/request.py +third_party/requests/packages/urllib3/response.py +third_party/requests/packages/urllib3/util/__init__.py +third_party/requests/packages/urllib3/util/connection.py +third_party/requests/packages/urllib3/util/request.py +third_party/requests/packages/urllib3/util/response.py +third_party/requests/packages/urllib3/util/retry.py +third_party/requests/packages/urllib3/util/ssl_.py +third_party/requests/packages/urllib3/util/timeout.py +third_party/requests/packages/urllib3/util/url.py +third_party/requests/sessions.py +third_party/requests/status_codes.py +third_party/requests/structures.py +third_party/requests/utils.py +third_party/rsa/rsa/__init__.py +third_party/rsa/rsa/_compat.py +third_party/rsa/rsa/_version133.py +third_party/rsa/rsa/_version200.py +third_party/rsa/rsa/asn1.py +third_party/rsa/rsa/bigfile.py +third_party/rsa/rsa/cli.py +third_party/rsa/rsa/common.py +third_party/rsa/rsa/core.py +third_party/rsa/rsa/key.py +third_party/rsa/rsa/parallel.py +third_party/rsa/rsa/pem.py +third_party/rsa/rsa/pkcs1.py +third_party/rsa/rsa/prime.py +third_party/rsa/rsa/randnum.py +third_party/rsa/rsa/transform.py +third_party/rsa/rsa/util.py +third_party/rsa/rsa/varblock.py +third_party/six/__init__.py +third_party/uritemplate/__init__.py +utils/__init__.py +utils/file_path.py +utils/fs.py +utils/logging_utils.py +utils/lru.py +utils/net.py +utils/oauth.py +utils/on_error.py +utils/subprocess42.py +utils/threading_utils.py +utils/tools.py +utils/zip_package.py