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 @@ -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