Skip to content

[clang-doc][NFC] Remove unnecessary directory cleanup #132101

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

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

ilovepi
Copy link
Contributor

@ilovepi ilovepi commented Mar 19, 2025

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.

@llvmbot
Copy link
Member

llvmbot commented Mar 19, 2025

@llvm/pr-subscribers-clang-tools-extra

Author: Paul Kirth (ilovepi)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/132101.diff

3 Files Affected:

  • (modified) clang-tools-extra/test/clang-doc/single-file-public.cpp (+1-3)
  • (modified) clang-tools-extra/test/clang-doc/single-file.cpp (+1-3)
  • (modified) clang-tools-extra/test/clang-doc/test-path-abs.cpp (+3-3)
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";
+

@ilovepi ilovepi requested review from PeterChou1 and petrhosek March 19, 2025 21:57
@ilovepi ilovepi force-pushed the users/ilovepi/clang-doc-extra-cmd branch from dfc4eae to 3f09b51 Compare March 19, 2025 23:03
@ilovepi ilovepi force-pushed the users/ilovepi/clang-doc-fix-optional branch from ea33858 to a19fa75 Compare March 19, 2025 23:16
@ilovepi ilovepi force-pushed the users/ilovepi/clang-doc-extra-cmd branch from 3f09b51 to 86c3dc2 Compare March 19, 2025 23:16
@ilovepi ilovepi force-pushed the users/ilovepi/clang-doc-fix-optional branch from a19fa75 to d7fe558 Compare March 19, 2025 23:46
@ilovepi ilovepi force-pushed the users/ilovepi/clang-doc-extra-cmd branch from 86c3dc2 to df32792 Compare March 19, 2025 23:46
@ilovepi ilovepi force-pushed the users/ilovepi/clang-doc-fix-optional branch from d7fe558 to bc2b1ec Compare March 19, 2025 23:47
@ilovepi ilovepi force-pushed the users/ilovepi/clang-doc-extra-cmd branch 2 times, most recently from 9f1a589 to c857982 Compare March 20, 2025 00:55
@ilovepi ilovepi force-pushed the users/ilovepi/clang-doc-fix-optional branch from bc2b1ec to 215f9a3 Compare March 20, 2025 00:55
Copy link
Contributor Author

ilovepi commented Mar 20, 2025

Merge activity

  • Mar 20, 5:02 PM EDT: A user started a stack merge that includes this pull request via Graphite.
  • Mar 20, 5:05 PM EDT: Graphite rebased this pull request as part of a merge.
  • Mar 20, 5:08 PM EDT: A user merged this pull request with Graphite.

@ilovepi ilovepi force-pushed the users/ilovepi/clang-doc-fix-optional branch from 215f9a3 to b1653a1 Compare March 20, 2025 21:03
Base automatically changed from users/ilovepi/clang-doc-fix-optional to main March 20, 2025 21:05
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.
@ilovepi ilovepi force-pushed the users/ilovepi/clang-doc-extra-cmd branch from c857982 to b00e1c8 Compare March 20, 2025 21:05
@ilovepi ilovepi merged commit 3923a6b into main Mar 20, 2025
6 of 10 checks passed
@ilovepi ilovepi deleted the users/ilovepi/clang-doc-extra-cmd branch March 20, 2025 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants