Commit Graph

448 Commits

Author SHA1 Message Date
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
Daniel P. Berrange
7427b23d84 Add missing includes of config.h
Not all files were including config.h
2012-01-13 18:11:59 +02:00
Daniel P. Berrange
d46bc77278 Remove bogus include of strings.h
The tests include strings.h but don't need any of its functions
2012-01-13 18:11:59 +02:00
Daniel P. Berrange
02d56750bd Remove trailing blank lines
Remove any blank lines at the end of all source files
2012-01-13 18:11:59 +02:00
Daniel P. Berrange
faf0947ebb Remove useless if() before free()
The free() function allows NULL to be passed in, so any
code which puts a if() before free() is wasting time
2012-01-13 18:11:58 +02:00
Christophe Fergeau
011266555a server: fix function prototypes
Several functions in server/ were not specifying an argument list,
ie they were declared as void foo(); When compiling with
-Wstrict-prototypes, this leads to:
test_playback.c:93:5: erreur: function declaration isn’t a prototype
[-Werror=strict-prototypes]
2011-09-05 07:52:20 +02:00
Christophe Fergeau
a26f5714e4 fix valgrind warning in test_display__stream
create_test_primary_surface::test_display_base.c creates a
QXLDevSurfaceCreate structure and initialize it, but doesn't set
the position field. Moreover, this structure has 4 bytes of padding
to the end (as shown by pahole from dwarves), so initialize the whole
structure to 0 before using it.
2011-09-01 03:57:35 +02:00
Alon Levy
51ac99dbf4 server: add tester and todo for multiple client support 2011-08-23 19:18:23 +03:00
Alon Levy
2bddc6e33c server/tests/test_playback: correctly use spice_server_playback_get_buffer
and spice_server_playback_put_samples. The former retrieves a buffer from a free
list with spice_server_playback_get_buffer, and should be used once via
spice_server_playback_put_samples. The tester previously reused the same buffer
a number of times.
2011-08-23 17:01:14 +03:00
Alon Levy
b88f233633 server/tests/basic_event_loop: multiple fixes
reuse common/ring.h
ignore SIGPIPE
fix handling of removed watches
2011-08-23 17:01:14 +03:00
Alon Levy
5c99a6da4f server/tests/test_display_base: fix compile 2011-08-23 17:01:14 +03:00
Alon Levy
0378df6254 server/tests: test_util.h: fix double ASSERT definition 2011-07-20 11:05:44 +03:00
Alon Levy
86f7b490a9 server/tests/basic_event_loop: strange assert failure; fix 2011-07-05 14:08:30 +02:00
Alon Levy
87486fd790 server/tests: show port to connect to 2011-05-09 09:46:22 +03:00
Marc-André Lureau
138c421193 build: fix gettimeofday warning
CC     test_playback.o
test_playback.c: In function ‘playback_timer_cb’:
test_playback.c:56:5: warning: implicit declaration of function ‘gettimeofday’
2011-05-03 17:16:46 +02:00
Christophe Fergeau
2a4614ea94 autotools: refactor the whole build machinery
spice Makefile.am setup is a bit confusing, with source file
names being listed several times in different Makefile.am
(generally, once in EXTRA_DIST and another time in another
Makefile.am in _SOURCES). The client binaries are built
by client/x11/Makefile.am, which means recursing into client,
then into x11 to finally build spicec. This Makefile.am is
also referencing files from common/ and client/, which is
a bit unusual with autotools.

This patch attempts to simplify the build process to get
something more usual from an autotools point of view.
The source from common/ are compiled into a libtool convenience
library, which the server and the client links against which avoids
referencing source files from common/ when building the server and
the client. The client is built in client/Makefile.am and directly
builds files from x11/ windows/ and gui/ if needed (without
recursing in these subdirectories).

This makes the build simpler to understand, and also makes it
possible to list source files once, which avoids potential
make distcheck breakage when adding new files.

There is a regression in this patch with respect to
sw_canvas/gl_canvas/gdi_canvas. They should be built with
different preprocessor #defines resulting in different behaviour
of the canvas for the client and the server. However, this is not
currently the case, both the client and the server will use the same
code for now (which probably means one of them is broken). This will
be fixed in a subsequent commit.

make distcheck passes, but compilation on windows using the
autotools build system hasn't been tested, which means it's likely
to be broken. It shouldn't be too hard ot fix it though, just let
me know of any issues with this.
2011-05-03 14:44:10 +02:00
Christophe Fergeau
4031681638 server/tests remove useless assignment
This was detected by clang-static-analyzer.
2011-04-08 12:14:20 +02:00
Christophe Fergeau
3ba093a57e tests: fix compilation with -Wall -Werror
When compiling spice with make CFLAGS="-g3 -ggdb3 -O0 -Wall -Werror",
the build broken because of a few unused variables/missing returns.
This patch fixes these warnings.
2011-04-08 12:14:19 +02:00
Christophe Fergeau
5dd6932bf7 remove duplicated macro
MIN() is already defined in spice-protocol/spice/macros.h
2011-04-04 11:59:53 +02:00
Alon Levy
02c3f54deb server/tests: add test_playback 2011-03-22 09:44:52 +02:00
Alon Levy
0f4a0aa07e server/tests/basic_event_loop: fix bzero warning 2011-02-11 19:13:03 +02:00
Alon Levy
293f5f0df8 server/tests: split test_display_no_ssl to test_display_base, add streaming test 2011-01-10 14:11:37 +02:00
Alon Levy
2c16ef8f26 server/tests/test_display_no_ssl: add update_area, COPY_BITS to tested functions, make a queue of QXLCommandExt waiting (cursor still with production at get_command) 2011-01-10 14:11:37 +02:00
Alon Levy
92e4ab6d68 server/tests/test_display_no_ssl: add surface create/destroy test (commented out), and square mode (default) 2011-01-10 14:11:37 +02:00
Alon Levy
2124818788 server/tests: fix timer reset to allow setting next call during callback 2011-01-10 14:11:37 +02:00
Alon Levy
c1846506de server/tests/test_display_no_ssl: change color every circle 2011-01-10 14:11:37 +02:00
Alon Levy
618d13d4d1 server/tests/test_display_no_ssl: restart notify timer 2011-01-10 14:11:37 +02:00
Alon Levy
0707feca43 server/tests: basic_event_loop: reset timer after firing it 2011-01-10 14:11:37 +02:00
Alon Levy
9cdeac5da5 server/tests/test_display_no_ssl: disable cursor test until it works correctly 2011-01-10 14:11:22 +02:00
Alon Levy
4dcacefb06 server/test/test_display_no_ssl: add beginning of basic cursor item test. doesn't actually show anything on client. also, leaks. 2011-01-10 14:10:44 +02:00
Alon Levy
e62f4b6fc7 server/tests/test_display_no_ssl: make window 320x320, two colored updates, one in notify batch 2011-01-10 14:10:38 +02:00
Hans de Goede
926ee7a361 Makefiles: fix server/tests/test_util.h not being included in make dist 2010-12-17 14:14:39 +01:00
Alon Levy
8c6f94a679 server/tests: fix for AM_LDFLAGS introduction 2010-12-08 18:43:23 +02:00
Alon Levy
450278a299 server/tests: Makefile.am: use AM_LDFLAGS instead of LDFLAGS 2010-12-07 21:33:26 +02:00
Alon Levy
9002d3f005 server/tests: add test_display_no_ssl
updates taken from spice vga mode updates, i.e. non cacheable, glz compressed
(depends on whatever settings you apply to the server) opaque draw operations.
 + completed the SpiceCoreInterface implementation (timers)

v1->v2:
 removed test_util.c (Hans)
 replaced mallocz with calloc (Hans)
2010-11-30 21:03:14 +02:00
Alon Levy
74b39efd6e server/tests: Makefile.am fixes
* don't install tests on make install
 * don't forget anything for make dist tarball
2010-11-30 21:01:06 +02:00
Alon Levy
eb79d1e568 add .gitignore for tests 2010-11-30 20:54:49 +02:00
Alon Levy
0ede43e893 server: tests: add basic tests with working do nothing server 2010-11-08 16:04:27 +02:00