]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: Run virmacmaptest iff WITH_YAJL
authorMichal Privoznik <mprivozn@redhat.com>
Sun, 25 Dec 2016 09:13:31 +0000 (10:13 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 2 Jan 2017 12:25:42 +0000 (13:25 +0100)
Since the internal implementation relies on a json parser being
available, it make no sense to run this test if there's none
available.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
tests/Makefile.am

index ecd04e895d457e83482ea28590256497c4c3f217..62c5124e6a7861e5c9346d09838c3426ef65553c 100644 (file)
@@ -192,7 +192,6 @@ test_programs = virshtest sockettest \
        domainconftest \
        virhostdevtest \
        vircaps2xmltest \
-       virmacmaptest \
        virnetdevtest \
        virtypedparamtest \
        $(NULL)
@@ -408,7 +407,6 @@ test_libraries = libshunload.la \
                virhostcpumock.la \
                nssmock.la \
                domaincapsmock.la \
-               virmacmapmock.la \
                $(NULL)
 if WITH_QEMU
 test_libraries += libqemumonitortestutils.la \
@@ -1158,6 +1156,7 @@ nssguestlinktest_CFLAGS =         \
 nssguestlinktest_LDADD = ../tools/nss/libnss_libvirt_guest_impl.la
 nssguestlinktest_LDFLAGS = $(NULL)
 
+if WITH_YAJL
 virmacmapmock_la_SOURCES = \
        virmacmapmock.c
 virmacmapmock_la_CFLAGS = $(AM_CFLAGS)
@@ -1166,9 +1165,15 @@ virmacmapmock_la_LIBADD = $(MOCKLIBS_LIBS)
 
 virmacmaptest_SOURCES = \
        virmacmaptest.c testutils.h testutils.c
-virmacmaptest_CLFAGS = $(AM_CFLAGS);
+virmacmaptest_CLFAGS = $(AM_CFLAGS)
 virmacmaptest_LDADD = $(LDADDS)
 
+test_libraries += virmacmapmock.la
+test_programs += virmacmaptest
+else ! WITH_YAJL
+EXTRA_DIST += virmacmapmock.c virmacmaptest.c
+endif ! WITH_YAJL
+
 virnetdevtest_SOURCES = \
        virnetdevtest.c testutils.h testutils.c
 virnetdevtest_CFLAGS = $(AM_CFLAGS) $(LIBNL_CFLAGS)