[Lldb-commits] [PATCH] Modify dotest.py to be able to run without an lldb build.

Saleem Abdulrasool compnerd at compnerd.org
Sun Dec 21 13:51:21 PST 2014


================
Comment at: test/dotest.py:950
@@ -948,4 +949,3 @@
         else:
-            print lldbExecutablePath + " is not an executable"
-            sys.exit(-1)
+            print lldbExecutablePath + " is not an executable, lldb tests will fail."
     else:
----------------
Whats the point of running tests if they are going to fail since you don't have the necessary dependencies?

================
Comment at: test/dotest.py:1102
@@ +1101,3 @@
+        (before, frameWithVersion, after) = lldbPath.rpartition("LLDB.framework/Versions/A")
+        if frameWithVersion != "" :
+            lldbPath = before + "LLDB.framework" + after
----------------
Not your change, but this is equivalent to:

    if frameWithVersion:
      lldbPath = before + "LLDB.framework" + after

================
Comment at: test/tools/lldb-gdbserver/lldbgdbserverutils.py:60
@@ +59,3 @@
+    if "LLDB_DEBUGSERVER_PATH" in os.environ:
+        return os.environ["LLDB_DEBUGSERVER_PATH"]
+    elif "LLDB_EXEC" in os.environ:
----------------
Might be nice to do a check similar to the one below to ensure that the DebugServer is present.

================
Comment at: test/tools/lldb-gdbserver/lldbgdbserverutils.py:66
@@ -62,1 +65,3 @@
+        else:
+            return _get_debug_monitor_from_lldb(lldb_exe, "lldb-gdbserver")
     else:
----------------
This might be simpler to read:

    for var in ("LLDB_DEBUGSERVER_PATH", "LLDB_EXEC"):
      if os.environ.get(var, None):
        return _get_debug_monitor_from_lldb(os.environ[var], "lldb-gdbserver")
    return None

================
Comment at: test/tools/lldb-gdbserver/lldbgdbserverutils.py:86
@@ -75,3 +85,3 @@
     else:
-        return _get_debug_monitor_from_lldb(lldb_exe, "debugserver")
+        return None
 
----------------
Similar to above.  This might be simpler to read:

    for var in ("LLDB_DEBUGSERVER_PATH", "LLDB_EXEC"):
      if os.environ.get(var, None):
        return _get_debug_monitor_from_lldb(os.environ[var], "debugserver")
    return None

================
Comment at: test/tools/lldb-gdbserver/lldbgdbserverutils.py:87
@@ -77,2 +86,3 @@
+        return None
 
 
----------------
In fact, I think you can probably collapse both of these functions into a single one that takes a second parameter which is the debug monitor name and pass that along to the _get_debug_monitor_from_lldb.

http://reviews.llvm.org/D6554

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list