[Lldb-commits] [PATCH] D25486: Fix lookup path for lldb-mi
Chris Bieneman via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 11 14:08:05 PDT 2016
beanz created this revision.
beanz added reviewers: tfiala, zturner.
beanz added a subscriber: lldb-commits.
The test suite calls realpath on the lldb executable then append "-mi" to it to find the path of the lldb-mi executable. This does not work when using CMake builds on *nix platforms. On *nix platforms when a version number is set on executables CMake generates the binary as ${name}-${version} with a symlink named ${name} pointing to it.
This results in the lldb executable being named lldb-4.0.0, and since lldb-4.0.0-mi doesn't ever match the lldb-mi executable these tests are always disabled.
This patch looks for lldb-mi in the same directory as lldb.
https://reviews.llvm.org/D25486
Files:
packages/Python/lldbsuite/test/dotest.py
Index: packages/Python/lldbsuite/test/dotest.py
===================================================================
--- packages/Python/lldbsuite/test/dotest.py
+++ packages/Python/lldbsuite/test/dotest.py
@@ -673,16 +673,15 @@
# Assume lldb-mi is in same place as lldb
# If not found, disable the lldb-mi tests
- lldbMiExec = None
- if lldbtest_config.lldbExec and is_exe(lldbtest_config.lldbExec + "-mi"):
- lldbMiExec = lldbtest_config.lldbExec + "-mi"
- if not lldbMiExec:
+ lldbDir = os.path.dirname(lldbtest_config.lldbExec)
+ lldbMiExec = os.path.join(lldbDir, "lldb-mi")
+ if is_exe(lldbMiExec):
+ os.environ["LLDBMI_EXEC"] = lldbMiExec
+ else:
if not configuration.shouldSkipBecauseOfCategories(["lldb-mi"]):
print(
"The 'lldb-mi' executable cannot be located. The lldb-mi tests can not be run as a result.")
configuration.skipCategories.append("lldb-mi")
- else:
- os.environ["LLDBMI_EXEC"] = lldbMiExec
lldbPythonDir = None # The directory that contains 'lldb/__init__.py'
if configuration.lldbFrameworkPath:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25486.74292.patch
Type: text/x-patch
Size: 1143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20161011/c42d124e/attachment.bin>
More information about the lldb-commits
mailing list