From cca31bd5ab44dc0e1bd866e49fcc3354b071718b Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sun, 12 Jun 2011 19:35:53 +0200 Subject: [PATCH] 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, 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 | 16 ++++++++++++++++ tests/cond31.test | 1 - tests/confh.test | 1 + tests/fn99subdir.test | 36 +++++++++++++++++++----------------- tests/insh2.test | 15 +++++++++++---- 5 files changed, 47 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 37c0a69c7..9009befd5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2011-06-16 Stefano Lattarini + + 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 tests: don't hard-code test name in txinfo21.test diff --git a/tests/cond31.test b/tests/cond31.test index 5110ab187..b94820e01 100755 --- a/tests/cond31.test +++ b/tests/cond31.test @@ -16,7 +16,6 @@ # Make sure we define conditional _DEPENDENCIES correctly. -required=cc . ./defs || Exit 1 cat >>configure.in <<'EOF' diff --git a/tests/confh.test b/tests/confh.test index f900fd7d8..5b1c5a5ad 100755 --- a/tests/confh.test +++ b/tests/confh.test @@ -45,6 +45,7 @@ mkdir include $ACLOCAL $AUTOCONF +$AUTOHEADER $AUTOMAKE ./configure diff --git a/tests/fn99subdir.test b/tests/fn99subdir.test index 3f793c8d8..add730fc5 100755 --- a/tests/fn99subdir.test +++ b/tests/fn99subdir.test @@ -23,50 +23,52 @@ subdirname='cnfsubdir' cat >>configure.in <Makefile.am <> ${subdirname}/configure.in <> $subdirname/configure.in <${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" diff --git a/tests/insh2.test b/tests/insh2.test index e0a6bcd2f..11bde9b72 100755 --- a/tests/insh2.test +++ b/tests/insh2.test @@ -19,16 +19,23 @@ . ./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 : -- 2.47.2