Skip to content

Commit 80ca182

Browse files
authored
Do not halve the number of used cores in testing (#25201)
Do not halve the number of used cores if the user has explicitly specified the number of cores to use in testing. It is a bit silly to have to say `export EMTEST_CORES=128` to get 64 cores in actuality.
1 parent 474d925 commit 80ca182

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel_testsuite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ def python_multiprocessing_structures_are_buggy():
3333

3434

3535
def cap_max_workers_in_pool(max_workers, is_browser):
36-
if is_browser:
36+
if is_browser and 'EMTEST_CORES' not in os.environ and 'EMCC_CORES' not in os.environ:
3737
# TODO experiment with this number. In browser tests we'll be creating
3838
# a chrome instance per worker which is expensive.
39-
max_workers = int(max_workers / 2)
39+
max_workers = max_workers // 2
4040
# Python has an issue that it can only use max 61 cores on Windows: https://github.com/python/cpython/issues/89240
4141
if WINDOWS:
4242
return min(max_workers, 61)

0 commit comments

Comments
 (0)