diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-03-20 19:18:11 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-03-20 19:18:11 +0000 |
commit | 410c6c8fd5f07d7ae4bcd9175cb9b526d0c1e9a0 (patch) | |
tree | 4e52ca0f6a5e9b410dc7503384f64a81af19138a | |
parent | ce71989188b8aa289b7c1907b7810a36508d2be2 (diff) | |
download | bcm5719-llvm-410c6c8fd5f07d7ae4bcd9175cb9b526d0c1e9a0.tar.gz bcm5719-llvm-410c6c8fd5f07d7ae4bcd9175cb9b526d0c1e9a0.zip |
[lldb-dotest] Wrap arguments in single quotes
If we don't wrap arguments to the wrapper in single quotes, combined
arguments, for example for -E, don't reach dotest.py as a unit but as
separate arguments, causing the latter to fail.
llvm-svn: 328020
-rwxr-xr-x | lldb/test/lldb-dotest.in | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lldb/test/lldb-dotest.in b/lldb/test/lldb-dotest.in index b6a108025fb..08ae092d523 100755 --- a/lldb/test/lldb-dotest.in +++ b/lldb/test/lldb-dotest.in @@ -6,9 +6,13 @@ dotest_path = '@LLDB_SOURCE_DIR@/test/dotest.py' dotest_args = '@LLDB_DOTEST_ARGS_STR@' if __name__ == '__main__': + # Wrap arguments in single quotes. This is necessary because we want to + # forward the arguments and otherwise we might split up arguments that were + # originally wrapped in single quotes. + wrapper_args = list("'" + i + "'" for i in sys.argv[1:]) # FIXME: It would be nice if we can mimic the approach taken by llvm-lit # and pass a python configuration straight to dotest, rather than going # through the operating system. - command = '{} -q {} {}'.format(dotest_path, dotest_args, ' '.join( - sys.argv[1:])) + command = '{} -q {} {}'.format(dotest_path, dotest_args, + ' '.join(wrapper_args)) os.system(command) |