aboutsummaryrefslogtreecommitdiff
path: root/lldb/utils
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2022-08-31 18:00:18 -0700
committerJim Ingham <jingham@apple.com>2022-08-31 18:00:18 -0700
commita2670b92a2542a9bb889db81ba0cf5a21b3240ee (patch)
tree5acc502d751664147be197625d5bbdba474e8a88 /lldb/utils
parent23ce683eea358f0cf82ef51692bba6c86ffcf4a8 (diff)
downloadllvm-a2670b92a2542a9bb889db81ba0cf5a21b3240ee.zip
llvm-a2670b92a2542a9bb889db81ba0cf5a21b3240ee.tar.gz
llvm-a2670b92a2542a9bb889db81ba0cf5a21b3240ee.tar.bz2
Fix a bug in lldb-dotest that was uncovered by setting no value for dotest_args_str.
We were splitting the string, and adding that array to cmd. But split generated [''] which shows up later on as an empty "test directory search path". That got extended to the CWD + "" which generally doesn't have any tests, so lldb-dotest -p SomeRealTest.py would fail with a no matching tests error. Differential Revision: https://reviews.llvm.org/D133075
Diffstat (limited to 'lldb/utils')
-rwxr-xr-xlldb/utils/lldb-dotest/lldb-dotest.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/utils/lldb-dotest/lldb-dotest.in b/lldb/utils/lldb-dotest/lldb-dotest.in
index f6b5e0d..896cc13 100755
--- a/lldb/utils/lldb-dotest/lldb-dotest.in
+++ b/lldb/utils/lldb-dotest/lldb-dotest.in
@@ -16,7 +16,11 @@ llvm_tools_dir = "@LLVM_TOOLS_DIR_CONFIGURED@"
if __name__ == '__main__':
wrapper_args = sys.argv[1:]
- dotest_args = dotest_args_str.split(';')
+ dotest_args = []
+ # split on an empty string will produce [''] and if you
+ # add that to the command, it will be treated as a directory...
+ if len(dotest_args_str) > 0:
+ dotest_args = dotest_args_str.split(';')
# Build dotest.py command.
cmd = [sys.executable, dotest_path]
cmd.extend(['--arch', arch])