[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add helpers for Template config (PR #138062)

Paul Kirth via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue May 6 20:11:47 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);
----------------
ilovepi wrote:

This whole thing is such a big hack. I'm like 90% sure it will break outside of a Ninja build, and already seems to be tripping up Windows bots. I need to figure out some other way to get the template files loaded. 

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


More information about the llvm-branch-commits mailing list