aboutsummaryrefslogtreecommitdiff
path: root/t/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 't/Makefile.am')
-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,2 +1,2 @@
-# runcap - run program and capture its output
+# This file is part of runcap testsuite.
# Copyright (C) 2017 Sergey Poznyakoff
@@ -16,5 +16,61 @@
-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
@@ -24,3 +80,3 @@ noinst_PROGRAMS = rt genout
rt_SOURCES=rt.c
-rt_LDADD=../libruncap.a
+rt_LDADD=@RUNCAP_LDADD@
@@ -28,14 +84,4 @@ 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.