Skip to content

Commit 55844fb

Browse files
committed
Disable tests for ccls on Windows
The most recent binary available for ccls on Windows is 0.20220729 from chocolatey. This is an old version corresponding to LLVM-15 and crashes when parsing the test files.
1 parent b98d510 commit 55844fb

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

test/conftest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,10 @@ def _determine_disabled_languages() -> list[Language]:
299299
# Disable CPP_CCLS tests if ccls is not available
300300
ccls_tests_enabled = _sh.which("ccls") is not None
301301
if not ccls_tests_enabled:
302-
result.append(Language.CPP_CCLS)
302+
# Skip ccls tests on Windows since no recent binary is available and version
303+
# 0.20220729 from chocolatey crashes when parsing the test files.
304+
if not is_windows:
305+
result.append(Language.CPP_CCLS)
303306

304307
# Disable CPP (clangd) tests if clangd is not available
305308
clangd_tests_enabled = _sh.which("clangd") is not None

test/solidlsp/cpp/test_cpp_basic.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,11 @@
1616
from solidlsp import SolidLanguageServer
1717
from solidlsp.ls_config import Language
1818
from solidlsp.ls_utils import SymbolUtils
19-
from test.conftest import get_repo_path, start_ls_context
19+
from test.conftest import get_repo_path, language_tests_enabled, start_ls_context
2020
from test.solidlsp.conftest import format_symbol_for_assert, has_malformed_name, request_all_symbols
2121

22-
23-
def _ccls_available() -> bool:
24-
return shutil.which("ccls") is not None
25-
26-
2722
_cpp_servers: list[Language] = [Language.CPP]
28-
if _ccls_available():
23+
if language_tests_enabled(Language.CPP_CCLS):
2924
_cpp_servers.append(Language.CPP_CCLS)
3025

3126

0 commit comments

Comments
 (0)