Index: utils/lit/lit/TestRunner.py =================================================================== --- utils/lit/lit/TestRunner.py +++ utils/lit/lit/TestRunner.py @@ -568,6 +568,24 @@ ('%/t', tmpBase.replace('\\', '/') + '.tmp'), ('%/T', tmpDir.replace('\\', '/')), ]) + + # "%:[STpst]" are paths without Windows drive letters. + if kIsWindows: + substitutions.extend([ + ('%:s', re.sub(r'^.:', '', sourcepath)), + ('%:S', re.sub(r'^.:', '', sourcedir)), + ('%:p', re.sub(r'^.:', '', sourcedir)), + ('%:t', re.sub(r'^.:', '', tmpBase) + '.tmp'), + ('%:T', re.sub(r'^.:', '', tmpDir)), + ]) + else: + substitutions.extend([ + ('%:s', sourcepath), + ('%:S', sourcedir), + ('%:p', sourcedir), + ('%:t', tmpBase + '.tmp'), + ('%:T', tmpDir), + ]) return substitutions def applySubstitutions(script, substitutions):