hydra/tests/Makefile.am

49 lines
1.2 KiB
Makefile
Raw Normal View History

2011-03-16 13:18:12 +00:00
TESTDIR=`pwd`
2011-03-16 10:27:32 +00:00
TESTS_ENVIRONMENT = \
HYDRA_DBI="dbi:SQLite:db.sqlite" \
2011-03-16 13:18:12 +00:00
HYDRA_DATA="$(TESTDIR)/data" \
2011-03-16 10:27:32 +00:00
HYDRA_HOME="$(topsrc_dir)/src" \
NIX_REMOTE= \
2011-03-16 13:18:12 +00:00
NIX_STATE_DIR="$(TESTDIR)/nix/var/nix" \
NIX_STORE_DIR="$(TESTDIR)/nix/store" \
NIX_LOG_DIR="$(TESTDIR)/nix/var/log/nix" \
2011-03-16 10:41:31 +00:00
PERL5LIB=$$PERL5LIB:$(top_srcdir)/src/lib \
2011-03-16 10:27:32 +00:00
perl -w
2011-03-16 08:50:31 +00:00
TESTS = \
2011-03-16 13:18:12 +00:00
query-all-tables.pl \
evaluation-tests.pl
clean :
chmod -R a+w nix
rm -rf db.sqlite data nix git-repo hg-repo svn-repo svn-checkout
2011-03-16 08:50:31 +00:00
2011-03-16 13:18:12 +00:00
$(TESTS) : clean db.sqlite dirs
2011-03-16 08:50:31 +00:00
2011-03-16 09:24:18 +00:00
db.sqlite : $(top_srcdir)/src/sql/hydra-sqlite.sql
sqlite3 db.sqlite < $(top_srcdir)/src/sql/hydra-sqlite.sql
2011-03-16 08:50:31 +00:00
2011-03-16 10:27:32 +00:00
dirs :
2011-03-16 09:46:47 +00:00
mkdir -p data
2011-03-16 10:50:50 +00:00
touch data/hydra.conf
2011-03-16 10:27:32 +00:00
mkdir -p nix
mkdir -p nix/store
mkdir -p nix/var
git-repo:
git init git-repo
touch git-repo/git-file
(cd git-repo; git add git-file ; git commit -m "add git file" git-file)
hg-repo:
hg init hg-repo
touch hg-repo/hg-file
(cd hg-repo; hg add hg-file ; hg commit -m "add hg file" hg-file)
svn-repo:
svnadmin create svn-repo
svn co file://$(TESTDIR)/svn-repo svn-checkout
touch svn-checkout/svn-file
svn add svn-checkout/svn-file
svn commit -m "add svn file" svn-checkout/svn-file