summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-06-16 10:56:50 +0200
committerJim Meyering <meyering@redhat.com>2010-06-16 10:56:50 +0200
commit34d36175feb39ad66a7e025e26456b5192d0fa5a (patch)
treeff9fdacdfe4f39c4439d9087984a1380a584cb4c
parent1bd7589f30dae2466d8febab5d6571e88cbb66fe (diff)
downloadidutils-34d36175feb39ad66a7e025e26456b5192d0fa5a.tar.gz
idutils-34d36175feb39ad66a7e025e26456b5192d0fa5a.tar.bz2
idutils-34d36175feb39ad66a7e025e26456b5192d0fa5a.zip
tests: clean up "consistency" and limit the number of files it uses
* testsuite/consistency: Use abs_top_srcdir. Perform tests only on files under src, so it doesn't take so long. Stop using "eval" and an explicit $bindir. Don't re-invoke "make". Not needed, now that $abs_top_srcdir is exported from Makefile (via check.mk) to this script. * testsuite/Makefile.am (consistency-real): Remove rule, now that we no longer use it.
-rw-r--r--testsuite/Makefile.am3
-rwxr-xr-xtestsuite/consistency28
2 files changed, 8 insertions, 23 deletions
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index 2a959b0..3bb2bae 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -18,8 +18,5 @@ EXTRA_DIST = \
DISTCLEANFILES = ID
-consistency-real: all
- $(SHELL) $(srcdir)/consistency $(top_srcdir) $(top_builddir)/src
-
AUTOMAKE_OPTIONS =
include $(srcdir)/check.mk
diff --git a/testsuite/consistency b/testsuite/consistency
index 6e9d028..cb87f0d 100755
--- a/testsuite/consistency
+++ b/testsuite/consistency
@@ -17,25 +17,15 @@
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"
+lang_map="$abs_top_srcdir/libidu/id-lang.map"
errors=
-cmd="$bindir/mkid $m_flag $srcdir"
-echo $cmd
-if eval $cmd; then
- files="`$bindir/fnid | grep -v single_file_token_bug`"
+if mkid -m "$lang_map" $abs_top_srcdir/src; then
+ files="`fnid | grep -v single_file_token_bug`"
- if $bindir/xtokid $m_flag $files |sort -u >ID.xti &&
- $bindir/lid |sed -e 's/[ ].*//' |sort -u >ID.lid &&
+ if xtokid -m "$lang_map" $files |sort -u >ID.xti &&
+ lid |sed -e 's/[ ].*//' |sort -u >ID.lid &&
cmp -s ID.xti ID.lid
then
rm -f ID.xti ID.lid
@@ -52,8 +42,8 @@ if eval $cmd; then
for file in $files
do
- if $bindir/fid $file >$fid_file &&
- $bindir/xtokid $m_flag $file |sort -u >$xtokid_file &&
+ if fid $file >$fid_file &&
+ xtokid -m "$lang_map" $file |sort -u >$xtokid_file &&
cmp -s $xtokid_file $fid_file;
then
echo "Good. xtokid and fid agree for $file"
@@ -70,9 +60,7 @@ else
errors=t
fi
-cmd="$bindir/mkid $m_flag"
-echo $cmd
-if eval $cmd; then
+if mkid -m "$lang_map"; then
echo "Good. No crash when dealing with single file"
else
1>&2 echo "Oops! mkid failed."