diff options
Diffstat (limited to 't/Makefile.am')
-rw-r--r-- | t/Makefile.am | 82 |
1 files changed, 64 insertions, 18 deletions
diff --git a/t/Makefile.am b/t/Makefile.am index 681184f..b41aa20 100644 --- a/t/Makefile.am +++ b/t/Makefile.am | |||
@@ -1,7 +1,7 @@ | |||
1 | # runcap - run program and capture its output | 1 | # This file is part of runcap testsuite. |
2 | # Copyright (C) 2017 Sergey Poznyakoff | 2 | # Copyright (C) 2017 Sergey Poznyakoff |
3 | # | 3 | # |
4 | # Runcap is free software; you can redistribute it and/or modify it | 4 | # Runcap is free software; you can redistribute it and/or modify it |
5 | # under the terms of the GNU General Public License as published by the | 5 | # under the terms of the GNU General Public License as published by the |
6 | # Free Software Foundation; either version 3 of the License, or (at your | 6 | # Free Software Foundation; either version 3 of the License, or (at your |
7 | # option) any later version. | 7 | # option) any later version. |
@@ -11,31 +11,77 @@ | |||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | # GNU General Public License for more details. | 12 | # GNU General Public License for more details. |
13 | # | 13 | # |
14 | # You should have received a copy of the GNU General Public License along | 14 | # You should have received a copy of the GNU General Public License along |
15 | # with Runcap. If not, see <http://www.gnu.org/licenses/>. | 15 | # with Runcap. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | ||
17 | TESTPROGS=genout rt | 17 | EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4 INPUT |
18 | check: $(TESTPROGS) | 18 | DISTCLEANFILES = atconfig $(check_SCRIPTS) |
19 | @$(srcdir)/testsuite | 19 | MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE) |
20 | CLEANFILES = .TESTINIT FAILURE | ||
21 | |||
22 | ## ------------ ## | ||
23 | ## package.m4. ## | ||
24 | ## ------------ ## | ||
25 | |||
26 | $(srcdir)/package.m4: $(top_srcdir)/configure.ac | ||
27 | $(AM_V_GEN){ \ | ||
28 | echo '# Signature of the current package.'; \ | ||
29 | echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \ | ||
30 | echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \ | ||
31 | echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \ | ||
32 | echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \ | ||
33 | echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ | ||
34 | } >$(srcdir)/package.m4 | ||
35 | |||
36 | # | ||
37 | |||
38 | ## ------------ ## | ||
39 | ## Test suite. ## | ||
40 | ## ------------ ## | ||
41 | |||
42 | TESTSUITE_AT = \ | ||
43 | testsuite.at\ | ||
44 | simple.at\ | ||
45 | lines.at\ | ||
46 | two.at\ | ||
47 | longout.at\ | ||
48 | stdin.at\ | ||
49 | pipe.at\ | ||
50 | linemon00.at\ | ||
51 | linemon01.at\ | ||
52 | seek00.at\ | ||
53 | seek01.at | ||
54 | # Add more files here | ||
55 | |||
56 | TESTSUITE = $(srcdir)/testsuite | ||
57 | M4=m4 | ||
58 | |||
59 | AUTOTEST = $(AUTOM4TE) --language=autotest | ||
60 | $(TESTSUITE): package.m4 $(TESTSUITE_AT) | ||
61 | $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) testsuite.at -o $@.tmp | ||
62 | $(AM_V_at)mv $@.tmp $@ | ||
63 | |||
64 | atconfig: $(top_builddir)/config.status | ||
65 | @cd $(top_builddir) && ./config.status tests/$@ | ||
66 | |||
67 | clean-local: | ||
68 | @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean | ||
69 | |||
70 | check-local: atconfig atlocal $(TESTSUITE) | ||
71 | @$(SHELL) $(TESTSUITE) | ||
72 | |||
73 | # Run the test suite on the *installed* tree. | ||
74 | #installcheck-local: | ||
75 | # $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin | ||
20 | 76 | ||
21 | AM_CPPFLAGS=@RUNCAP_INC@ | 77 | AM_CPPFLAGS=@RUNCAP_INC@ |
22 | 78 | ||
23 | noinst_PROGRAMS = rt genout | 79 | noinst_PROGRAMS = rt genout |
24 | rt_SOURCES=rt.c | 80 | rt_SOURCES=rt.c |
25 | rt_LDADD=../libruncap.a | 81 | rt_LDADD=@RUNCAP_LDADD@ |
26 | 82 | ||
27 | genout_SOURCES = genout.c | 83 | genout_SOURCES = genout.c |
28 | 84 | ||
29 | TESTSUITE =\ | 85 | |
30 | testsuite\ | 86 | |
31 | 00simple.t\ | 87 | |
32 | 01lines.t\ | ||
33 | 02two.t\ | ||
34 | 03longout.t\ | ||
35 | 04stdin.t\ | ||
36 | 05stdin.t\ | ||
37 | 06mon.t\ | ||
38 | 08seek.t\ | ||
39 | 09seek.t | ||
40 | |||
41 | EXTRA_DIST = $(TESTSUITE) INPUT | ||