jingham created this revision.
jingham added reviewers: JDevlieghere, kastiglione, aprantl, labath.
Herald added a project: All.
jingham requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
When - after substitution - the dotest_args_str is empty, then we were still
inserting the blank string into the args. Later on, a blank arg is taken to be
a directory path and gets added to the CWD (which is generally in the build
directory) and then none of the actual test directories match that, so we find
no tests.
This patch fixes that by not adding blank arguments in lldb-dotest.
It could also be fixed by having the dotest implementation discard empty
arguments, but I wasn't sure that was always correct, maybe you are somewhere
in the test suite already and want to pass "" to dial up the current directory?
So I went with fixing it where we were getting it wrong instead.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D133075
Files:
lldb/utils/lldb-dotest/lldb-dotest.in
Index: lldb/utils/lldb-dotest/lldb-dotest.in
===================================================================
--- lldb/utils/lldb-dotest/lldb-dotest.in
+++ lldb/utils/lldb-dotest/lldb-dotest.in
@@ -20,7 +20,10 @@
# Build dotest.py command.
cmd = [sys.executable, dotest_path]
cmd.extend(['--arch', arch])
- cmd.extend(dotest_args)
+ # Don't stick empty args into the command, they will get interpreted as
+ # test path directories and override the default searching.
+ if len(dotest_args) > 0:
+ cmd.extend(dotest_args)
cmd.extend(['--build-dir', lldb_build_dir])
cmd.extend(['--executable', executable])
cmd.extend(['--compiler', compiler])
Index: lldb/utils/lldb-dotest/lldb-dotest.in
===================================================================
--- lldb/utils/lldb-dotest/lldb-dotest.in
+++ lldb/utils/lldb-dotest/lldb-dotest.in
@@ -20,7 +20,10 @@
# Build dotest.py command.
cmd = [sys.executable, dotest_path]
cmd.extend(['--arch', arch])
- cmd.extend(dotest_args)
+ # Don't stick empty args into the command, they will get interpreted as
+ # test path directories and override the default searching.
+ if len(dotest_args) > 0:
+ cmd.extend(dotest_args)
cmd.extend(['--build-dir', lldb_build_dir])
cmd.extend(['--executable', executable])
cmd.extend(['--compiler', compiler])
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits