summaryrefslogtreecommitdiff
path: root/Test/lit.site.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'Test/lit.site.cfg')
-rw-r--r--Test/lit.site.cfg16
1 files changed, 15 insertions, 1 deletions
diff --git a/Test/lit.site.cfg b/Test/lit.site.cfg
index e103edde..de51b761 100644
--- a/Test/lit.site.cfg
+++ b/Test/lit.site.cfg
@@ -56,6 +56,18 @@ config.environment['PYTHON_EXECUTABLE'] = getattr(config, 'python_executable', '
if config.test_exec_root is None:
lit_config.fatal('Could not determine execution root for tests!')
+"""
+ Function for quoting filepaths
+ so that if they contain spaces
+ lit's shell interpreter will
+ treat the path as a single argument
+"""
+def quotePath(path):
+ if ' ' in path:
+ return '"{path}"'.format(path=path)
+ else:
+ return path
+
### Add Boogie specific substitutions
# Find Boogie.exe
@@ -71,6 +83,8 @@ boogieExecutable = os.path.join( binaryDir, 'Boogie.exe')
if not os.path.exists(boogieExecutable):
lit_config.fatal('Could not find Boogie.exe at {}'.format(boogieExecutable))
+boogieExecutable = quotePath(boogieExecutable)
+
if os.name == 'posix':
boogieExecutable = 'mono ' + boogieExecutable
if lit.util.which('mono') == None:
@@ -116,7 +130,7 @@ diffExecutable = None
if os.name == 'posix':
diffExecutable = 'diff' + commonDiffFlags
elif os.name == 'nt':
- pydiff = os.path.join(config.test_source_root, 'pydiff.py')
+ pydiff = quotePath( os.path.join(config.test_source_root, 'pydiff.py') )
diffExecutable = sys.executable + ' ' + pydiff + commonDiffFlags
else:
lit_config.fatal('Unsupported platform')