Skip to content

Commit 7929f9b

Browse files
Do not run tests on multiprocessing
Fix process crashes on memeory consumed as some tests were being run on multiprocessing. Signed-off-by: Ayan Sinha Mahapatra <asmahapatra@aboutcode.org>
1 parent 2c19e16 commit 7929f9b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/scancode/cli_test_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def run_scan_click(
8787
expected_rc=0,
8888
env=None,
8989
retry=True,
90+
processes='-1',
9091
):
9192
"""
9293
Run a scan as a Click-controlled subprocess
@@ -104,6 +105,9 @@ def run_scan_click(
104105
if test_mode and '--test-mode' not in options:
105106
options.append('--test-mode')
106107

108+
if processes and '-n' not in options and '--processes' not in options:
109+
options.extend(['--processes', processes])
110+
107111
if monkeypatch:
108112
monkeypatch.setattr(click._termui_impl, 'isatty', lambda _: True)
109113
monkeypatch.setattr(shutil , 'get_terminal_size', lambda: (80, 43,))

0 commit comments

Comments
 (0)