mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
test-backend: Run only one process for --rerun option.
This commit is contained in:
@@ -161,7 +161,7 @@ if __name__ == "__main__":
|
|||||||
type="int",
|
type="int",
|
||||||
callback=allow_positive_int,
|
callback=allow_positive_int,
|
||||||
action='callback',
|
action='callback',
|
||||||
default=4,
|
default=None,
|
||||||
help='Specify the number of processes to run the '
|
help='Specify the number of processes to run the '
|
||||||
'tests in. Default is 4.')
|
'tests in. Default is 4.')
|
||||||
parser.add_option('--profile', dest='profile',
|
parser.add_option('--profile', dest='profile',
|
||||||
@@ -210,6 +210,7 @@ if __name__ == "__main__":
|
|||||||
# --nonfatal-errors, so that we don't end up removing tests from
|
# --nonfatal-errors, so that we don't end up removing tests from
|
||||||
# the list that weren't run.
|
# the list that weren't run.
|
||||||
if options.rerun:
|
if options.rerun:
|
||||||
|
options.processes = 1
|
||||||
options.fatal_errors = False
|
options.fatal_errors = False
|
||||||
failed_tests = get_failed_tests()
|
failed_tests = get_failed_tests()
|
||||||
if failed_tests:
|
if failed_tests:
|
||||||
@@ -298,6 +299,9 @@ if __name__ == "__main__":
|
|||||||
generate_fixtures_command.append('--force')
|
generate_fixtures_command.append('--force')
|
||||||
subprocess.call(generate_fixtures_command)
|
subprocess.call(generate_fixtures_command)
|
||||||
|
|
||||||
|
if options.processes is None:
|
||||||
|
options.processes = 4
|
||||||
|
|
||||||
TestRunner = get_runner(settings)
|
TestRunner = get_runner(settings)
|
||||||
parallel = options.processes
|
parallel = options.processes
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user