tests: fix xlconfigtest build failure

When libvirt is configured --without-xen, building the xlconfigtest
fails with

  CCLD   xlconfigtest
  /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crt1.o
  In function `_start': (.text+0x20): undefined reference to `main'
  collect2: error: ld returned 1 exit status

Introduced in commit 4ed5fb91 by too much copy and paste from
xmconfigtest.
This commit is contained in:
Jim Fehlig 2015-01-20 16:45:09 -07:00
parent c803c070c4
commit e274d5882e
2 changed files with 14 additions and 7 deletions

View File

@ -483,11 +483,6 @@ sexpr2xmltest_SOURCES = \
testutils.c testutils.h testutils.c testutils.h
sexpr2xmltest_LDADD = $(xen_LDADDS) sexpr2xmltest_LDADD = $(xen_LDADDS)
xlconfigtest_SOURCES = \
xlconfigtest.c testutilsxen.c testutilsxen.h \
testutils.c testutils.h
xlconfigtest_LDADD =$(xen_LDADDS)
xmconfigtest_SOURCES = \ xmconfigtest_SOURCES = \
xmconfigtest.c testutilsxen.c testutilsxen.h \ xmconfigtest.c testutilsxen.c testutilsxen.h \
testutils.c testutils.h testutils.c testutils.h
@ -511,6 +506,18 @@ EXTRA_DIST += xml2sexprtest.c sexpr2xmltest.c xmconfigtest.c \
testutilsxen.c testutilsxen.h testutilsxen.c testutilsxen.h
endif ! WITH_XEN endif ! WITH_XEN
if WITH_LIBXL
libxl_LDADDS = ../src/libvirt_driver_libxl_impl.la
libxl_LDADDS += $(LDADDS)
xlconfigtest_SOURCES = \
xlconfigtest.c testutilsxen.c testutilsxen.h \
testutils.c testutils.h
xlconfigtest_LDADD =$(libxl_LDADDS)
else ! WITH_LIBXL
EXTRA_DIST += xlconfigtest.c
endif ! WITH_LIBXL
QEMUMONITORTESTUTILS_SOURCES = \ QEMUMONITORTESTUTILS_SOURCES = \
qemumonitortestutils.c \ qemumonitortestutils.c \
qemumonitortestutils.h \ qemumonitortestutils.h \

View File

@ -36,7 +36,7 @@
#include "virstring.h" #include "virstring.h"
#include "testutils.h" #include "testutils.h"
#include "testutilsxen.h" #include "testutilsxen.h"
#include "xen/xen_driver.h" #include "libxl/libxl_conf.h"
#define VIR_FROM_THIS VIR_FROM_NONE #define VIR_FROM_THIS VIR_FROM_NONE
@ -198,7 +198,7 @@ mymain(void)
if (!(caps = testXLInitCaps())) if (!(caps = testXLInitCaps()))
return EXIT_FAILURE; return EXIT_FAILURE;
if (!(xmlopt = xenDomainXMLConfInit())) if (!(xmlopt = libxlCreateXMLConf()))
return EXIT_FAILURE; return EXIT_FAILURE;
#define DO_TEST(name, version) \ #define DO_TEST(name, version) \