]> git.proxmox.com Git - spiceterm.git/blob - test_display_no_ssl.c
exit if spice_server_init fails (socket already in use?)
[spiceterm.git] / test_display_no_ssl.c
1 /**
2 * Test ground for developing specific tests.
3 *
4 * Any specific test can start of from here and set the server to the
5 * specific required state, and create specific operations or reuse
6 * existing ones in the test_display_base supplied queue.
7 */
8
9 #include <stdlib.h>
10 #include <stdio.h>
11 #include "test_display_base.h"
12
13 SpiceCoreInterface *core;
14 SpiceTimer *ping_timer;
15
16 int ping_ms = 1000;
17
18 void pinger(void *opaque)
19 {
20 printf("TEST PINGER\n");
21
22 core->timer_start(ping_timer, ping_ms);
23 }
24
25 int simple_commands[] = {
26 //SIMPLE_CREATE_SURFACE,
27 //SIMPLE_DRAW,
28 //SIMPLE_DESTROY_SURFACE,
29 //PATH_PROGRESS,
30 SIMPLE_DRAW,
31 //SIMPLE_COPY_BITS,
32 SIMPLE_UPDATE,
33 };
34
35 int main(void)
36 {
37 Test *test;
38
39 core = basic_event_loop_init();
40 test = test_new(core);
41 //spice_server_set_image_compression(server, SPICE_IMAGE_COMPRESS_OFF);
42 test_add_display_interface(test);
43 test_add_agent_interface(test->server);
44 test_set_simple_command_list(test, simple_commands, COUNT(simple_commands));
45
46 ping_timer = core->timer_add(pinger, NULL);
47 core->timer_start(ping_timer, ping_ms);
48
49 basic_event_loop_mainloop();
50
51 return 0;
52 }