You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
depot_tools/tests
Bruce Dawson 8254f06ba7 Mitigate Python 3 multiprocessing bug on Windows
The multiprocessing module on Windows has a bug where if you ask for
more than 60 child processes then it will hang. This is related to the
MAXIMUM_WAIT_OBJECTS (64) limit of WaitForMultipleObjects. Other sources
have listed the multiprocessing limit as being 61, or have said that the
the maximum number of objects that can be waited on is actually 63, but
those details don't really matter.

The original fix for this class of issues was crrev.com/c/2785844. This
change extends those fixes to depot_tools, which was missed last year.
This change also updates how PyLint is called by further limiting the
number of jobs to the number of files being processed divided by 10.
This is because there is a significant cost to creating PyLint
subprocesses - each takes about 0.5 s on my test machine. So there needs
to be enough parallelism to justify this.

Patches for PyLint and a bug for cpython are planned.

This will stop PyLint from hanging during presubmits on many-core
machines. The command used to reproduce the hangs and validate the fix
was:

  git cl presubmit -v --force --files "chrome/test/mini_installer/*.py"

Prior to this change this command would use (on my many-core test
machine) 96 processes and would hang. How it uses just two processes
because there are only 16 files to analyze.

Output before:
  Pylint (16 files using ['--disable=cyclic-import'] on 96 cores)
Output after:
  Pylint (16 files using ['--disable=cyclic-import'] on 2 processes)

This is actually not quite true because the hang would prevent the
old message from being displayed.

Bug: 1190269, 1336854
Change-Id: Ie82baf91df4364a92eb664a00cf9daf167e0a548
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3711282
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
..
gstools
OWNERS autoninja: add simple test 3 years ago
PRESUBMIT.py
auth_test.py
autoninja_test.py autoninja: add simple test 3 years ago
bot_update_coverage_test.py Use pylint 2.7 for depot_tools 3 years ago
cipd_bootstrap_test.py
detect_host_arch_test.py
download_from_google_storage_unittest.py Skip 'ls' when downloading from gs. 3 years ago
fetch_test.py Reland "Update fetch protocol using --protocol-override flag" 3 years ago
fix_encoding_test.py Make fix_encoding_test py3 compatible 3 years ago
gclient_cipd_smoketest.py Override cipd install mode for runhooks 3 years ago
gclient_eval_unittest.py
gclient_git_mutates_smoketest.py
gclient_git_smoketest.py
gclient_paths_test.py
gclient_scm_test.py Remove duplicate sparse-checkout call. 3 years ago
gclient_smoketest.py
gclient_smoketest_base.py Use pylint 2.7 for depot_tools 3 years ago
gclient_test.py Reland "Update fetch protocol using --protocol-override flag" 3 years ago
gclient_transitions_smoketest.py
gclient_utils_test.py Update gclient cloning to work with cog. 3 years ago
gerrit_client_test.py
gerrit_util_test.py
git_cache_test.py
git_cl_creds_check_report.txt
git_cl_test.py Run presubmit checks without GerritAccessor if GERRIT_HOST is not set. 3 years ago
git_common_test.py Fix git_common_test.py: git checkout -tb -> git checkout -t -b 3 years ago
git_dates_test.py
git_find_releases_test.py Use pylint 2.7 for depot_tools 3 years ago
git_footers_test.py
git_hyper_blame_test.py
git_map_test.py
git_migrate_default_branch_test.py Use pylint 2.7 for depot_tools 3 years ago
git_number_test.py
git_rebase_update_test.py Fix depot_tools tests when running without py2 3 years ago
gsutil_test.py
lockfile_test.py
metrics_test.py
my_activity_test.py
ninjalog_uploader_test.py fix ninjalog_uploader.py 3 years ago
owners_client_test.py
owners_finder_test.py
owners_unittest.py
presubmit_unittest.py Mitigate Python 3 multiprocessing bug on Windows 3 years ago
rdb_wrapper_test.py
recipes_test.py add vpython3 to tests that run under vpython3 3 years ago
roll_dep_test.py
scm_unittest.py
split_cl_test.py
subcommand_test.py
subprocess2_test.py Use pylint 2.7 for depot_tools 3 years ago
upload_to_google_storage_unittest.py
utils_test.py Add a basic depot_tools version information 3 years ago
watchlists_unittest.py