Commit aed01c76 authored by Christian Stenger's avatar Christian Stenger

Squish: Support different lldb versions on Linux

Change-Id: I7af39d335c7025dc29ac6cc718089977450a541c
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
parent adb052be
...@@ -216,6 +216,8 @@ def __getExpectedDebuggers__(): ...@@ -216,6 +216,8 @@ def __getExpectedDebuggers__():
result.extend(__getCDB__()) result.extend(__getCDB__())
debuggers = ["gdb", "lldb"] debuggers = ["gdb", "lldb"]
result.extend(filter(None, map(which, debuggers))) result.extend(filter(None, map(which, debuggers)))
if platform.system() == 'Linux':
result.extend(findAllFilesInPATH("lldb-*"))
if platform.system() == 'Darwin': if platform.system() == 'Darwin':
xcodeLLDB = getOutputFromCmdline("xcrun --find lldb").strip("\n") xcodeLLDB = getOutputFromCmdline("xcrun --find lldb").strip("\n")
if xcodeLLDB and os.path.exists(xcodeLLDB) and xcodeLLDB not in result: if xcodeLLDB and os.path.exists(xcodeLLDB) and xcodeLLDB not in result:
...@@ -321,3 +323,10 @@ def __checkCreatedSettings__(settingsFolder): ...@@ -321,3 +323,10 @@ def __checkCreatedSettings__(settingsFolder):
text = "modified" text = "modified"
test.verify(os.path.isfile(fName) and os.path.getsize(fName) > fMinSize, test.verify(os.path.isfile(fName) and os.path.getsize(fName) > fMinSize,
"Verifying whether file '%s' has been %s." % (os.path.basename(fName), text)) "Verifying whether file '%s' has been %s." % (os.path.basename(fName), text))
def findAllFilesInPATH(programGlob):
result = []
for path in os.environ["PATH"].split(os.pathsep):
files = filter(os.path.isfile, glob.glob(os.path.join(path, programGlob)))
result.extend(files)
return result
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment