diff --git a/test/cli/other_test.py b/test/cli/other_test.py index a5d4299b3cf5..829e9f2c7d75 100644 --- a/test/cli/other_test.py +++ b/test/cli/other_test.py @@ -195,17 +195,6 @@ def test_progress_j(tmpdir): assert stdout == "Checking {} ...\n".format(test_file) assert stderr == "" -def test_progress_proj_j(tmpdir): - args = ['--project=proj2/proj2.cppcheck', '-j2'] - - exitcode, stdout, stderr = cppcheck(args) - - progress_lines = '\n'.join(list(filter(lambda l: not l.startswith("Checking"), stdout.split('\n')))) - - assert (progress_lines == - "1/2 files checked 76% done\n" - "2/2 files checked 100% done\n") - assert exitcode == 0 def test_execute_addon_failure(tmpdir): test_file = os.path.join(tmpdir, 'test.cpp') diff --git a/test/cli/proj2_test.py b/test/cli/proj2_test.py index 89e7d8757bc9..b08320298b9b 100644 --- a/test/cli/proj2_test.py +++ b/test/cli/proj2_test.py @@ -80,6 +80,13 @@ def test_absolute_path(): assert stdout.find('Checking %s ...' % file1) >= 0 assert stdout.find('Checking %s ...' % file2) >= 0 +def test_progress_threads(): + create_compile_commands() + ret, stdout, _ = cppcheck(['--project=' + os.path.realpath('proj2/' + COMPILE_COMMANDS_JSON), '-j2']) + assert ret == 0, stdout + assert stdout.find('1/2 files checked 76% done') >= 0 + assert stdout.find('2/2 files checked 100% done') >= 0 + def test_gui_project_loads_compile_commands_1(): create_compile_commands() ret, stdout, _ = cppcheck(['--project=proj2/proj2.cppcheck'])