running -test-index failed with clang version mismatch
ccls can only be built with llvm>=7.0, but the test-index seem still require llvm-6.00 Reproducing steps:
- build ccls with llvm-7.0
- run the following comand
./ccls -test-index
Index tests must be run using clang version 6.0.0, ccls is running with 7.1.0
System information
- ccls version (
git describe --tags --long): Head - clang version: 7.0
- OS: Debian
There is a version check. I haven't updated the tests for a while. I'll do one when clang 9.0.0 comes out.
// src/test.cc
static const char kRequiredClangVersion[] = "6.0.0";
if (version != kRequiredClangVersion &&
version.find("svn") == std::string::npos) {
fprintf(stderr,
"Index tests must be run using clang version %s, ccls is running "
"with %s\n",
kRequiredClangVersion, version.c_str());
return false;
}
I know it is not an important issue, but what about making the tests optional at build time? Or slightly better: moving them from ccls to a second executable (like ccls-index-tests)?
I know it is not an important issue, but what about making the tests optional at build time? Or slightly better: moving them from ccls to a second executable (like
ccls-index-tests)?
Agreed. A second executable, not built by the default all target, seems better...
As I'm not used to your project, what is your preference:
- a
main.ccin a dedicated directory "tests"; - rename
main.cctomain_server.ccfor the "ccls" executable and create amain_test_index.ccfor the "test-index" executable; - other?
best regards