Having tests that depend on clang inside llvm/ are not a good idea since
it can break incremental ninja check-llvm.
Fixes https://llvm.org/PR44798
Differential D74051
Move update_cc_test_checks.py tests to clang arichardson on Feb 5 2020, 7:56 AM. Authored by
Details Having tests that depend on clang inside llvm/ are not a good idea since Fixes https://llvm.org/PR44798
Diff Detail
Event TimelineComment Actions Unit tests: unknown. clang-tidy: pass. clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch. Build artifacts: clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project. Comment Actions Honestly, i very much don't like this. Comment Actions 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.) Comment Actions Are the other update_test_checks.py and update_llc_test_checks.py tests running on that bot? I would expect them to fail in the same way otherwise? Comment Actions Turns out those scripts use different code to write the updated file. The failure should hopefully be fixed in rGc29310707e9a85e70a226277657cd9d9182a5d04 Comment Actions This broke running clang tests stand-alone: Traceback (most recent call last): File "/var/tmp/portage/sys-devel/clang-11.0.0.9999/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-11.0.0.9999/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. Comment Actions Is that a supported build mode for clang?
I was under impression that it is exactly what this change did. Comment Actions 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. Comment Actions The update_cc_test_checks.py script depends on files in llvm/utils/UpdateTestChecks, so moving the script to clang doesn't help. Comment Actions Unpack llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} from LLVM while building Clang. |