]>
Commit | Line | Data |
---|---|---|
cc04455b DM |
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> | |
1d7f2da4 | 10 | #include <stdio.h> |
cc04455b DM |
11 | #include "test_display_base.h" |
12 | ||
13 | SpiceCoreInterface *core; | |
14 | SpiceTimer *ping_timer; | |
15 | ||
1d7f2da4 | 16 | int ping_ms = 1000; |
cc04455b DM |
17 | |
18 | void pinger(void *opaque) | |
19 | { | |
1d7f2da4 | 20 | printf("TEST PINGER\n"); |
cc04455b DM |
21 | |
22 | core->timer_start(ping_timer, ping_ms); | |
23 | } | |
24 | ||
25 | int simple_commands[] = { | |
cc04455b | 26 | SIMPLE_DRAW, |
cc04455b DM |
27 | }; |
28 | ||
29 | int main(void) | |
30 | { | |
31 | Test *test; | |
32 | ||
33 | core = basic_event_loop_init(); | |
34 | test = test_new(core); | |
35 | //spice_server_set_image_compression(server, SPICE_IMAGE_COMPRESS_OFF); | |
36 | test_add_display_interface(test); | |
474762d8 | 37 | |
cc04455b | 38 | test_add_agent_interface(test->server); |
474762d8 | 39 | |
8a22eb4f | 40 | test_add_keyboard_interface(test); |
474762d8 | 41 | |
cc04455b DM |
42 | test_set_simple_command_list(test, simple_commands, COUNT(simple_commands)); |
43 | ||
474762d8 | 44 | |
52983d31 DM |
45 | //ping_timer = core->timer_add(pinger, NULL); |
46 | //core->timer_start(ping_timer, ping_ms); | |
cc04455b DM |
47 | |
48 | basic_event_loop_mainloop(); | |
49 | ||
50 | return 0; | |
51 | } |