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 %% % ========== ============== 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: 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):