summaryrefslogtreecommitdiffabout
path: root/t/Makefile.am
authorSergey Poznyakoff <gray@gnu.org>2017-08-19 17:24:59 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2017-08-19 17:28:40 (GMT)
commitde5b0a9c0265b329b0c67cb02381fe7aebfd5186 (patch) (side-by-side diff)
treef8462d313b327c6d3ace6445777e09de862eb8af /t/Makefile.am
parent511f9c9765eb2a9992ea4470703ebcd96faca52b (diff)
downloadruncap-de5b0a9c0265b329b0c67cb02381fe7aebfd5186.tar.gz
runcap-de5b0a9c0265b329b0c67cb02381fe7aebfd5186.tar.bz2
Rewrite testsuite in autotest. Fix distcheck
Diffstat (limited to 't/Makefile.am') (more/less context) (ignore whitespace changes)
-rw-r--r--t/Makefile.am82
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,4 +1,4 @@
-# runcap - run program and capture its output
+# This file is part of runcap testsuite.
# Copyright (C) 2017 Sergey Poznyakoff
#
# Runcap is free software; you can redistribute it and/or modify it
@@ -14,28 +14,74 @@
# You should have received a copy of the GNU General Public License along
# with Runcap. If not, see <http://www.gnu.org/licenses/>.
-TESTPROGS=genout rt
-check: $(TESTPROGS)
- @$(srcdir)/testsuite
+EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4 INPUT
+DISTCLEANFILES = atconfig $(check_SCRIPTS)
+MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
+CLEANFILES = .TESTINIT FAILURE
+
+## ------------ ##
+## package.m4. ##
+## ------------ ##
+
+$(srcdir)/package.m4: $(top_srcdir)/configure.ac
+ $(AM_V_GEN){ \
+ echo '# Signature of the current package.'; \
+ echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
+ echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
+ echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
+ echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
+ echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+ } >$(srcdir)/package.m4
+
+#
+
+## ------------ ##
+## Test suite. ##
+## ------------ ##
+
+TESTSUITE_AT = \
+ testsuite.at\
+ simple.at\
+ lines.at\
+ two.at\
+ longout.at\
+ stdin.at\
+ pipe.at\
+ linemon00.at\
+ linemon01.at\
+ seek00.at\
+ seek01.at
+# Add more files here
+
+TESTSUITE = $(srcdir)/testsuite
+M4=m4
+
+AUTOTEST = $(AUTOM4TE) --language=autotest
+$(TESTSUITE): package.m4 $(TESTSUITE_AT)
+ $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) testsuite.at -o $@.tmp
+ $(AM_V_at)mv $@.tmp $@
+
+atconfig: $(top_builddir)/config.status
+ @cd $(top_builddir) && ./config.status tests/$@
+
+clean-local:
+ @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
+
+check-local: atconfig atlocal $(TESTSUITE)
+ @$(SHELL) $(TESTSUITE)
+
+# Run the test suite on the *installed* tree.
+#installcheck-local:
+# $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
AM_CPPFLAGS=@RUNCAP_INC@
noinst_PROGRAMS = rt genout
rt_SOURCES=rt.c
-rt_LDADD=../libruncap.a
+rt_LDADD=@RUNCAP_LDADD@
genout_SOURCES = genout.c
-TESTSUITE =\
- testsuite\
- 00simple.t\
- 01lines.t\
- 02two.t\
- 03longout.t\
- 04stdin.t\
- 05stdin.t\
- 06mon.t\
- 08seek.t\
- 09seek.t
-
-EXTRA_DIST = $(TESTSUITE) INPUT
+
+
+

Return to:

Send suggestions and report system problems to the System administrator.