From 6b0da4625f7fe1028ec45331876dbd937d8923e2 Mon Sep 17 00:00:00 2001
From: Rob Vermaas <rob.vermaas@gmail.com>
Date: Wed, 16 Mar 2011 09:46:47 +0000
Subject: [PATCH] setup environment variables for tests

---
 tests/Makefile.am | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 56080e5b..a6559a71 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,8 +1,11 @@
+TESTS_ENVIRONMENT = HYDRA_DBI="dbi:SQLite:db.sqlite" HYDRA_DATA="$(top_srcdir)/tests/data" HYDRA_HOME="$(topsrc_dir)/src"
 TESTS = \
   query-all-tables.pl
 
-$(TESTS) : db.sqlite
+$(TESTS) : db.sqlite data
 
 db.sqlite : $(top_srcdir)/src/sql/hydra-sqlite.sql
 	sqlite3 db.sqlite <  $(top_srcdir)/src/sql/hydra-sqlite.sql
 
+data :
+	mkdir -p data