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.
This commit is contained in:
Benjamin Dauvergne 2009-08-26 15:14:14 +00:00
parent e1470be969
commit a2abe27a68
2 changed files with 7 additions and 8 deletions

View File

@ -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)

View File

@ -1,5 +1,5 @@
#include <lasso/lasso.h>
#include <lasso/xml/xml.h>
#include "../lasso/lasso.h"
#include "../lasso/xml/xml.h"
#include <glib.h>
#include <libxml/tree.h>
@ -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;