Having tests that depend on clang inside llvm/ are not a good idea since
it can break incremental ninja check-llvm.
Script: -- : 'RUN: at line 1'; llvm-go test llvm.org/llvm/bindings/go/llvm
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-184.108.40.20699/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-220.127.116.1199/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.
If this is used only in clang, the script should be moved to clang as well.
I was under impression that it is exactly what this change did.
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.
I assumed that having clang as part of the monorepo meant llvm would be available.
I building a tarball of only the clang source directory is supported, then we should skip the clang/tests/utils/update_cc_test_checks tests subdirectory if LLVM sources are not available.