diff options
author | Chris Bieneman <beanz@apple.com> | 2016-10-12 20:15:46 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2016-10-12 20:15:46 +0000 |
commit | 35e5457e0c7c15ae6448eef7d2c35c04a1928134 (patch) | |
tree | d24b444baf210e35212519d5052ad086b188373f /lldb/packages/Python/lldbsuite/test/dotest.py | |
parent | 46aafc16e8b6d5ab9700780a9b03568bef31f708 (diff) | |
download | bcm5719-llvm-35e5457e0c7c15ae6448eef7d2c35c04a1928134.tar.gz bcm5719-llvm-35e5457e0c7c15ae6448eef7d2c35c04a1928134.zip |
Fix lookup path for lldb-mi
Summary:
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.
Reviewers: zturner, tfiala
Subscribers: ki.stfu, enlight, lldb-commits
Differential Revision: https://reviews.llvm.org/D25486
llvm-svn: 284041
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/dotest.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index 9991a33ae86..4c19a2a2eb9 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -673,16 +673,17 @@ def setupSysPath(): # 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: + # TODO: Append .exe on Windows + # - this will be in a separate commit in case the mi tests fail horribly + 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: |