19 #ifndef MIR_TEST_FRAMEWORK_INTERPROCESS_CLIENT_SERVER_TEST_H_ 20 #define MIR_TEST_FRAMEWORK_INTERPROCESS_CLIENT_SERVER_TEST_H_ 37 void init_server(std::function<
void()>
const& init_code);
41 std::function<
void()>
const& exec_code);
45 auto new_client_process(std::function<
void()>
const& client_code) -> std::shared_ptr<Process>;
66 pid_t test_process_id{getpid()};
67 pid_t server_process_id{0};
68 pid_t client_process_id{0};
69 std::shared_ptr<Process> server_process;
71 char const* process_tag =
"test";
72 std::function<void()> server_setup = []{};
73 bool server_signal_expected{
false};
74 int expected_server_failure_signal{0};
void expect_server_signalled(int signal)
bool is_test_process() const
std::string const & test_socket_file()
auto new_client_process(std::function< void()> const &client_code) -> std::shared_ptr< Process >
void run_in_server(std::function< void()> const &exec_code)
pid_t client_pid() const
Definition: interprocess_client_server_test.h:49
char const *const mir_test_socket
Definition: interprocess_client_server_test.h:33
void init_server(std::function< void()> const &init_code)
auto process_type() const -> char const *
Definition: interprocess_client_server_test.h:54
void run_in_client(std::function< void()> const &client_code)
Result wait_for_shutdown_server_process()
Definition: interprocess_client_server_test.h:30
Definition: any_surface.h:25
bool sigkill_server_process()
Definition: cross_process_sync.h:30
void run_in_server_and_disable_core_dump(std::function< void()> const &exec_code)
~InterprocessClientServerTest()
Basic fixture for tests that don't use graphics or input hardware.
Definition: headless_test.h:39