]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: few fixlets and improvements
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 12 Jun 2011 17:35:53 +0000 (19:35 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 16 Jun 2011 08:09:25 +0000 (10:09 +0200)
* 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, when make was called,
the automatic remake rules somehow ended up invoking it on our
behalf.
* 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.

ChangeLog
tests/cond31.test
tests/confh.test
tests/fn99subdir.test
tests/insh2.test

index 37c0a69c7fb62c9e4440e21929712e73978f1d53..9009befd50c83117b062e059ce4ffc914c2fb826 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+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
index 5110ab187dee27bc55410b47edbd11d078a3b072..b94820e015facab404f3fd98f1bad33114629b49 100755 (executable)
@@ -16,7 +16,6 @@
 
 # Make sure we define conditional _DEPENDENCIES correctly.
 
-required=cc
 . ./defs || Exit 1
 
 cat >>configure.in <<'EOF'
index f900fd7d87e0b969978c55499a64af3379826f81..5b1c5a5adb89638f37bcfbb82eed92c59e3138cc 100755 (executable)
@@ -45,6 +45,7 @@ mkdir include
 
 $ACLOCAL
 $AUTOCONF
+$AUTOHEADER
 $AUTOMAKE
 
 ./configure
index 3f793c8d8ad56db5609452182cb16bd850ec9c9f..add730fc57ef9ad8a163c63c439ebc4aa502c556 100755 (executable)
 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"
index e0a6bcd2ff4a05741cc06ed49ff64e7135b179bf..11bde9b721df2c3e2ce5021b67aebe0f166a4237 100755 (executable)
 
 . ./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
 
 :