From a2abe27a680fde4f81e0f6e100a98027b803b0a7 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Wed, 26 Aug 2009 15:14:14 +0000 Subject: Tests: allow tests2 to pass distcheck * tests/Makefile.am add an SRCDIR symbol. remove unused include paths. * tests/tests2.c: use SRCDIR to find data files. --- tests/Makefile.am | 3 +-- tests/tests2.c | 12 ++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 9f179b37..d3caf3d0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -6,8 +6,6 @@ noinst_PROGRAMS = tests perfs tests2 INCLUDES = \ -DPACKAGE=\"@PACKAGE@\" \ - -I$(top_builddir) \ - -I$(top_srcdir) \ -DTESTSDATADIR=\"$(srcdir)/data/\" \ -DTESTSMETADATADIR=\"$(srcdir)/metadata/\" \ $(LASSO_CFLAGS) \ @@ -26,6 +24,7 @@ tests2_LDADD = \ $(LASSO_LIBS) \ $(CHECK_LIBS) tests2_LDFLAGS = -rpath `cd $(top_srcdir)/lasso/.libs/; pwd` +tests2_CFLAGS = -DSRCDIR=\"$(srcdir)\" perfs_SOURCES = perfs.c perfs_LDADD = $(top_builddir)/lasso/liblasso.la $(LASSO_LIBS) diff --git a/tests/tests2.c b/tests/tests2.c index 6f0c8063..821dc286 100644 --- a/tests/tests2.c +++ b/tests/tests2.c @@ -1,5 +1,5 @@ -#include -#include +#include "../lasso/lasso.h" +#include "../lasso/xml/xml.h" #include #include @@ -24,10 +24,10 @@ void load(char *file) { int main(G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv) { lasso_init(); - load("data/response-1"); - load("data/response-2"); - load("data/response-3"); - load("data/response-4"); + load(SRCDIR "/data/response-1"); + load(SRCDIR "/data/response-2"); + load(SRCDIR "/data/response-3"); + load(SRCDIR "/data/response-4"); lasso_shutdown(); return 0; -- cgit