Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue25285

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:regrtest: run tests in subprocesses with -j1 on buildbots
Type:Stage:
Components:TestsVersions:Python 3.6
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: Arfrever, vstinner
Priority:normalKeywords:patch

Created on2015-09-30 20:36 byvstinner, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
regrtest_run_in_subprocess.patchvstinner,2015-09-30 20:36review
Messages (2)
msg251962 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2015-09-30 20:36
Currently, regrtest ignores the -j1 parameter. For -jN, the multiprocess mode is only enabled for N != 1. I propose to modify regrtest to run tests in subprocesses when -j1 is used. It would solve the issue#18906.I also want to run tests in subprocesses in buildbot to better isolate tests. Running all tests in the same process, sequentially, cause various issues:* various kinds of side effects* memory leaks* random failures (unreliable tests)"make buildbot" already runs regrtest with -j1. I propose to also modifyTools/buildbot/test.bat to use run tests with -j1 by default on Windows.I fixed regrtest to setup tests using the same code for classic mode and multiprocess mode: slaves (child processes running tests for regrtest -jN) now inherit--memlimit/-M, --threshold/-t and --nowindows/-n options.Only 3 remaining functions are incompatible with -jN: --coverage/-T and --findleaks/-l.Finally, the multiprocess mode of regrtest now displays the duration of tests which took longer than 30 seconds, and every minute, it displays the tests running since longer than 30 seconds. Example with multiple workers (-j4):---...[395/399/1] test_mimetypes -- running: test_lzma (111 sec), test_multiprocessing_forkserver (224 sec)[396/399/1] test_poplib -- running: test_lzma (111 sec), test_multiprocessing_forkserver (225 sec)[397/399/1] test_lzma (111 sec) -- running: test_multiprocessing_forkserver (225 sec)[398/399/1] test_range -- running: test_multiprocessing_forkserver (227 sec)running: test_multiprocessing_forkserver (287 sec)[399/399/1] test_multiprocessing_forkserver (340 sec)378 tests OK.---Note: "python -m test -j1 -j4" uses 4 workers, only the last -jN parameter is used. Some buildbots add -jN to use more workers.
msg265936 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2016-05-20 11:42
changeset:   101449:6f7e5b51c8fbuser:        Victor Stinner <victor.stinner@gmail.com>date:        Fri May 20 13:15:55 2016 +0200files:Lib/test/libregrtest/cmdline.pyMisc/NEWSTools/buildbot/test.batdescription:regrtest doesn't ignore -j1 anymore* regrtest now uses subprocesses when the -j1 command line option  is used: each test file runs in a fresh child process. Before, the -j1 option  was ignored.*Tools/buildbot/test.bat script now uses -j1 by default to run  each test file in fresh child process.
History
DateUserActionArgs
2022-04-11 14:58:22adminsetgithub: 69472
2016-05-20 11:42:12vstinnersetstatus: open -> closed
resolution: fixed
messages: +msg265936
2015-10-12 12:21:48Arfreversetnosy: +Arfrever
2015-09-30 20:36:29vstinnersetfiles: +regrtest_run_in_subprocess.patch
keywords: +patch
2015-09-30 20:36:02vstinnercreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp