Skip to content

Commit 524ef16

Browse files
authored
[clang-doc] Avoid reading files in unit tests (#141269)
In #138062 it was brought up that this was an anti-pattern. We'll need to Migrate all of the mustache unittests that need to read template files to lit tests, and disable them until tool support lands.
1 parent 5efd1ae commit 524ef16

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

clang-tools-extra/unittests/clang-doc/HTMLMustacheGeneratorTest.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,12 @@ TEST(HTMLMustacheGeneratorTest, generateDocs) {
9191
unittest::TempDir RootTestDirectory("generateDocsTest", /*Unique=*/true);
9292
CDCtx.OutDirectory = RootTestDirectory.path();
9393

94-
getMustacheHtmlFiles(CLANG_DOC_TEST_ASSET_DIR, CDCtx);
94+
// FIXME: We can't read files during unit tests. Migrate to lit once
95+
// tool support lands.
96+
// getMustacheHtmlFiles(CLANG_DOC_TEST_ASSET_DIR, CDCtx);
9597

9698
EXPECT_THAT_ERROR(G->generateDocs(RootTestDirectory.path(), {}, CDCtx),
97-
Succeeded())
99+
Failed())
98100
<< "Failed to generate docs.";
99101
}
100102

0 commit comments

Comments
 (0)