[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 08:24:53 PDT 2017


kubamracek updated this revision to Diff 106642.

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
@@ -695,7 +695,7 @@
     root, not test source root."""
     execpath = test.getExecPath()
     execdir,execbase = os.path.split(execpath)
-    tmpDir = os.path.join(execdir, 'Output')
+    tmpDir = os.path.join(execdir, 'Output', execbase + ".tmpdir")
     tmpBase = os.path.join(tmpDir, execbase)
     return tmpDir, tmpBase
 
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.106642.patch
Type: text/x-patch
Size: 1498 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170714/d43df67a/attachment.bin>


More information about the llvm-commits mailing list