summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2009-08-26 15:14:14 +0000
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2009-08-26 15:14:14 +0000
commita2abe27a680fde4f81e0f6e100a98027b803b0a7 (patch)
tree124b2eda4968a7cd8f976bd3e7659d7496c8e195
parente1470be9692b6e7afe619cb025082e346f604369 (diff)
downloadlasso-a2abe27a680fde4f81e0f6e100a98027b803b0a7.tar.gz
lasso-a2abe27a680fde4f81e0f6e100a98027b803b0a7.tar.xz
lasso-a2abe27a680fde4f81e0f6e100a98027b803b0a7.zip
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.
-rw-r--r--tests/Makefile.am3
-rw-r--r--tests/tests2.c12
2 files changed, 7 insertions, 8 deletions
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 <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;