[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-07-03 Thread Justin Bogner via cfe-commits
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

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-22 Thread Nico Weber via cfe-commits
@@ -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

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-22 Thread Nico Weber via cfe-commits
@@ -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

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-19 Thread Paul Kirth via cfe-commits
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

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-18 Thread Paul Kirth via 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

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-14 Thread Paul Kirth via 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(

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -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 __

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-13 Thread Paul Kirth via cfe-commits
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

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-13 Thread Paul Kirth via cfe-commits
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

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-13 Thread Paul Kirth via cfe-commits
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 ___

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-13 Thread Paul Kirth via cfe-commits
@@ -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 "${

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-12 Thread via cfe-commits
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-

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-11 Thread via cfe-commits
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

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-11 Thread Petr Hosek via cfe-commits
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:/

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-07 Thread via cfe-commits
@@ -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

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-07 Thread via cfe-commits
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

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-07 Thread via 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

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-07 Thread via cfe-commits
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

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-07 Thread Paul Kirth via cfe-commits
@@ -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": "

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-07 Thread Paul Kirth via cfe-commits
@@ -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

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-07 Thread Paul Kirth via 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

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-07 Thread Paul Kirth via 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

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-07 Thread Paul Kirth via cfe-commits
@@ -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 `

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-07 Thread Paul Kirth via cfe-commits
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 ___

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-07 Thread Paul Kirth via cfe-commits
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

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-06 Thread via 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

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-06 Thread via cfe-commits
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-