Commit Graph

87 Commits

Author SHA1 Message Date
Marc-André Lureau
e93b2bb188 server/tests: avoid using deprecated symbols 2013-10-07 16:33:20 +02:00
Marc-André Lureau
ced4f1adfd build-sys: fix some automake warning
client/Makefile.am:199: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
server/tests/Makefile.am:3: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
2013-09-17 19:41:27 +02:00
Uri Lublin
d45f3bdc6b syntax-check: make sure config.h is the first included .h file 2013-07-16 23:37:29 +03:00
Uri Lublin
bc77805b5f syntax-check: fix no-newline or empty line at EOF 2013-07-16 23:37:29 +03:00
Uri Lublin
413883ecf8 syntax-check: fix cast_of_argument_to_free
In this case, make syntax-check is wrong, and we actually do
need the cast.
A cast is needed when types are   uint64_t <--> pointer

Using a local "ptr" variable makes both gcc and syntax-check happy.
2013-07-16 23:37:28 +03:00
Uri Lublin
8511c747d1 server/tests: fix timer for test_empty_success 2013-07-16 23:37:28 +03:00
Uri Lublin
3ede55b2ba server/tests: test_display_width_stride: add destroy command
Otherwise, the test exits after the first iteration over all tests,
on the second attempt to create an already created surface.
2013-07-16 23:37:28 +03:00
Uri Lublin
b66d755447 server/tests: remove option from usage if AUTOMATED_TESTS is not configured 2013-07-16 23:37:27 +03:00
Uri Lublin
cbcd9eea36 server/tests: invalid-option: print the bad argument
optind points to the next argument to parse.
2013-07-16 23:37:27 +03:00
Uri Lublin
694f4b9e57 server/tests: fix produce_command for create surface
Earlier in this function, test->target_surface is set to 1, which
is the only allowed non-primary surface currently.

If surface parameters are given (and specifically data is checked)
they are being used, otherwise a default surface is used.

Earlier in this function, "command" is set to a non-NULL value.
Thus, the else part was unreachable code, which is fixed now.
2013-07-16 23:37:27 +03:00
Uri Lublin
ff03d8dd2a server/tests: test_display_base: set rect according to appropriate surface
When surface_id == 0, primary is used.
Otherwise (currently 1), secondary is used.

Also, remove unused test_width and test_height.
Since commit caea769943,
test->width and test->height are used.
2013-07-16 23:37:27 +03:00
Alon Levy
bcd7c4e097 server/tests: test_display_width_stride 2013-05-17 11:06:34 -04:00
Alon Levy
7d6e813b2c server/tests/test_display_base: add missing set_client_capabilities, fix client_monitors_config signature 2013-05-17 11:06:34 -04:00
Alon Levy
4e7d25a7ac Revert "server: add websockets support via libwebsockets"
This reverts commit 63bb37276e.
2012-11-04 13:48:42 +02:00
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
Alon Levy
f0761ef894 server/tests/test_display_base: fix segfault in test 2012-10-25 12:31:39 +02:00
Alon Levy
9e1d165fc0 server/tests: agent mock, client_monitors_config 2012-09-13 14:47:32 +03:00
Alon Levy
f567f6b4cd server/tests/test_display_base: fix update_area abort
Don't do zero area update_areas, server now aborts on those. This tester
is not supposed to test those aborts.
2012-09-03 19:26:44 +03:00
Alon Levy
078742b0ee server: add dist-hook to prevent spice version configure/spice.h difference 2012-09-03 10:31:02 +03:00
Alon Levy
a6b2c10c1e add server/tests/test_vdagent 2012-09-02 14:42:18 +03:00
Alon Levy
12c4349de7 server/tests/test_two_servers 2012-09-02 13:36:49 +03:00
Alon Levy
caea769943 server/tests: introduce Test struct 2012-09-02 13:36:41 +03:00
Marc-André Lureau
4e7f071e6f tests: add missing file to .gitignore
TODO: some day, switch to git.mk
2012-07-16 17:36:52 +02:00
Yonit Halperin
dd0d4959bb server/tests: test_display_streaming - test wide sized frames
Before, we tested only higher frames, while wider frames would have
triggered a bug in mjpeg_encoder, when spice is linked with libjpeg and
not libjpeg-turbo.
2012-05-16 08:55:11 +03:00
Yonit Halperin
4c88034845 server/tests/test_display_streaming: include tests for clip and sized frames
CC: Alon Levy <alevy@redhat.com>
2012-05-03 13:09:54 +03:00
Yonit Halperin
c44726bd5f server/tests: use the correct dimensions in SIMPLE_UPDATE 2012-05-03 13:09:54 +03:00
Yonit Halperin
a267a4b315 server/tests: add SLEEP command to test_display_base 2012-05-03 13:09:53 +03:00
Yonit Halperin
bccf5bc35a server/tests: add clip to SIMPLE_DRAW_BITMAP 2012-05-03 13:09:53 +03:00
Alon Levy
3373cda434 server/tests/test_display_streaming: update to create sized frames 2012-05-03 13:09:52 +03:00
Alon Levy
8778b8eb2c server/tests: add SIMPLE_DRAW_SOLID and SIMPLE_DRAW_BITMAP 2012-05-03 13:09:51 +03:00
Alon Levy
76fd64ad96 server/tests: refactor Command 2012-05-03 13:09:51 +03:00
Alon Levy
703f32cda9 server/tests: add test_get_width/test_get_height 2012-05-03 13:09:50 +03:00
Alon Levy
2f02599e6a server/tests: refactor test_display_base 2012-05-03 13:09:50 +03:00
Daniel P. Berrange
e71cb83680 Ensure config.h is the first include in the file
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25 09:49:34 +01:00
Daniel P. Berrange
39565707a9 Make some int->pointer casts explicit
Tell the compiler that was really do intend to cast from int
to pointer, to prevent warnings about implicit casts

* server/tests/test_display_base.c: Add explicit casts

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25 09:49:25 +01:00
Marc-André Lureau
359fc1cb5d Use the spice-common submodule
This patch will replace the common/ directory with the spice-common
project. It is for now a simple project subdirectory shared with
spice-gtk, but the goal is to make it a proper library later on.

With this change, the spice-server build is broken. The following
commits fix the build, and have been seperated to ease the review.

v2
- moves all the generated marshallers to spice-common library
- don't attempt to fix windows VS build, which should somehow be
  splitted with spice-common (or built from tarball only to avoid
  generation tools/libs deps)
v3
- uses libspice-common-client
- fix a mutex.h inclusion reported by Alon
2012-03-25 18:59:10 +02:00
Alon Levy
a7d3f1de82 server/tests: add resolution changes tester 2012-03-22 11:18:37 +02:00
Alon Levy
a6f9797c79 server/tests/test_display_base: add Command
add parameters to the commands used for display tests.
2012-03-22 11:18:37 +02:00
Alon Levy
c36bf55971 server/tests/test_display_base: remove 64bit arch assumptions 2012-03-21 17:58:25 +02:00
Marc-André Lureau
534b71dfaa build-sys: fix make distcheck
- Do not refer to .c files managed by another makefile (this will fail
  make distclean)
- Do not refer to files by relative path (should use $top_srcdir for ex)
- Use LDADD for object linking instead of LDFLAGS, for linker flags
2012-03-01 16:24:10 +01:00
Marc-André Lureau
22ee470d4e build-sys: cleanup server/tests/Makefile.am 2012-03-01 16:24:10 +01:00
Fabiano Fidêncio
65f89aca2c Enabling cursor in server/tests
Now, cursor is being shown in all tests as a white rectangle and is
    running in the screen doing a diagonal movement. It's a very simple
    way to test cursor commands and is sufficient for our tests.
2012-02-26 13:10:25 +01:00
Alon Levy
7e3fb815cc server/tests/basic_event_loop: print something on channel_event 2012-02-15 15:09:13 +02:00
Dan McGee
3f303d6014 Remove all usages of bzero()
As recommended by modern C practice, we should just be using memset().

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
2012-02-14 18:19:43 +02:00
Alon Levy
e4a92b177a server/tests: use getopt_long 2012-02-14 17:30:50 +02:00
Fabiano Fidêncio
33bd5d2797 Adding image to be used as "correct" in regression tests 2012-02-14 14:53:47 +02:00
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
Alon Levy
51d7598a2e server/tests/test_empty_success: fix warning on bzero
Signed-off-by: Alon Levy <alevy@redhat.com>
2012-01-23 12:41:56 +02:00
Dan McGee
b0b19f4b25 Update .gitignore with a few more generated files
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
2012-01-23 12:28:58 +02:00
Daniel P. Berrange
68c2897e5b Remove trailing whitespace from end of lines 2012-01-13 18:11:59 +02:00