File: Makefile-tests.am

package info (click to toggle)
git-evtag 2022.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 380 kB
  • sloc: ansic: 841; sh: 389; python: 86; makefile: 48; xml: 48
file content (75 lines) | stat: -rw-r--r-- 2,405 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Makefile for tests code
#
# Copyright (C) 2013,2015 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, see <http://www.gnu.org/licenses/>.

AM_TESTS_ENVIRONMENT = \
	PATH="$(abs_top_builddir):$${PATH}" \
	G_TEST_SRCDIR="$(abs_srcdir)" \
	G_TEST_BUILDDIR="$(abs_builddir)" \
	$(NULL)
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/build-aux/tap-driver.sh
LOG_COMPILER = $(srcdir)/tests/tap-test
EXTRA_DIST += tests/gpghome/meson.build
EXTRA_DIST += tests/gpghome/trusted/meson.build
EXTRA_DIST += tests/meson.build
EXTRA_DIST += tests/tap-test
EXTRA_DIST += tests/tap.test.in

test_scripts = \
	tests/test-basic.sh \
	$(NULL)
TESTS = $(test_scripts)

EXTRA_DIST += tests/git-evtag-compute-py

if BUILDOPT_INSTALL_TESTS

insttestdir=$(pkglibexecdir)/installed-tests
dist_insttest_SCRIPTS = $(test_scripts)

testmetadir = $(datadir)/installed-tests/$(PACKAGE)
testmeta_DATA = $(test_scripts:.sh=.test)

dist_insttest_DATA = \
	tests/libtest.sh \
	$(NULL)

dist_insttest_SCRIPTS += src/git-evtag-compute-py

gpginsttestdir = $(pkglibexecdir)/installed-tests/gpghome
dist_gpginsttest_DATA = tests/gpghome/secring.gpg \
	tests/gpghome/trustdb.gpg \
	tests/gpghome/key1.asc \
	tests/gpghome/key2.asc \
	tests/gpghome/key3.asc
gpginsttest_trusteddir = $(pkglibexecdir)/installed-tests/gpghome/trusted
dist_gpginsttest_trusted_DATA = tests/gpghome/trusted/pubring.gpg

install-gpg-data-hook:
	ln -sf trusted/pubring.gpg $(DESTDIR)$(gpginsttestdir)/pubring.gpg 
INSTALL_DATA_HOOKS += install-gpg-data-hook

tests/%.test: tests/%.sh Makefile
	@$(MKDIR_P) tests
	$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
	 echo 'Exec=$(pkglibexecdir)/installed-tests/$(notdir $<)' >> $@.tmp; \
	 echo 'Type=session' >> $@.tmp; \
	 echo 'Output=TAP' >> $@.tmp; \
	 mv $@.tmp $@)

endif

CLEANFILES += $(testmeta_DATA)