-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[clang-doc] Avoid reading files in unit tests #141269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
@llvm/pr-subscribers-clang-tools-extra Author: Paul Kirth (ilovepi) ChangesIn #138062 it was brought up that this was an anti-pattern. We'll need Full diff: https://github.com/llvm/llvm-project/pull/141269.diff 1 Files Affected:
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.";
}
|
Thanks! Can we stop generating config.h from config.h.cmake again too? That should no longer be needed now. |
In llvm#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.
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.