[Lldb-commits] [PATCH] D25486: Fix lookup path for lldb-mi
beanz added inline comments. Comment at: packages/Python/lldbsuite/test/dotest.py:676-677 # 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): ki.stfu wrote: > Maybe it would be better to replace "lldb" with "lldb-mi" in > lldbtest_config.lldbExec? So we will take into account their versions instead > of ignoring them. That is a good idea, assuming the patch as-is doesn't break the world, I'll revise it to that to fix the Windows issue as well. Repository: rL LLVM https://reviews.llvm.org/D25486 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D25486: Fix lookup path for lldb-mi
This revision was automatically updated to reflect the committed changes. Closed by commit rL284041: Fix lookup path for lldb-mi (authored by cbieneman). Changed prior to commit: https://reviews.llvm.org/D25486?vs=74292=74429#toc Repository: rL LLVM https://reviews.llvm.org/D25486 Files: lldb/trunk/packages/Python/lldbsuite/test/dotest.py Index: lldb/trunk/packages/Python/lldbsuite/test/dotest.py === --- lldb/trunk/packages/Python/lldbsuite/test/dotest.py +++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py @@ -673,16 +673,17 @@ # 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: Index: lldb/trunk/packages/Python/lldbsuite/test/dotest.py === --- lldb/trunk/packages/Python/lldbsuite/test/dotest.py +++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py @@ -673,16 +673,17 @@ # 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: ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D25486: Fix lookup path for lldb-mi
ki.stfu added inline comments. Comment at: packages/Python/lldbsuite/test/dotest.py:676-677 # 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): Maybe it would be better to replace "lldb" with "lldb-mi" in lldbtest_config.lldbExec? So we will take into account their versions instead of ignoring them. https://reviews.llvm.org/D25486 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D25486: Fix lookup path for lldb-mi
zturner accepted this revision. zturner added a comment. This revision is now accepted and ready to land. Heh. It just occurred to me that this is probably the reason why all of the `lldb-mi` tests fail on Windows. Because `.exe` is not appended. I'm not ready to turn that on and deal with all the failures just yet, but for now can you please add a `#TODO` right above this that says `"Append .exe on Windows"` https://reviews.llvm.org/D25486 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D25486: Fix lookup path for lldb-mi
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: 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: ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits