summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorGreg McGary <greg@mcgary.org>1997-04-18 06:43:32 +0000
committerGreg McGary <greg@mcgary.org>1997-04-18 06:43:32 +0000
commit916418ea1284e6aa64f50eba077e48ced5944acc (patch)
tree8e519e3a48ae80c8c17da3ba5acccd91530b22ff /testsuite
parenta560adff07afe7c1f35e4585e0694e89c842b245 (diff)
downloadidutils-916418ea1284e6aa64f50eba077e48ced5944acc.tar.gz
idutils-916418ea1284e6aa64f50eba077e48ced5944acc.tar.bz2
idutils-916418ea1284e6aa64f50eba077e48ced5944acc.zip
Initial revision
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/Makefile.am8
-rw-r--r--testsuite/Makefile.in159
-rwxr-xr-xtestsuite/consistency63
3 files changed, 230 insertions, 0 deletions
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
new file mode 100644
index 0000000..938a21d
--- /dev/null
+++ b/testsuite/Makefile.am
@@ -0,0 +1,8 @@
+## Process this file with automake to create Makefile.in
+
+TESTS = consistency
+
+EXTRA_DIST = $(TESTS)
+
+consistency-real: all
+ $(SHELL) $(srcdir)/consistency $(top_srcdir) $(top_builddir)/src
diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in
new file mode 100644
index 0000000..3c763f6
--- /dev/null
+++ b/testsuite/Makefile.in
@@ -0,0 +1,159 @@
+# Makefile.in generated automatically by automake 1.0 from Makefile.am
+
+# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+TESTS = consistency
+
+EXTRA_DIST = $(TESTS)
+mkinstalldirs = $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+DIST_COMMON = Makefile.am Makefile.in
+
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
+ $(TEXINFOS) $(INFOS) $(MANS) $(EXTRA_DIST) $(DATA)
+DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
+ $(TEXINFOS) $(INFO_DEPS) $(MANS) $(EXTRA_DIST) $(DATA)
+
+TAR = tar
+default: all
+
+
+$(srcdir)/Makefile.in: @MAINT@Makefile.am $(top_srcdir)/configure.in
+ cd $(top_srcdir) && automake $(subdir)/Makefile
+
+Makefile: $(top_builddir)/config.status Makefile.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+tags: TAGS
+TAGS:
+
+
+subdir = testsuite
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+distdir: $(DEP_DISTFILES)
+ @for file in `cd $(srcdir) && echo $(DISTFILES)`; do \
+ test -f $(distdir)/$$file \
+ || ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir)/$$file; \
+ done
+check-TESTS: $(TESTS)
+ @failed=0; all=0; \
+ srcdir=$(srcdir); export srcdir; \
+ for tst in $(TESTS); do \
+ all=`expr $$all + 1`; \
+ if test -f $$tst; then dir=.; \
+ else dir="$(srcdir)"; fi; \
+ if $$dir/$$tst; then \
+ echo "PASS: $$tst"; \
+ else \
+ failed=`expr $$failed + 1`; \
+ echo "FAIL: $$tst"; \
+ fi; \
+ done; \
+ if test "$$failed" -eq 0; then \
+ echo "========================"; \
+ echo "All $$all tests passed"; \
+ echo "========================"; \
+ else \
+ echo "$$failed of $$all tests failed"; \
+ fi
+info:
+
+dvi:
+
+check: all check-TESTS
+
+installcheck:
+
+install-exec:
+
+install-data:
+
+install: install-exec install-data all
+ @:
+
+uninstall:
+
+all: Makefile
+
+install-strip:
+ $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
+installdirs:
+
+
+mostlyclean-generic:
+ test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+ test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ rm -f Makefile $(DISTCLEANFILES)
+ rm -f config.cache config.log $(CONFIG_HEADER) stamp-h
+
+maintainer-clean-generic:
+ test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+mostlyclean: mostlyclean-generic
+
+clean: clean-generic mostlyclean
+
+distclean: distclean-generic clean
+ rm -f config.status
+
+maintainer-clean: maintainer-clean-generic distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+.PHONY: default tags distdir check-TESTS info dvi check installcheck \
+install-exec install-data install uninstall all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+consistency-real: all
+ $(SHELL) $(srcdir)/consistency $(top_srcdir) $(top_builddir)/src
+.SUFFIXES:
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/testsuite/consistency b/testsuite/consistency
new file mode 100755
index 0000000..d375b2e
--- /dev/null
+++ b/testsuite/consistency
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+export LANG; LANG=C
+
+case $# in
+0) exec make consistency-real;;
+esac
+
+srcdir=$1
+bindir=$2
+libdir=$srcdir/libidu
+
+m_flag="-m $libdir/id-lang.map"
+
+errors=
+
+cmd="$bindir/mkid $m_flag $srcdir"
+echo $cmd
+if eval $cmd; then
+ files="`$bindir/fnid || exit 1`"
+
+ if $bindir/xtokid $m_flag $files |sort -u >ID.xti &&
+ $bindir/lid |sed -e 's/[ ].*//' |sort -u >ID.lid &&
+ cmp -s ID.xti ID.lid
+ then
+ rm -f ID.xti ID.lid
+ echo "Good. xtokid and lid agree."
+ else
+ mv ID.xti ID.bad-xti
+ mv ID.fid ID.bad-fid
+ 1>&2 echo "Oops! xtokid and lid disagree--look in ID.bad-{xtokid,lid}"
+ errors=t
+ fi
+
+ xtokid_file=$$.xti
+ fid_file=$$.fid
+
+ for file in $files
+ do
+ if $bindir/fid $file >$fid_file &&
+ $bindir/xtokid $m_flag $file |sort -u >$xtokid_file &&
+ cmp -s $xtokid_file $fid_file;
+ then
+ echo "Good. xtokid and fid agree for $file"
+ else
+ 1>&2 echo "Oops! xtokid and fid disagree for $file--look in $file.bad-{xtokid,fid}"
+ mv $xtokid_file $file.bad-xti
+ mv $fid_file $file.bad-fid
+ errors=t
+ fi
+ done
+ rm -f $xtokid_file $fid_file
+else
+ 1>&2 echo "Oops! mkid failed."
+ errors=t
+fi
+
+case x$errors in
+xt) echo "Some checks failed."
+ exit 1;;
+*) echo "All checks successful."
+ exit 0;;
+esac