spice/server/tests
Alon Levy 63bb37276e server: add websockets support via libwebsockets
New API: spice_server_set_ws_ports

This adds an optional dependency on libwebsockets. You need to get my
patched 0.0.3 version here:
 git://people.freedesktop.org/~alon/libwebsockets

There is no qemu patches yet, to test change in reds.c the default value
of spice_ws_port to 5959 (for the default of spice-html5).

For testing there is an online client at
 http://spice-space.org/spice-html5/spice.html

Known issues:
 1. The tester (server/tests/test_display_no_ssl) gets into dropping all
  data after a few seconds, I think it's an issue with the implemented
  watches, but haven't figured it out.

 2. libwebsocket's read interface is inverted to what our code expects,
 i.e. there is no libwebsocket_read, so there is an additional copy
 involved (see RedsWebSocket). This can be fixed.

 3. Listening on a separate port. Since the headers are different, we
 could listen on the same port (first three bytes RED/GET). I don't know
 if we want to?

Todos:
 1. SSL not implemented yet. Needs some thought as to how.

 2. Serve spice-html5 when accessed as a http server. Nice to have.
2012-10-25 12:33:02 +02:00
..
.gitignore tests: add missing file to .gitignore 2012-07-16 17:36:52 +02:00
base_test.ppm Adding image to be used as "correct" in regression tests 2012-02-14 14:53:47 +02:00
basic_event_loop.c server/tests: agent mock, client_monitors_config 2012-09-13 14:47:32 +03:00
basic_event_loop.h server: tests: add basic tests with working do nothing server 2010-11-08 16:04:27 +02:00
Makefile.am add server/tests/test_vdagent 2012-09-02 14:42:18 +03:00
README Adding support to automated tests 2012-02-14 14:53:44 +02:00
regression_test.py Adding support to automated tests 2012-02-14 14:53:44 +02:00
test_display_base.c server: add websockets support via libwebsockets 2012-10-25 12:33:02 +02:00
test_display_base.h server/tests: agent mock, client_monitors_config 2012-09-13 14:47:32 +03:00
test_display_no_ssl.c server/tests: agent mock, client_monitors_config 2012-09-13 14:47:32 +03:00
test_display_resolution_changes.c server/tests: introduce Test struct 2012-09-02 13:36:41 +03:00
test_display_streaming.c server/tests: introduce Test struct 2012-09-02 13:36:41 +03:00
test_empty_success.c Remove all usages of bzero() 2012-02-14 18:19:43 +02:00
test_fail_on_null_core_interface.c Add missing includes of config.h 2012-01-13 18:11:59 +02:00
test_just_sockets_no_ssl.c Add missing includes of config.h 2012-01-13 18:11:59 +02:00
test_multiple.py server: add tester and todo for multiple client support 2011-08-23 19:18:23 +03:00
test_playback.c Add missing includes of config.h 2012-01-13 18:11:59 +02:00
test_spice_version.sh server: add dist-hook to prevent spice version configure/spice.h difference 2012-09-03 10:31:02 +03:00
test_two_servers.c server/tests/test_two_servers 2012-09-02 13:36:49 +03:00
test_util.h server/tests/basic_event_loop: multiple fixes 2011-08-23 17:01:14 +03:00
test_vdagent.c add server/tests/test_vdagent 2012-09-02 14:42:18 +03:00

What is here
============

This directory will contain a testsuite for the server including tetris drawing.

Unfortunately tetris and most of the tests are not here right now. You can however run all the tests and use libtool to debug any of them thus:

libtool --mode=execute gdb test_just_sockets_no_ssl

Overview of tests
=================

test_just_sockets_no_ssl
 A complete server, only provides the main and inputs channels. Doesn't actually produce anything on the channels. Essentially a test of the regular link code (reds.c), good for multiple connect/disconnect tests.

test_empty_success
 tests calling

test_fail_on_null_core_interface
 should abort when run (when spice tries to watch_add)

basic_event_loop.c
 used by test_just_sockets_no_ssl, can be used by other tests. very crude event loop. Should probably use libevent for better tests, but this is self contained.

Automated tests
===============

test_display_streaming.c
 this test can be used to check regressions. For this, Spice needs to be compiled with --enable-automated-tests and test_display_streaming needs to be called passing --automated-tests as parameter