Makefile.am 3.6 KB
Newer Older
K
Karel Zak 已提交
1 2
## Process this file with automake to produce Makefile.in

3 4
SHELL = $(PREFERABLY_POSIX_SHELL)

5 6
SUBDIRS = virshdata confdata sexpr2xmldata \
  xml2sexprdata xmconfigdata xencapsdata
7

K
Karel Zak 已提交
8
INCLUDES = \
9
	-I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
K
Karel Zak 已提交
10 11
	-I$(top_builddir)/include \
	-I$(top_builddir)/src \
12 13
	-I$(top_srcdir)/include \
	-I$(top_srcdir)/src \
14 15
	$(LIBXML_CFLAGS) \
	$(GNUTLS_CFLAGS) \
16
	$(SASL_CFLAGS) \
17
	$(SELINUX_CFLAGS) \
18
        -DGETTEXT_PACKAGE=\"$(PACKAGE)\" \
19
         $(COVERAGE_CFLAGS) \
20
         $(WARN_CFLAGS)
21

K
Karel Zak 已提交
22 23
LDADDS = \
	@STATIC_BINARIES@ \
24 25
	$(LIBXML_LIBS) \
        $(GNUTLS_LIBS) \
26
        $(SASL_LIBS) \
27
        $(SELINUX_LIBS) \
28
        $(WARN_CFLAGS) \
29
	../src/libvirt_test.la \
30
	../gnulib/lib/libgnu.la \
31
        $(COVERAGE_LDFLAGS)
K
Karel Zak 已提交
32

33
EXTRA_DIST =		\
34
        oomtrace.pl     \
35
	test-lib.sh	\
36 37
	xmlrpcserver.py	\
	qemuxml2argvdata \
38 39
	nodeinfodata     \
	domainschematest
K
Karel Zak 已提交
40

41
noinst_PROGRAMS = xmlrpctest xml2sexprtest sexpr2xmltest virshtest conftest \
42
	reconnect xmconfigtest xencapstest qemuxml2argvtest qemuxml2xmltest \
43
        nodeinfotest statstest qparamtest
44

45
test_scripts = domainschematest
A
Atsushi SAKAI 已提交
46 47 48
if WITH_LIBVIRTD
test_scripts += \
	test_conf.sh \
J
Jim Meyering 已提交
49
	cpuset \
50
	daemon-conf \
51
	int-overflow \
52
	read-bufsiz \
53
	read-non-seekable \
54
	undefine \
55
	vcpupin
A
Atsushi SAKAI 已提交
56
endif
57

58 59
EXTRA_DIST += $(test_scripts)

A
Atsushi SAKAI 已提交
60
TESTS = xml2sexprtest sexpr2xmltest virshtest xmconfigtest \
61
        xencapstest qemuxml2argvtest qemuxml2xmltest nodeinfotest \
62
	statstest qparamtest $(test_scripts)
63 64 65
if ENABLE_XEN_TESTS
  TESTS += reconnect
endif
K
Karel Zak 已提交
66

J
Jim Meyering 已提交
67 68
path_add = $$abs_top_builddir/src$(PATH_SEPARATOR)$$abs_top_builddir/qemud

69 70 71
# NB, automake < 1.10 does not provide the real
# abs_top_{src/build}dir variables, so don't rely
# on them here. Fake them with 'pwd'
72
TESTS_ENVIRONMENT =				\
J
Jim Meyering 已提交
73 74
  abs_top_builddir=`cd '$(top_builddir)'; pwd`	\
  abs_top_srcdir=`cd '$(top_srcdir)'; pwd`	\
75 76
  abs_builddir=`cd '$(builddir)'; pwd`		\
  abs_srcdir=`cd '$(srcdir)'; pwd`		\
J
Jim Meyering 已提交
77
  PATH="$(path_add)$(PATH_SEPARATOR)$$PATH"	\
78
  SHELL="$(SHELL)"				\
79 80
  $(VG)

81
valgrind:
82
	$(MAKE) check VG="valgrind --quiet --leak-check=full --suppressions=$(srcdir)/.valgrind.supp"
83

K
Karel Zak 已提交
84 85 86 87
# Note: xmlrpc.[c|h] is not in libvirt yet
xmlrpctest_SOURCES = \
	xmlrpctest.c \
	testutils.c testutils.h \
88 89
	@top_srcdir@/src/xmlrpc.c \
	@top_srcdir@/src/xmlrpc.h
K
Karel Zak 已提交
90 91 92

xmlrpctest_LDADD = $(LDADDS)

93
xml2sexprtest_SOURCES = \
94
	xml2sexprtest.c testutilsxen.c testutilsxen.h \
95 96 97 98 99 100 101 102
	testutils.c testutils.h
xml2sexprtest_LDADD = $(LDADDS)

sexpr2xmltest_SOURCES = \
	sexpr2xmltest.c \
	testutils.c testutils.h
sexpr2xmltest_LDADD = $(LDADDS)

103
xmconfigtest_SOURCES = \
104
	xmconfigtest.c testutilsxen.c testutilsxen.h \
105 106 107
	testutils.c testutils.h
xmconfigtest_LDADD = $(LDADDS)

108
qemuxml2argvtest_SOURCES = \
109
	qemuxml2argvtest.c testutilsqemu.c testutilsqemu.h \
110
	testutils.c testutils.h
111
qemuxml2argvtest_LDADD = ../src/libvirt_driver_qemu.la $(LDADDS)
112 113

qemuxml2xmltest_SOURCES = \
114
	qemuxml2xmltest.c testutilsqemu.c testutilsqemu.h \
115
	testutils.c testutils.h
116
qemuxml2xmltest_LDADD = ../src/libvirt_driver_qemu.la $(LDADDS)
117

118 119 120 121 122
virshtest_SOURCES = \
	virshtest.c \
	testutils.c testutils.h
virshtest_LDADD = $(LDADDS)

D
Daniel Veillard 已提交
123 124 125 126
conftest_SOURCES = \
	conftest.c
conftest_LDADD = $(LDADDS)

127 128 129 130
xencapstest_SOURCES = \
	xencapstest.c testutils.h testutils.c
xencapstest_LDADD = $(LDADDS)

131 132 133 134
nodeinfotest_SOURCES = \
	nodeinfotest.c testutils.h testutils.c
nodeinfotest_LDADD = $(LDADDS)

135 136 137 138
statstest_SOURCES = \
	statstest.c testutils.h testutils.c
statstest_LDADD = $(LDADDS)

139 140 141 142
qparamtest_SOURCES = \
	qparamtest.c testutils.h testutils.c
qparamtest_LDADD = $(LDADDS)

143 144 145 146
reconnect_SOURCES = \
	reconnect.c
reconnect_LDADD = $(LDADDS)

147
CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda