mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 22:48:19 +00:00
test: Add test_destroy()
This allows to chain several test cases by using test_new()/test_destroy(). Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
This commit is contained in:
parent
f66b7bffc7
commit
c8f8ea2224
@ -908,6 +908,13 @@ Test *test_new(SpiceCoreInterface *core)
|
||||
return test;
|
||||
}
|
||||
|
||||
void test_destroy(Test *test)
|
||||
{
|
||||
test->core->timer_remove(test->wakeup_timer);
|
||||
spice_server_destroy(test->server);
|
||||
free(test);
|
||||
}
|
||||
|
||||
static void init_automated(void)
|
||||
{
|
||||
struct sigaction sa;
|
||||
|
||||
@ -137,6 +137,7 @@ void test_set_command_list(Test *test, Command *command, int num_commands);
|
||||
void test_add_display_interface(Test *test);
|
||||
void test_add_agent_interface(SpiceServer *server); // TODO - Test *test
|
||||
Test* test_new(SpiceCoreInterface* core);
|
||||
void test_destroy(Test *test);
|
||||
|
||||
uint32_t test_get_width(void);
|
||||
uint32_t test_get_height(void);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user