[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: few fixlets and improvements
From: |
Stefano Lattarini |
Subject: |
[PATCH] tests: few fixlets and improvements |
Date: |
Mon, 13 Jun 2011 00:12:24 +0200 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
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: <address@hidden>
From: Stefano Lattarini <address@hidden>
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 <address@hidden>
+
+ 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 <address@hidden>
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 <<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"
diff --git a/tests/insh2.test b/tests/insh2.test
index e0a6bcd..11bde9b 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
:
--
1.7.2.3
- [PATCH] tests: few fixlets and improvements,
Stefano Lattarini <=