bogner wrote:
This test fails on multi-config cmake generators (`cmake -G 'Visual Studio`
etc), exposing an existing bug in clang-doc. Since binaries end up under a
subdirectory like `build/Release/bin` but the default json and such end up in
`build/share/clang-doc`, running `clang-doc` from t
@@ -0,0 +1,21 @@
+#include "Calculator.h"
+#include
nico wrote:
Tests must be freestanding and cannot include system headers.
https://github.com/llvm/llvm-project/pull/93928
___
cfe-commits mailing list
cfe-commits@li
@@ -0,0 +1,358 @@
+// RUN: rm -rf %t && mkdir -p %t/docs %t/build
+// RUN: sed 's|$test_dir|%/S|g' %S/Inputs/basic-project/database_template.json
> %t/build/compile_commands.json
+// RUN: clang-doc --format=html --output=%t/docs --executor=all-TUs
%t/build/compile_commands.json
https://github.com/ilovepi closed
https://github.com/llvm/llvm-project/pull/93928
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ilovepi approved this pull request.
https://github.com/llvm/llvm-project/pull/93928
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -299,8 +299,7 @@ Example usage for a project using a compile commands
database:
llvm::outs() << "Generating assets for docs...\n";
Err = G->get()->createResources(CDCtx);
if (Err) {
-llvm::errs() << toString(std::move(Err)) << "\n";
-return 1;
+llvm::outs(
@@ -0,0 +1,358 @@
+// RUN: rm -rf %t && mkdir -p %t/docs && mkdir -p %t/build
ilovepi wrote:
```suggestion
// RUN: rm -rf %t && mkdir -p %t/docs %t/build
```
you don't need to run `mkdir` twice.
https://github.com/llvm/llvm-project/pull/93928
__
ilovepi wrote:
Petr and I spoke offline. https://github.com/llvm/llvm-project/pull/95187, is
still independently useful, since it matches our normal conventions about the
build directory matching the install directory.
I think we agree on it not being a fatal error, though if it can generate
https://github.com/ilovepi commented:
Also, I'm not sure I understand the need for empty files. If we don't need
them, then lets remove them. If you need to use an empty file for some test,
you can create those w/ `touch` in the test itself, but I don't see those
referenced at all in `basic-pr
https://github.com/ilovepi commented:
The files in the `Input` folder don't need a `clang-doc` prefix. They're
already under `test/clang-doc`
I'd also suggest renaming the folder from `project1` to something like
`basic-project`.
https://github.com/llvm/llvm-project/pull/93928
___
@@ -25,3 +25,11 @@ install(FILES ../assets/clang-doc-default-stylesheet.css
install(FILES ../assets/index.js
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
COMPONENT clang-doc)
+
+add_custom_target(copy-clang-doc-assets
+COMMAND ${CMAKE_COMMAND} -E copy_directory
"${
PeterChou1 wrote:
I think this finally works i think we could also shelve
https://github.com/llvm/llvm-project/pull/94717
since I wrote that pr to get around the fact that we can't copy assets
https://github.com/llvm/llvm-project/pull/93928
___
cfe-
PeterChou1 wrote:
> Do we really need a full CSS when we're only checking the HTML? Could we just
> include a super minimal (or even empty) CSS?
I just realize we probably don't need any css or js we just need the files
https://github.com/llvm/llvm-project/pull/93928
petrhosek wrote:
Do we really need a full CSS when we're only checking the HTML? Could we just
include a super minimal (or even empty) CSS?
https://github.com/llvm/llvm-project/pull/93928
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:/
@@ -0,0 +1,17 @@
+[
+ {
+"directory": "$test_dir/build",
PeterChou1 wrote:
I tried getting relative paths to work but it didn't seem to work
https://github.com/llvm/llvm-project/pull/93928
___
cfe-commits mailing
https://github.com/PeterChou1 edited
https://github.com/llvm/llvm-project/pull/93928
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,361 @@
+// RUN: rm -rf %t && mkdir -p %t/build %t/include %t/src %t/docs
+// RUN: sed 's|$test_dir|%/t|g'
%S/Inputs/clang-doc-project1/database_template.json >
%t/build/compile_commands.json
+// RUN: cp %S/Inputs/clang-doc-project1/*.h %t/include
+// RUN: cp %S/Input
https://github.com/PeterChou1 updated
https://github.com/llvm/llvm-project/pull/93928
>From 219df1820de43696dd51268f1aa22c397846c0a6 Mon Sep 17 00:00:00 2001
From: PeterChou1
Date: Fri, 7 Jun 2024 01:47:15 -0400
Subject: [PATCH 1/2] [clang-doc] add basic e2e test
---
.../Inputs/clang-doc-defa
@@ -0,0 +1,17 @@
+[
+ {
+"directory": "$test_dir/build",
ilovepi wrote:
Would the following work? It would be really nice if we could make this operate
w/o the `sed` command.
```suggestion
"directory": "./build",
```
or
```suggestion
"directory": "
@@ -0,0 +1,17 @@
+[
+ {
+"directory": "$test_dir/build",
+"command": "clang++ -o Calculator.o -I../include
$test_dir/src/Calculator.cpp",
ilovepi wrote:
```suggestion
"command": "clang++ -o Calculator.o -I../include ../src/Calculator.cpp",
```
This
@@ -0,0 +1,361 @@
+// RUN: rm -rf %t && mkdir -p %t/build %t/include %t/src %t/docs
+// RUN: sed 's|$test_dir|%/t|g'
%S/Inputs/clang-doc-project1/database_template.json >
%t/build/compile_commands.json
+// RUN: cp %S/Inputs/clang-doc-project1/*.h %t/include
+// RUN: cp %S/Input
@@ -0,0 +1,361 @@
+// RUN: rm -rf %t && mkdir -p %t/build %t/include %t/src %t/docs
+// RUN: sed 's|$test_dir|%/t|g'
%S/Inputs/clang-doc-project1/database_template.json >
%t/build/compile_commands.json
+// RUN: cp %S/Inputs/clang-doc-project1/*.h %t/include
+// RUN: cp %S/Input
@@ -0,0 +1,361 @@
+// RUN: rm -rf %t && mkdir -p %t/build %t/include %t/src %t/docs
ilovepi wrote:
I think this is a `.cp` file because it used to hold `main()`, right? Probably
just `basic-project.test` is fine. or `shape-project.test`. It's typical to use
a `
https://github.com/ilovepi commented:
This is getting pretty close, but there's a few things I'd like to iron out
before landing. Plus I believe this has a dependency on the `--assets` flag
changes.
https://github.com/llvm/llvm-project/pull/93928
___
https://github.com/ilovepi edited
https://github.com/llvm/llvm-project/pull/93928
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
PeterChou1 wrote:
I split the PR into 2 this PR relies on
https://github.com/llvm/llvm-project/pull/94717
https://github.com/llvm/llvm-project/pull/93928
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/li
https://github.com/PeterChou1 updated
https://github.com/llvm/llvm-project/pull/93928
>From 219df1820de43696dd51268f1aa22c397846c0a6 Mon Sep 17 00:00:00 2001
From: PeterChou1
Date: Fri, 7 Jun 2024 01:47:15 -0400
Subject: [PATCH] [clang-doc] add basic e2e test
---
.../Inputs/clang-doc-default-
27 matches
Mail list logo