[PATCH] tests: few fixlets and improvements

2011-06-12 Thread Stefano Lattarini
A simple patch with few minor improvements to four random test cases.

I'll push in 48 hours if there is no objection by then.

Regards,
  Stefano

-*-*-*-

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.
* 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(-)
From 3fc47d1cd6054315178d9b86bbe8301ac6f73bda Mon Sep 17 00:00:00 2001
Message-Id: <3fc47d1cd6054315178d9b86bbe8301ac6f73bda.1307915577.git.stefano.lattar...@gmail.com>
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 the automatic remake
rules were somehow 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 a7f9a4a..df0f6ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2011-06-12  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.
+	* 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-08  Stefano Lattarini  
 
 	testsuite: use 'fatal_' and 'framework_failure_' for hard errors
diff --git a/tests/cond31.test b/tests/cond31.test
index 5110ab1..b94820e 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 f900fd7..5b1c5a5 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 3f793c8..add730f 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
-	

Re: [PATCH] tests: few fixlets and improvements

2011-06-16 Thread Stefano Lattarini
On Monday 13 June 2011, Stefano Lattarini wrote:
> A simple patch with few minor improvements to four random test cases.
> 
> I'll push in 48 hours if there is no objection by then.
> 
> Regards,
>   Stefano
> 
> -*-*-*-
> 
> 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.
> * 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(-)
> 
I've pushed the patch now (to 'testsuite-works').

Regards,
  Stefano