[clang-tools-extra] [llvm] Clang doc test (PR #93928)

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Fri May 31 11:46:39 PDT 2024


================
@@ -0,0 +1,22 @@
+[
+{
+  "directory": "$test_dir/build",
----------------
ilovepi wrote:

can't this just be "."? then everything is relative to that dir? if necessary you can `cd %t` to run commands in that dir. Subsequent test files run by `lit` will start from the build dir, so you don't have to cd back. It is generally nicer to have commands that can be run directly from the build dir, but its better to have easy to understand tests (and any tests at all) than to get bogged down with a minor detail like that. We can always file a bug to track that improvement as well.

You can see something similar to what I've suggested in `clang-tools-extra/test/clang-tidy/infrastructure/run-clang-tidy.cpp`.

Getting rid of `test_dir` should also mean you don't need that `sed` command.  

https://github.com/llvm/llvm-project/pull/93928


More information about the cfe-commits mailing list