[llvm] [llvm-lit][test][NFC] Moved cat command tests into separate lit test file (PR #102366)

Paul Kirth via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 9 11:16:29 PDT 2024


================
@@ -0,0 +1,83 @@
+# Check cat command with single file.
+#
+# RUN: rm -rf %T/testCat
----------------
ilovepi wrote:

I don't recall all the reasons, but it's easy to know that a test is 100% cleaned up if you see:
```
rm -rf %t && mkdir -p %t
```

There isn't much of a difference between doing that and:
```
rm -rf %T/dir_name && mkdir -p %T/dir_name
```
In the case you'd need multiple directories you do something like:
```
rm -rf %t && mkdir -p %t/dir_1 %t/dir_2 
```

You can't do the same `rm -rf` operation on `%T`, though, which is one of the reasons I think we moved away. If you search through discourse or the old mailing list archives, you should find the discussion. Or just look through the git blame for the documentation.

Also for clarity, I'm fine w/ @jh7370's suggestion about doing the %T cleanups separately.

https://github.com/llvm/llvm-project/pull/102366


More information about the llvm-commits mailing list