[PATCH] D35396: [lit] Make %T return a per-test temporary directory

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 14 10:08:17 PDT 2017


kubamracek updated this revision to Diff 106658.

https://reviews.llvm.org/D35396

Files:
  docs/CommandGuide/lit.rst
  docs/TestingGuide.rst
  utils/lit/lit/TestRunner.py


Index: utils/lit/lit/TestRunner.py
===================================================================
--- utils/lit/lit/TestRunner.py
+++ utils/lit/lit/TestRunner.py
@@ -697,6 +697,7 @@
     execdir,execbase = os.path.split(execpath)
     tmpDir = os.path.join(execdir, 'Output')
     tmpBase = os.path.join(tmpDir, execbase)
+    tmpDir = os.path.join(tmpDir, execbase + ".tmpdir")
     return tmpDir, tmpBase
 
 def getDefaultSubstitutions(test, tmpDir, tmpBase, normalize_slashes=False):
Index: docs/TestingGuide.rst
===================================================================
--- docs/TestingGuide.rst
+++ docs/TestingGuide.rst
@@ -460,9 +460,10 @@
    Example: ``/home/user/llvm.build/test/MC/ELF/Output/foo_test.s.tmp``
 
 ``%T``
-   Directory of ``%t``.
+   Path to a temporary directory name that could be used for this test case.
+   The name won't conflict with other test cases.
 
-   Example: ``/home/user/llvm.build/test/MC/ELF/Output``
+   Example: ``/home/user/llvm.build/test/MC/ELF/Output/foo_test.s.tmpdir``
 
 ``%{pathsep}``
 
Index: docs/CommandGuide/lit.rst
===================================================================
--- docs/CommandGuide/lit.rst
+++ docs/CommandGuide/lit.rst
@@ -389,7 +389,7 @@
  %p         same as %S
  %{pathsep} path separator
  %t         temporary file name unique to the test
- %T         temporary directory unique to the test
+ %T         temporary directory name unique to the test
  %%         %
  ========== ==============
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35396.106658.patch
Type: text/x-patch
Size: 1494 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170714/f7292932/attachment.bin>


More information about the llvm-commits mailing list