19 #ifndef MIR_TESTS_INCLUDE_MIR_TEST_FRAMEWORK_ASYNC_SERVER_RUNNER_H_ 20 #define MIR_TESTS_INCLUDE_MIR_TEST_FRAMEWORK_ASYNC_SERVER_RUNNER_H_ 25 #include "mir/server.h" 28 #include <condition_variable> 60 template<
typename Policy,
typename ...Args>
63 set_window_management_policy =
64 miral::set_window_management_policy<Policy>(args...);
68 std::list<TemporaryEnvironmentValue> env;
73 std::function<void(mir::Server&)> set_window_management_policy;
76 std::condition_variable started;
77 bool server_running{
false};
void stop_server()
Stops the server and joins thread.
mir::Server server
Definition: async_server_runner.h:58
Definition: async_server_runner.h:35
Definition: auto_unblock_thread.h:37
void wait_for_server_exit()
Wait for the server to exit and joins thread.
~AsyncServerRunner() noexcept
void override_window_management_policy(Args &... args)
Definition: async_server_runner.h:61
auto connection(int fd) -> std::string
Definition: any_surface.h:25
void start_server()
Starts the server on a new thread.
void add_to_environment(char const *key, char const *value)
auto new_connection() -> std::string