Page MenuHomePhabricator

Fix TestMultithreaded when specifying an alternative debugserver.
ClosedPublic

Authored by friss on Feb 20 2018, 11:00 PM.

Details

Summary

This test launches a helper that uses the debugserver. The environment
variable sepcifying the debug server wasn't passed to this helper, thus
it was using the default one.

I'd love to hear if anyone has a nicer idea how to get access to the
alternative server passed on the command line.

Diff Detail

Repository
rL LLVM

Event Timeline

friss created this revision.Feb 20 2018, 11:00 PM
labath accepted this revision.Feb 21 2018, 1:38 PM

The LLDB_DEBUGSERVER_PATH is the "official" way to force a debugserver path in lldb. So unless you want to change the implementation in GDBRemoteCommunication, I don't think there is anything better you can do than this patch.

(I guess you could launch the executable in an inherited environment (which would then automatically contain this var) instead of adding it manually, but I don't have a strong opinion on which way is better).

This revision is now accepted and ready to land.Feb 21 2018, 1:38 PM

We could add a plugin setting that could be set with "setting set" that would take precedence over the environment variable is we never need to. Then we could actually run using different GDB server binaries in the same test run if needed.

This revision was automatically updated to reflect the committed changes.