Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 550dbaa5 authored by Jim Shargo's avatar Jim Shargo
Browse files

libgui: Add a test server utility for unit tests.

This is being added to make it possible to test linkToDeath callbacks,
but may serve to be generally useful.

This is a complicated little thing. But it has to be this way.

Most of the complication comes from the fact that we want ephemeral
Binder services that we can kill at will on a per-test basis. Binder
doesn't let you do any binder stuff after you've forked, however, so we
needed an intermediary, non-binder process to kick off the binder
processes that actually run the test server.

The way this works is:

- libgui_test defaults to being a normal test, and intializes a
  `TestServerHost` via fork/exec of the libgui_test binary
- The first fork runs TestServerHostMain and waits on a pipe for
  commands to create servers, at which point it will fork/exec
- Each forked server creates a new ITestService service, which the
  original test connects to.

BYPASS_IGBP_IGBC_API_REASON=warren buffers

Bug: 340933794
Flag: EXEMPT test
Test: test library
Change-Id: I37ee51b13a895a8b3387b7f2db92e5069158ff46
parent 785d2e2a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment