keith updated this revision to Diff 411573. keith added a comment. Herald added subscribers: llvm-commits, delcypher. Herald added a project: LLVM.
Move config to llvm lit config, add docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111457/new/ https://reviews.llvm.org/D111457 Files: llvm/docs/CommandGuide/lit.rst llvm/docs/TestingGuide.rst llvm/utils/lit/lit/TestRunner.py Index: llvm/utils/lit/lit/TestRunner.py =================================================================== --- llvm/utils/lit/lit/TestRunner.py +++ llvm/utils/lit/lit/TestRunner.py @@ -1119,6 +1119,14 @@ ('%basename_t', baseName), ('%T', tmpDir)]) + fs_root = os.path.sep + if kIsWindows: + fs_root = 'C:\\' + substitutions.extend([ + ('%{fsroot}', fs_root), + ('%{fssep}', os.path.sep), + ]) + # "%/[STpst]" should be normalized. substitutions.extend([ ('%/s', sourcepath.replace('\\', '/')), Index: llvm/docs/TestingGuide.rst =================================================================== --- llvm/docs/TestingGuide.rst +++ llvm/docs/TestingGuide.rst @@ -569,6 +569,13 @@ Expands to the path separator, i.e. ``:`` (or ``;`` on Windows). +``${fsroot}`` + Expands to the root component of file system paths, i.e. ``/`` on Unix + systems or ``C:\`` on Windows. + +``${fssep}`` + Exp``ands to the file system separator, i.e. ``/`` or ``\`` on Windows. + ``%/s, %/S, %/t, %/T:`` Act like the corresponding substitution above but replace any ``\`` Index: llvm/docs/CommandGuide/lit.rst =================================================================== --- llvm/docs/CommandGuide/lit.rst +++ llvm/docs/CommandGuide/lit.rst @@ -523,6 +523,8 @@ %S source dir (directory of the file currently being run) %p same as %S %{pathsep} path separator + %{fsroot} root component of file system paths + %{fssep} file system path separator %t temporary file name unique to the test %basename_t The last path component of %t but without the ``.tmp`` extension %T parent directory of %t (not unique, deprecated, do not use)
Index: llvm/utils/lit/lit/TestRunner.py =================================================================== --- llvm/utils/lit/lit/TestRunner.py +++ llvm/utils/lit/lit/TestRunner.py @@ -1119,6 +1119,14 @@ ('%basename_t', baseName), ('%T', tmpDir)]) + fs_root = os.path.sep + if kIsWindows: + fs_root = 'C:\\' + substitutions.extend([ + ('%{fsroot}', fs_root), + ('%{fssep}', os.path.sep), + ]) + # "%/[STpst]" should be normalized. substitutions.extend([ ('%/s', sourcepath.replace('\\', '/')), Index: llvm/docs/TestingGuide.rst =================================================================== --- llvm/docs/TestingGuide.rst +++ llvm/docs/TestingGuide.rst @@ -569,6 +569,13 @@ Expands to the path separator, i.e. ``:`` (or ``;`` on Windows). +``${fsroot}`` + Expands to the root component of file system paths, i.e. ``/`` on Unix + systems or ``C:\`` on Windows. + +``${fssep}`` + Exp``ands to the file system separator, i.e. ``/`` or ``\`` on Windows. + ``%/s, %/S, %/t, %/T:`` Act like the corresponding substitution above but replace any ``\`` Index: llvm/docs/CommandGuide/lit.rst =================================================================== --- llvm/docs/CommandGuide/lit.rst +++ llvm/docs/CommandGuide/lit.rst @@ -523,6 +523,8 @@ %S source dir (directory of the file currently being run) %p same as %S %{pathsep} path separator + %{fsroot} root component of file system paths + %{fssep} file system path separator %t temporary file name unique to the test %basename_t The last path component of %t but without the ``.tmp`` extension %T parent directory of %t (not unique, deprecated, do not use)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits