2013-05-01 23:26:21 +04:00
# Makefile for tests code
#
# Copyright (C) 2013 Colin Walters <walters@verbum.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
if BUILDOPT_INSTALL_TESTS
insttestdir=$(pkglibexecdir)/installed-tests
2013-07-09 18:41:07 +04:00
testfiles = test-basic \
test-archivez \
test-remote-add \
2013-09-05 22:50:36 +04:00
test-commit-sign \
2013-07-09 18:41:07 +04:00
test-corruption \
test-libarchive \
test-pull-archive-z \
2013-07-09 19:28:49 +04:00
test-pull-corruption \
2013-08-27 00:59:55 +04:00
test-pull-resume \
2013-09-03 05:43:49 +04:00
test-gpg-signed-commit \
2013-07-09 18:41:07 +04:00
test-admin-deploy-1 \
test-admin-deploy-2 \
2013-09-21 19:06:20 +04:00
test-admin-deploy-uboot \
2013-07-18 22:23:55 +04:00
test-setuid \
2013-08-14 17:05:09 +04:00
test-xattrs \
2013-05-01 23:26:21 +04:00
$(NULL)
insttest_SCRIPTS = $(addprefix tests/,$(testfiles:=.sh))
insttest_DATA = tests/archive-test.sh \
tests/pull-test.sh \
tests/libtest.sh \
$(NULL)
2013-09-03 05:43:49 +04:00
gpginsttestdir = $(pkglibexecdir)/installed-tests/gpghome
gpginsttest_DATA = tests/gpghome/secring.gpg \
tests/gpghome/pubring.gpg \
tests/gpghome/trustdb.gpg
2013-05-01 23:26:21 +04:00
%.test: tests/%.sh Makefile
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
echo 'Exec=$(pkglibexecdir)/installed-tests/$(notdir $<)' >> $@.tmp; \
echo 'Type=session' >> $@.tmp; \
echo 'Output=TAP' >> $@.tmp; \
mv $@.tmp $@)
2013-09-18 20:01:46 +04:00
%.test: tests/%.js Makefile
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
2013-10-03 03:47:38 +04:00
echo 'Exec=env TESTDATADIR=$(pkglibexecdir)/installed-tests $(pkglibexecdir)/installed-tests/$(notdir $<)' >> $@.tmp; \
2013-09-18 20:01:46 +04:00
echo 'Type=session' >> $@.tmp; \
mv $@.tmp $@)
2013-05-01 23:26:21 +04:00
testmetadir = $(datadir)/installed-tests/$(PACKAGE)
testmeta_DATA = $(testfiles:=.test)
2013-09-18 20:01:46 +04:00
if BUILDOPT_GJS
2013-10-03 03:47:38 +04:00
insttest_SCRIPTS += tests/test-core.js \
tests/test-sysroot.js \
$(NULL)
testmeta_DATA += test-core.test test-sysroot.test
2013-09-18 20:01:46 +04:00
endif
2013-05-01 23:26:21 +04:00
endif