+2011-06-16 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tests: few fixlets and improvements
+ * tests/cond31.test ($required): Remove `cc', it's not really
+ needed.
+ * tests/confh.test: Call autoheader too. The lack of this call
+ wasn't causing spurious failures because the automatic remake
+ rules were somehow invoking it on our behalf (at make time).
+ * tests/fn99subdir.test: Use $subdirname throughout, instead of
+ ${subdirname}, for consistency with the rest of the testsuite.
+ Avoid an unnecessary subshell, which could also cause spurious
+ passes, being guarded by a trailing `|| Exit 1', which neutralize
+ the `errexit' flag. Remove an unnecessary `|| Exit 1' guard.
+ * tests/insh2.test: Rewrite to avoid hackish Makefile.in munging,
+ and to also run configure and make.
+
2011-06-13 Stefano Lattarini <stefano.lattarini@gmail.com>
tests: don't hard-code test name in txinfo21.test
# Make sure we define conditional _DEPENDENCIES correctly.
-required=cc
. ./defs || Exit 1
cat >>configure.in <<'EOF'
$ACLOCAL
$AUTOCONF
+$AUTOHEADER
$AUTOMAKE
./configure
subdirname='cnfsubdir'
cat >>configure.in <<END
-AC_CONFIG_SUBDIRS([${subdirname}])
+AC_CONFIG_SUBDIRS([$subdirname])
AC_OUTPUT
END
cat >Makefile.am <<END
AUTOMAKE_OPTIONS = filename-length-max=99
-SUBDIRS = ${subdirname}
+SUBDIRS = $subdirname
END
-mkdir ${subdirname} || Exit 1
+mkdir $subdirname
-cat >> ${subdirname}/configure.in <<EOF
-AC_INIT([${subdirname}], [1.0])
+cat >> $subdirname/configure.in <<EOF
+AC_INIT([$subdirname], [1.0])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
EOF
-cat >${subdirname}/Makefile.am <<'END'
+cat >$subdirname/Makefile.am <<'END'
AUTOMAKE_OPTIONS = filename-length-max=99
EXTRA_DIST = 12345678
END
-(cd ${subdirname} || Exit 1
+(cd $subdirname || Exit 1
for i in 1 2 3 4 5 6 7 8; do
mkdir -p 12345678 && cd 12345678 && touch x || Exit 1
done) || skip_ "failed to create deep directory hierarchy"
# AIX 5.3 `cp -R' is too buggy for `make dist'.
-cp -R ${subdirname} t \
+cp -R $subdirname t \
|| skip_ "'cp -R' failed to copy deep directory hierarchy"
-for init_dir in ${subdirname} .; do
- (
- cd ${init_dir} || Exit 1
- $ACLOCAL
- $AUTOCONF
- $AUTOMAKE
- ) || Exit 1
-done
+cd $subdirname
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+cd ..
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
./configure
$MAKE distcheck
-(cd ${subdirname} || Exit 1
+(cd $subdirname || Exit 1
for i in 1 2 3 4 5 6 7 8 9; do
mkdir -p 12345678 && cd 12345678 && touch x || Exit 1
done) || skip_ "failed to create deeper directory hierarchy"
. ./defs || Exit 1
+echo AC_OUTPUT >> configure.in
+
cat > Makefile.am << 'END'
pkgdata_DATA =
-magic:
- @echo $(DISTFILES)
+.PHONY: test
+test: distdir
+ find $(distdir) ;: For debugging.
+ echo ' ' $(DISTFILES) ' ' | grep '[ /]install-sh '
+ echo ' ' $(DIST_COMMON) ' ' | grep '[ /]install-sh '
+ test -f $(distdir)/install-sh
END
$ACLOCAL
$AUTOMAKE
+$AUTOCONF
-$FGREP -v @SET_MAKE@ Makefile.in > Makefile.sed
-$MAKE -s -f Makefile.sed SHELL=$SHELL magic | grep install-sh
+./configure
+$MAKE test
: