diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-09-14 15:30:00 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-09-14 15:30:00 +0000 |
commit | bd121a0e0440e7182d04eb22f099c96637f212ca (patch) | |
tree | 8e8556b03f6c67488300a23d93dd890fffcc441e /tests | |
parent | af3da1b30f4996b2e65515fcd046914e63e53a7a (diff) | |
download | cflow-bd121a0e0440e7182d04eb22f099c96637f212ca.tar.gz cflow-bd121a0e0440e7182d04eb22f099c96637f212ca.tar.bz2 |
Set up for testsuite
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 65 | ||||
-rw-r--r-- | tests/atlocal.in | 7 | ||||
-rw-r--r-- | tests/testsuite.at | 26 | ||||
-rw-r--r-- | tests/version.at | 33 |
4 files changed, 131 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..f623f12 --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,65 @@ +# Makefile for GNU cflow regression tests. +# Copyright (C) 2005 Sergey Poznyakoff +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2, or (at +# your option) any later version. +# +# This program 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 +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 USA. + +EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4 +DISTCLEANFILES = atconfig $(check_SCRIPTS) +MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE) + +## ------------ ## +## package.m4. ## +## ------------ ## + +$(srcdir)/package.m4: $(top_srcdir)/configure.ac + { \ + 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\ + version.at + +TESTSUITE = $(srcdir)/testsuite + +AUTOTEST = $(AUTOM4TE) --language=autotest +$(TESTSUITE): package.m4 $(TESTSUITE_AT) + $(AUTOTEST) -I $(srcdir) testsuite.at -o $@.tmp + mv $@.tmp $@ + +atconfig: $(top_builddir)/config.status + cd $(top_builddir) && ./config.status tests/$@ + +clean-local: + $(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 diff --git a/tests/atlocal.in b/tests/atlocal.in new file mode 100644 index 0000000..8d6757c --- /dev/null +++ b/tests/atlocal.in @@ -0,0 +1,7 @@ +# @configure_input@ -*- shell-script -*- +# Configurable variable values for GNU test test suite. + +PATH=@abs_builddir@:@abs_top_builddir@/src:$top_srcdir:$srcdir:$PATH +CFLOWDIR=@abs_srcdir@ +#EXAMPLES=@abs_top_srcdir@/examples + diff --git a/tests/testsuite.at b/tests/testsuite.at new file mode 100644 index 0000000..51f268c --- /dev/null +++ b/tests/testsuite.at @@ -0,0 +1,26 @@ +# Process this file with autom4te to create testsuite. -*- Autotest -*- +# Copyright (C) 2005 Sergey Poznyakoff +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2, or (at +# your option) any later version. +# +# This program 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 +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 USA. + +# We need a recent Autotest. +m4_version_prereq([2.52g]) + +AT_INIT + +AT_TESTED([cflow]) + +m4_include([version.at]) diff --git a/tests/version.at b/tests/version.at new file mode 100644 index 0000000..dc49f0c --- /dev/null +++ b/tests/version.at @@ -0,0 +1,33 @@ +# This file is part of GNU cflow testsuite. -*- Autotest -*- +# Copyright (C) 2005 Sergey Poznyakoff +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2, or (at +# your option) any later version. +# +# This program 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 +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 USA. + +AT_SETUP([cflow version]) + +AT_CHECK([cflow --version], + [0], + [cflow (AT_PACKAGE_NAME) AT_PACKAGE_VERSION +], +[], +[], +[ +echo '==============================================================' +echo 'WARNING: Not using the proper version, *all* checks dubious...' +echo '==============================================================' +]) + +AT_CLEANUP |