spice/server/tests/Makefile.am
Frediano Ziglio 1be06f188e make spice-server-replay use dynamic spice-server library
spice-server-replay is built with the same settings as tests.
Currently the tests links to a convenience spice-server library.
A convenience library is a static library build with object file
for a dynamic library.
This make all tests contain all spice-server library code and not
linking to the spice-server dynamic library (the .so).
It's not a problem for most tests however this make impossible for
spice-server-replay utility to be used with a dynamic spice-server
library (you have to recompile it including the library).
This is a pity as you could for instance compare your system
library behavior with the library you are developing.
Also if we decide to install in a future the utility for testing
we would have lot of code duplication.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-05-18 14:57:06 +01:00

105 lines
2.5 KiB
Makefile

NULL =
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/common \
-I$(top_srcdir)/server \
-I$(top_builddir)/server \
-I$(top_srcdir)/server/tests \
$(COMMON_CFLAGS) \
$(GLIB2_CFLAGS) \
$(GOBJECT2_CFLAGS) \
$(SMARTCARD_CFLAGS) \
$(SPICE_NONPKGCONFIG_CFLAGS) \
$(SPICE_PROTOCOL_CFLAGS) \
$(NULL)
if HAVE_AUTOMATED_TESTS
AM_CPPFLAGS += -DAUTOMATED_TESTS
endif
noinst_LIBRARIES = libtest.a
libtest_a_SOURCES = \
basic_event_loop.c \
basic_event_loop.h \
test_display_base.c \
test_display_base.h \
$(NULL)
LDADD = \
libtest.a \
$(top_builddir)/spice-common/common/libspice-common.la \
$(top_builddir)/server/libserver.la \
$(GLIB2_LIBS) \
$(GOBJECT2_LIBS) \
$(SPICE_NONPKGCONFIG_LIBS) \
$(NULL)
TESTS = \
stat_test \
stream-test \
test-loop \
test-qxl-parsing \
$(NULL)
noinst_PROGRAMS = \
test_display_no_ssl \
test_display_streaming \
test_empty_success \
test_fail_on_null_core_interface \
test_just_sockets_no_ssl \
test_playback \
test_display_resolution_changes \
test_two_servers \
test_vdagent \
test_display_width_stride \
spice-server-replay \
$(TESTS) \
$(NULL)
check_PROGRAMS = $(TESTS)
noinst_LIBRARIES += \
libstat_test1.a \
libstat_test2.a \
libstat_test3.a \
libstat_test4.a \
$(NULL)
spice_server_replay_SOURCES = replay.c \
../event-loop.c \
basic_event_loop.c \
basic_event_loop.h
spice_server_replay_LDADD = \
$(top_builddir)/spice-common/common/libspice-common.la \
$(top_builddir)/server/libspice-server.la \
$(GLIB2_LIBS) \
$(GOBJECT2_LIBS) \
$(SPICE_NONPKGCONFIG_LIBS) \
$(NULL)
stat_test_SOURCES = stat-main.c
stat_test_LDADD = \
libstat_test1.a \
libstat_test2.a \
libstat_test3.a \
libstat_test4.a \
$(LDADD) \
$(NULL)
libstat_test1_a_SOURCES = stat-test.c
libstat_test1_a_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_COMPRESS_STAT=0 -DTEST_RED_WORKER_STAT=0 -DTEST_NAME=stat_test1
libstat_test2_a_SOURCES = stat-test.c
libstat_test2_a_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_COMPRESS_STAT=0 -DTEST_RED_WORKER_STAT=1 -DTEST_NAME=stat_test2
libstat_test3_a_SOURCES = stat-test.c
libstat_test3_a_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_COMPRESS_STAT=1 -DTEST_RED_WORKER_STAT=0 -DTEST_NAME=stat_test3
libstat_test4_a_SOURCES = stat-test.c
libstat_test4_a_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_COMPRESS_STAT=1 -DTEST_RED_WORKER_STAT=1 -DTEST_NAME=stat_test4
test_qxl_parsing_LDADD = ../libserver.la $(LDADD)