Skip to content

Commit a2670b9

Browse files
committed
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
1 parent 23ce683 commit a2670b9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lldb/utils/lldb-dotest/lldb-dotest.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ llvm_tools_dir = "@LLVM_TOOLS_DIR_CONFIGURED@"
1616

1717
if __name__ == '__main__':
1818
wrapper_args = sys.argv[1:]
19-
dotest_args = dotest_args_str.split(';')
19+
dotest_args = []
20+
# split on an empty string will produce [''] and if you
21+
# add that to the command, it will be treated as a directory...
22+
if len(dotest_args_str) > 0:
23+
dotest_args = dotest_args_str.split(';')
2024
# Build dotest.py command.
2125
cmd = [sys.executable, dotest_path]
2226
cmd.extend(['--arch', arch])

0 commit comments

Comments
 (0)