Skip to content
Snippets Groups Projects
Commit 12e18192 authored by Frederich Munch's avatar Frederich Munch Committed by Axel Naumann
Browse files

Lit: Use proper Windows paths for easier copy/paste.

parent fd176762
Branches
Tags
No related merge requests found
......@@ -9,6 +9,14 @@ import re
import lit.util
import lit.formats
if platform.system() == 'Windows':
# Use real Windows path separators so if a test fails, one can copy/paste cmds
def fixupPath(path):
return os.path.normpath(path)
else:
def fixupPath(path):
return path
# name: The name of this test suite.
config.name = 'Cling'
# Tweak PATH for Win32
......@@ -205,7 +213,7 @@ for pattern in [r"\bbugpoint\b(?!-)", r"(?<!/)\bclang\b(?!-)",
if os.path.exists(substitution_ext):
substitution = substitution_ext
break
config.substitutions.append((pattern, substitution))
config.substitutions.append((pattern, fixupPath(substitution)))
excludes = []
......@@ -237,7 +245,7 @@ def inferCling(PATH):
if lit_config.useValgrind:
config.target_triple += '-vg'
config.cling = inferCling(getattr(config, 'llvm_tools_dir', None)).replace('\\', '/')
config.cling = fixupPath(inferCling(getattr(config, 'llvm_tools_dir', None)))
if not lit_config.quiet:
lit_config.note('using cling: %r' % config.cling)
......@@ -247,7 +255,7 @@ if not os.getenv('CLING'):
# Add a substitution for the builds generated include dir before install
incDir = os.path.join(config.llvm_obj_root, 'tools', 'clang', 'include')
config.substitutions.append( ('%built_cling', config.cling + ' --nologo -I%s'
% os.path.normpath(incDir)) )
% fixupPath(incDir)) )
if not lit_config.quiet:
lit_config.note('Running tests from build tree')
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment