spice/server/tests/test_display_streaming.c
Fabiano Fidêncio 1e8e2f9ee0 Adding support to automated tests
As suggested by Alon, a simple automated test to try to find
    regressions in Spice code.
    To use this, compile Spice with --enable-automated-tests and
    run test_display_streaming passing --automated-tests as parameter.
2012-02-14 14:53:44 +02:00

34 lines
856 B
C

/* Do repeated updates to the same rectangle to trigger stream creation.
*
* TODO: check that stream actually starts programatically (maybe stap?)
* TODO: stop updating same rect, check (prog) that stream stops
*/
#include <config.h>
#include "test_display_base.h"
int simple_commands[] = {
SIMPLE_DRAW,
SIMPLE_UPDATE,
PATH_PROGRESS,
SIMPLE_CREATE_SURFACE,
SIMPLE_DESTROY_SURFACE,
};
SpiceCoreInterface *core;
SpiceServer *server;
int main(int argc, char **argv)
{
#ifdef AUTOMATED_TESTS
check_automated(argc, argv);
#endif
core = basic_event_loop_init();
server = test_init(core);
spice_server_set_streaming_video(server, SPICE_STREAM_VIDEO_ALL);
test_add_display_interface(server);
test_set_simple_command_list(simple_commands, COUNT(simple_commands));
basic_event_loop_mainloop();
return 0;
}