Index: lldb/trunk/test/dotest.py =================================================================== --- lldb/trunk/test/dotest.py +++ lldb/trunk/test/dotest.py @@ -949,13 +949,13 @@ lldbExec = None lldbMiExec = None + lldbHere = None if lldbExecutablePath: if is_exe(lldbExecutablePath): lldbExec = lldbExecutablePath lldbHere = lldbExec else: - print lldbExecutablePath + " is not an executable" - sys.exit(-1) + print lldbExecutablePath + " is not an executable, lldb tests will fail." else: # First, you can define an environment variable LLDB_EXEC specifying the # full pathname of the lldb executable. @@ -975,7 +975,6 @@ baiExec2 = os.path.join(base, *(xcode4_build_dir + bai + executable)) # The 'lldb' executable built here in the source tree. - lldbHere = None if is_exe(dbgExec): lldbHere = dbgExec elif is_exe(dbgExec2): @@ -1102,24 +1101,24 @@ if not lldbPath: print 'This script requires lldb.py to be in either ' + dbgPath + ',', - print relPath + ', or ' + baiPath - sys.exit(-1) + print relPath + ', or ' + baiPath + '. Some tests might fail.' - # Some of the code that uses this path assumes it hasn't resolved the Versions... link. - # If the path we've constructed looks like that, then we'll strip out the Versions/A part. - (before, frameWithVersion, after) = lldbPath.rpartition("LLDB.framework/Versions/A") - if frameWithVersion != "" : - lldbPath = before + "LLDB.framework" + after - - lldbPath = os.path.abspath(lldbPath) - - # If tests need to find LLDB_FRAMEWORK, now they can do it - os.environ["LLDB_FRAMEWORK"] = os.path.dirname(os.path.dirname(lldbPath)) - - # This is to locate the lldb.py module. Insert it right after sys.path[0]. - sys.path[1:1] = [lldbPath] - if dumpSysPath: - print "sys.path:", sys.path + if lldbPath: + # Some of the code that uses this path assumes it hasn't resolved the Versions... link. + # If the path we've constructed looks like that, then we'll strip out the Versions/A part. + (before, frameWithVersion, after) = lldbPath.rpartition("LLDB.framework/Versions/A") + if frameWithVersion != "" : + lldbPath = before + "LLDB.framework" + after + + lldbPath = os.path.abspath(lldbPath) + + # If tests need to find LLDB_FRAMEWORK, now they can do it + os.environ["LLDB_FRAMEWORK"] = os.path.dirname(os.path.dirname(lldbPath)) + + # This is to locate the lldb.py module. Insert it right after sys.path[0]. + sys.path[1:1] = [lldbPath] + if dumpSysPath: + print "sys.path:", sys.path def visit(prefix, dir, names): """Visitor function for os.path.walk(path, visit, arg).""" Index: lldb/trunk/test/tools/lldb-gdbserver/lldbgdbserverutils.py =================================================================== --- lldb/trunk/test/tools/lldb-gdbserver/lldbgdbserverutils.py +++ lldb/trunk/test/tools/lldb-gdbserver/lldbgdbserverutils.py @@ -56,11 +56,16 @@ A path to the lldb-gdbserver exe if it is found to exist; otherwise, returns None. """ - lldb_exe = os.environ["LLDB_EXEC"] - if not lldb_exe: - return None + if "LLDB_DEBUGSERVER_PATH" in os.environ: + return os.environ["LLDB_DEBUGSERVER_PATH"] + elif "LLDB_EXEC" in os.environ: + lldb_exe = os.environ["LLDB_EXEC"] + if not lldb_exe: + return None + else: + return _get_debug_monitor_from_lldb(lldb_exe, "lldb-gdbserver") else: - return _get_debug_monitor_from_lldb(lldb_exe, "lldb-gdbserver") + return None def get_debugserver_exe(): """Return the debugserver exe path. @@ -69,11 +74,16 @@ A path to the debugserver exe if it is found to exist; otherwise, returns None. """ - lldb_exe = os.environ["LLDB_EXEC"] - if not lldb_exe: - return None + if "LLDB_DEBUGSERVER_PATH" in os.environ: + return os.environ["LLDB_DEBUGSERVER_PATH"] + elif "LLDB_EXEC" in os.environ: + lldb_exe = os.environ["LLDB_EXEC"] + if not lldb_exe: + return None + else: + return _get_debug_monitor_from_lldb(lldb_exe, "debugserver") else: - return _get_debug_monitor_from_lldb(lldb_exe, "debugserver") + return None _LOG_LINE_REGEX = re.compile(r'^(lldb-gdbserver|debugserver)\s+<\s*(\d+)>' +