https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/132101
The tests all remove the directory at test start, and it only prevents inspecting the test artifacts to remove them at the end of the test run. >From dfc4eaed7e1ae54774a53afcf67d50b074d0eaa7 Mon Sep 17 00:00:00 2001 From: Paul Kirth <paulki...@google.com> Date: Wed, 19 Mar 2025 20:58:15 +0000 Subject: [PATCH] [clang-doc][NFC] Remove unnecessary directory cleanup The tests all remove the directory at test start, and it only prevents inspecting the test artifacts to remove them at the end of the test run. --- clang-tools-extra/test/clang-doc/single-file-public.cpp | 4 +--- clang-tools-extra/test/clang-doc/single-file.cpp | 4 +--- clang-tools-extra/test/clang-doc/test-path-abs.cpp | 6 +++--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/clang-tools-extra/test/clang-doc/single-file-public.cpp b/clang-tools-extra/test/clang-doc/single-file-public.cpp index 82e81749a1c52..d22ccb6698403 100644 --- a/clang-tools-extra/test/clang-doc/single-file-public.cpp +++ b/clang-tools-extra/test/clang-doc/single-file-public.cpp @@ -1,5 +1,4 @@ -// RUN: rm -rf %t -// RUN: mkdir %t +// RUN: rm -rf %t && mkdir -p %t // RUN: echo "" > %t/compile_flags.txt // RUN: cp "%s" "%t/test.cpp" // RUN: clang-doc --doxygen --public --executor=standalone -p %t %t/test.cpp -output=%t/docs @@ -7,7 +6,6 @@ // (which we don't know in advance). This checks the record file by searching // for a name with a 40-char USR name. // RUN: find %t/docs -regex ".*/[0-9A-F]*.yaml" -exec cat {} ";" | FileCheck %s --check-prefix=CHECK -// RUN: rm -rf %t class Record { private: diff --git a/clang-tools-extra/test/clang-doc/single-file.cpp b/clang-tools-extra/test/clang-doc/single-file.cpp index 211afb3b45e52..6fde13c7f510d 100644 --- a/clang-tools-extra/test/clang-doc/single-file.cpp +++ b/clang-tools-extra/test/clang-doc/single-file.cpp @@ -1,10 +1,8 @@ -// RUN: rm -rf %t -// RUN: mkdir %t +// RUN: rm -rf %t && mkdir -p %t // RUN: echo "" > %t/compile_flags.txt // RUN: cp "%s" "%t/test.cpp" // RUN: clang-doc --doxygen --executor=standalone -p %t %t/test.cpp -output=%t/docs // RUN: cat %t/docs/index.yaml | FileCheck %s --check-prefix=CHECK -// RUN: rm -rf %t void function(int x); diff --git a/clang-tools-extra/test/clang-doc/test-path-abs.cpp b/clang-tools-extra/test/clang-doc/test-path-abs.cpp index f6cce95bbea0c..292a2a3b5474d 100644 --- a/clang-tools-extra/test/clang-doc/test-path-abs.cpp +++ b/clang-tools-extra/test/clang-doc/test-path-abs.cpp @@ -1,6 +1,6 @@ -// RUN: rm -rf %t && mkdir %t +// RUN: rm -rf %t && mkdir -p %t // RUN: clang-doc --format=html --executor=standalone %s --output=%t // RUN: FileCheck %s -input-file=%t/index_json.js -check-prefix=JSON-INDEX -// RUN: rm -rf %t -// JSON-INDEX: var RootPath = "{{.*}}test-path-abs.cpp.tmp"; \ No newline at end of file +// JSON-INDEX: var RootPath = "{{.*}}test-path-abs.cpp.tmp"; + _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits