https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/141269
In #138062 it was brought up that this was an anti-pattern. We'll need to Migrate all of the mustache unittests to lit tests, and disable them until tool support lands. >From a675e0827d8bee1cfff9e095bc7eb394f520331c Mon Sep 17 00:00:00 2001 From: Paul Kirth <paulki...@google.com> Date: Fri, 23 May 2025 10:59:22 -0700 Subject: [PATCH] [clang-doc] Avoid reading files in unit tests In #138062 it was brought up that this was an anti-pattern. We'll need to Migrate all of the mustache unittests to lit tests, and disable them until tool support lands. --- .../unittests/clang-doc/HTMLMustacheGeneratorTest.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clang-tools-extra/unittests/clang-doc/HTMLMustacheGeneratorTest.cpp b/clang-tools-extra/unittests/clang-doc/HTMLMustacheGeneratorTest.cpp index 70491f0754b3d..4c8cf4fa7e460 100644 --- a/clang-tools-extra/unittests/clang-doc/HTMLMustacheGeneratorTest.cpp +++ b/clang-tools-extra/unittests/clang-doc/HTMLMustacheGeneratorTest.cpp @@ -91,10 +91,12 @@ TEST(HTMLMustacheGeneratorTest, generateDocs) { unittest::TempDir RootTestDirectory("generateDocsTest", /*Unique=*/true); CDCtx.OutDirectory = RootTestDirectory.path(); - getMustacheHtmlFiles(CLANG_DOC_TEST_ASSET_DIR, CDCtx); + // FIXME: We can't read files during unit tests. Migrate to lit once + // tool support lands. + // getMustacheHtmlFiles(CLANG_DOC_TEST_ASSET_DIR, CDCtx); EXPECT_THAT_ERROR(G->generateDocs(RootTestDirectory.path(), {}, CDCtx), - Succeeded()) + Failed()) << "Failed to generate docs."; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits