This will ease llgs development a bit by not requiring an lldb/lldb.py build to launch the tests. Also, we can now use LLDB_DEBUGSERVER_PATH to point to a debug server to use to run the tests. I used that to point to a ds2 build and run llgs tests against ds2.
Details
Diff Detail
Event Timeline
test/dotest.py | ||
---|---|---|
950 | Whats the point of running tests if they are going to fail since you don't have the necessary dependencies? | |
1102 | Not your change, but this is equivalent to: if frameWithVersion: lldbPath = before + "LLDB.framework" + after | |
test/tools/lldb-gdbserver/lldbgdbserverutils.py | ||
60 | Might be nice to do a check similar to the one below to ensure that the DebugServer is present. | |
66 | 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 | |
86 | 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 | |
87 | 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. |
Thanks for the review Saleem. See comments inline.
test/dotest.py | ||
---|---|---|
950 | Because you can run other tests (not lldb) with this tool. Only the lldb tests will fail if you choose to run them. | |
test/tools/lldb-gdbserver/lldbgdbserverutils.py | ||
60 | The existence of the debug server is checked elsewhere in the test suite (in lldbgdbserverutils.py). | |
66 | Not really, because when the user specifies LLDB_DEBUGSERVER_PATH, we don't want to go through _gert_debug_monitor_from_lldb again, we just want to use the path directly. | |
86 | Ditto. |
test/dotest.py | ||
---|---|---|
950 | lldb-mi and llgs for instance. | |
test/tools/lldb-gdbserver/lldbgdbserverutils.py | ||
66 | The function name is pretty explicit: _get_debug_monitor_from_lldb gets the debug monitor path by using the lldb path provided. If the user already specified a path to a debug monitor, why would we go through a function that tries to apply intelligence to guess it? |
Whats the point of running tests if they are going to fail since you don't have the necessary dependencies?