[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add helpers for Template config (PR #138062)
Petr Hosek via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed May 7 00:10:10 PDT 2025
================
@@ -86,8 +87,16 @@ TEST(HTMLMustacheGeneratorTest, generateDocs) {
assert(G && "Could not find HTMLMustacheGenerator");
ClangDocContext CDCtx = getClangDocContext();
- StringRef RootDir = "";
- EXPECT_THAT_ERROR(G->generateDocs(RootDir, {}, CDCtx), Succeeded())
+ unittest::TempDir RootTestDirectory("generateDocsTest", /*Unique=*/true);
+ CDCtx.OutDirectory = RootTestDirectory.path();
+
+ // This seems wrong, but its unclear how else we would test this...
+ SmallString<128> AssetPath("../../../../../share/clang-doc");
+ llvm::sys::path::native(AssetPath);
+ getMustacheHtmlFiles(AssetPath, CDCtx);
----------------
petrhosek wrote:
Could you get the path from CMake? What I have in mind is generate a `config.h` file akin to what we do in [Clang](https://github.com/llvm/llvm-project/blob/52f568dbbb61ffe26b7973b482e0e504b405a0ab/clang/CMakeLists.txt#L886-L888) and other LLVM projects and put the relevant paths there.
https://github.com/llvm/llvm-project/pull/138062
More information about the llvm-branch-commits
mailing list