Skip to content

Commit ece352f

Browse files
[lldb] fix tests with spaces in command path
1 parent e665925 commit ece352f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/utils/lit/lit/llvm/subst.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import re
3+
import shlex
34

45
import lit.util
56

@@ -118,6 +119,8 @@ def resolve(self, config, search_dirs):
118119
command_str = str(self.command)
119120

120121
if command_str:
122+
# A command path with spaces will fail to be parsed by ShParser if they are not quoted.
123+
command_str = shlex.quote(command_str)
121124
if self.extra_args:
122125
command_str = " ".join([command_str] + self.extra_args)
123126
else:

0 commit comments

Comments
 (0)