Having tests that depend on clang inside llvm/ are not a good idea since
it can break incremental ninja check-llvm.
arichardson on Feb 5 2020, 7:56 AM.Authored by
Unit tests: unknown.
clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.
That seems fine to me. Following that pattern, I think we should also move:
(We might want to move part of test/Index to test/tools/libclang and parts to test/tools/c-index-test, but we'd need to decide for each test whether it's a test for Clang's behavior, a test for libclang's wrapping behavior, or a test for the c-index-test tool itself. Let's leave that alone for now.)
This broke running clang tests stand-alone:
Traceback (most recent call last): File "/var/tmp/portage/sys-devel/clang-188.8.131.5299/work/x/y/clang-abi_x86_64.amd64/bin/../../llvm/utils/lit/lit/TestingConfig.py", line 89, in load_from_path exec(compile(data, path, 'exec'), cfg_globals, None) File "/var/tmp/portage/sys-devel/clang-184.108.40.20699/work/x/y/clang/test/utils/update_cc_test_checks/lit.local.cfg", line 21, in <module> assert os.path.isfile(script_path) AssertionError FAILED: test/CMakeFiles/check-clang
Obviously this fails when LLVM source tree is not available. If this is used only in clang, the script should be moved to clang as well.
Yes, and I don't see why that would change today.
My bad. In that case, the path needs to be updated to refer to clang source tree and not llvm's.
The update_cc_test_checks.py script depends on files in llvm/utils/UpdateTestChecks, so moving the script to clang doesn't help.