[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Enable `set -e' in more tests (plus some tweakings).
From: |
Stefano Lattarini |
Subject: |
Re: [PATCH] Enable `set -e' in more tests (plus some tweakings). |
Date: |
Wed, 1 Sep 2010 15:34:11 +0200 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
A small update.
Since the newer patch "Extend tests on AC_LIBOBJ and friends" already
takes care of all the `*libobj*.test' tests, I've removed from this
patch any change done to them.
Regards,
Stefano
From 9fa9c62dbe6da930499ff9f8fd0f1207304e14ee Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Fri, 20 Aug 2010 19:53:38 +0200
Subject: [PATCH] Enable `set -e' in more tests (plus some tweakings).
* tests/implicit.test: Enable `errexit' shell flag, and related
changes. Add trailing `:' command.
* tests/insh2.test: Likewise.
* tests/instman2.test: Likewise.
* tests/interp.test: Likewise.
* tests/interp2.test: Likewise.
* tests/library.test: Likewise.
* tests/mclean.test: Likewise.
* tests/info.test: Enable `errexit' shell flag, and related
changes. Add trailing `:' command. Remove useless chaff from
generated Makefile.am. Add a "FIXME" comment.
* tests/include.test: Enable `errexit' shell flag, and related
changes. Add trailing `:' command. Prefer cat + here-doc over
echo to append to configure.in. Make tests more robust by using
longer and less common names to grep. Remove an useless call to
echo. Remove an useless subshell.
* tests/header.test: Enable `errexit' shell flag, and related
changes. Use proper m4 quoting. Add excerpts from the original
report of the bug tested for by this script.
* tests/gcj.test: Enable `errexit' shell flag, and related
changes. Use proper m4 quoting. Add trailing `:' command.
* tests/gcj3.test: Likewise.
* tests/ldflags.test: Likewise.
* tests/libtool.test: Likewise.
* tests/listval.test: Likewise.
* tests/javaprim.test: Likewise, and prefer cat + here-doc over
echo to append to configure.in.
* tests/javasubst.test: Likewise.
* tests/discorver.test: Enable `errexit' shell flag. Prefer
trailing `:' over trailing `Exit 0'.
* tests/instdat.test: Enable `errexit' shell flag, and related
changes. Use proper m4 quoting. Avoid usless subshell. Prefer
cat + here-doc over echo to append to configure.in.
* tests/libtool2.test: Enable `errexit' shell flag, and related
changes. Add trailing `:' command. Use the configure.in
stub provided by ./defs, rather than writing it from scratch.
---
ChangeLog | 40 ++++++++++++++++++++++++++++++++++++++++
tests/discover.test | 4 +++-
tests/gcj.test | 14 +++++++++-----
tests/gcj3.test | 14 +++++++++-----
tests/header.test | 17 +++++++++++++----
tests/implicit.test | 10 +++++++---
tests/include.test | 28 +++++++++++++++++-----------
tests/info.test | 16 ++++++++++------
tests/insh2.test | 12 ++++++++----
tests/instdat.test | 14 +++++++++-----
tests/instman2.test | 10 +++++++---
tests/interp.test | 10 +++++++---
tests/interp2.test | 8 ++++++--
tests/javaprim.test | 12 +++++++++---
tests/javasubst.test | 14 ++++++++++----
tests/ldflags.test | 11 ++++++++---
tests/library.test | 9 +++++++--
tests/libtool.test | 13 +++++++++----
tests/libtool2.test | 20 +++++++++-----------
tests/listval.test | 11 ++++++++---
tests/mclean.test | 10 +++++++---
21 files changed, 212 insertions(+), 85 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 934eba6..4560858 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,43 @@
+2010-08-22 Stefano Lattarini <address@hidden>
+
+ Enable `set -e' in more tests (plus some tweakings).
+ * tests/implicit.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command.
+ * tests/insh2.test: Likewise.
+ * tests/instman2.test: Likewise.
+ * tests/interp.test: Likewise.
+ * tests/interp2.test: Likewise.
+ * tests/library.test: Likewise.
+ * tests/mclean.test: Likewise.
+ * tests/info.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Remove useless chaff from
+ generated Makefile.am. Add a "FIXME" comment.
+ * tests/include.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Prefer cat + here-doc over
+ echo to append to configure.in. Make tests more robust by using
+ longer and less common names to grep. Remove an useless call to
+ echo. Remove an useless subshell.
+ * tests/header.test: Enable `errexit' shell flag, and related
+ changes. Use proper m4 quoting. Add excerpts from the original
+ report of the bug tested for by this script.
+ * tests/gcj.test: Enable `errexit' shell flag, and related
+ changes. Use proper m4 quoting. Add trailing `:' command.
+ * tests/gcj3.test: Likewise.
+ * tests/ldflags.test: Likewise.
+ * tests/libtool.test: Likewise.
+ * tests/listval.test: Likewise.
+ * tests/javaprim.test: Likewise, and prefer cat + here-doc over
+ echo to append to configure.in.
+ * tests/javasubst.test: Likewise.
+ * tests/discorver.test: Enable `errexit' shell flag. Prefer
+ trailing `:' over trailing `Exit 0'.
+ * tests/instdat.test: Enable `errexit' shell flag, and related
+ changes. Use proper m4 quoting. Avoid usless subshell. Prefer
+ cat + here-doc over echo to append to configure.in.
+ * tests/libtool2.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Use the configure.in
+ stub provided by ./defs, rather than writing it from scratch.
+
2010-08-18 Stefano Lattarini <address@hidden>
Fix potential regressions in depcomp{3,5}.test.
diff --git a/tests/discover.test b/tests/discover.test
index 0e4faa3..f319604 100755
--- a/tests/discover.test
+++ b/tests/discover.test
@@ -19,6 +19,8 @@
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_RANLIB
AC_PROG_CC
@@ -39,4 +41,4 @@ AUTOMAKE_fails
grep 'automatically discovered.*fsusage\.c.*explicitly mentioned' stderr
-Exit 0
+:
diff --git a/tests/gcj.test b/tests/gcj.test
index c32a1b2..b9819dd 100755
--- a/tests/gcj.test
+++ b/tests/gcj.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,9 +18,11 @@
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
-_AM_DEPENDENCIES(GCJ)
-AC_SUBST(GCJ)
+_AM_DEPENDENCIES([GCJ])
+AC_SUBST([GCJ])
END
cat > Makefile.am << 'END'
@@ -28,7 +30,9 @@ bin_PROGRAMS = convert
convert_SOURCES = x/y/convert.java
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^x/y/convert' Makefile.in
+
+:
diff --git a/tests/gcj3.test b/tests/gcj3.test
index 7d8a981..5652124 100755
--- a/tests/gcj3.test
+++ b/tests/gcj3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,9 +18,11 @@
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
-_AM_DEPENDENCIES(GCJ)
-AC_SUBST(GCJ)
+_AM_DEPENDENCIES([GCJ])
+AC_SUBST([GCJ])
END
cat > Makefile.am << 'END'
@@ -28,8 +30,10 @@ bin_PROGRAMS = convert
convert_SOURCES = x/y/convert.java
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
num=`grep depcomp Makefile.in | wc -l`
test $num -gt 1
+
+:
diff --git a/tests/header.test b/tests/header.test
index 2ad2735..bd06b16 100755
--- a/tests/header.test
+++ b/tests/header.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,11 +15,20 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test for PR 68.
+#
+# == Report ==
+# If an autoconf substitution variable of the form "*_HEADERS" --
+# for example "MY_HEADERS" -- is used in an "include_" variable
+# in conjunction with EXTRA_HEADERS, $(MY_HEADERS) gets included
+# in the HEADERS variable for *all* generated Makefile.ins in the
+# project.
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
-AC_SUBST(MY_HEADERS)
+AC_SUBST([MY_HEADERS])
AC_PROG_CC
END
@@ -31,8 +40,8 @@ END
: > joe.c
: > qq.h
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'address@hidden' Makefile.in && Exit 1
Exit 0
diff --git a/tests/implicit.test b/tests/implicit.test
index 210b2dc..c1c3479 100755
--- a/tests/implicit.test
+++ b/tests/implicit.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,6 +19,8 @@
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
END
@@ -27,7 +29,9 @@ cat > Makefile.am << 'END'
noinst_PROGRAMS = libapp_1
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^libapp_1_OBJECTS' Makefile.in | $FGREP '.$(OBJEXT)'
+
+:
diff --git a/tests/include.test b/tests/include.test
index 350f8fc..180b025 100755
--- a/tests/include.test
+++ b/tests/include.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2005, 2006, 2010 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,22 +20,25 @@
. ./defs || Exit 1
-echo AC_OUTPUT >> configure.in
+set -e
+
+cat >> configure.in <<END
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
-include foo
+include Will_Be_Included_In_Makefile
END
-: > foo
+: > Will_Be_Included_In_Makefile
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-len="`grep '^srcdir' Makefile.in | wc -l`"
-echo "len = $len"
-test $len -eq 1 || Exit 1
+$ACLOCAL
+$AUTOMAKE
+len=`grep '^srcdir' Makefile.in | wc -l`
+test $len -eq 1
# Also make sure include file is distributed.
-(sed -n -e '/^DIST_COMMON =.*\\$/ {
+sed -n -e '/^DIST_COMMON =.*\\$/ {
:loop
p
n
@@ -44,4 +48,6 @@ test $len -eq 1 || Exit 1
t loop
p
n
- }' -e '/^DIST_COMMON =/ p' Makefile.in | grep foo)
+ }' -e '/^DIST_COMMON =/ p' Makefile.in | grep Will_Be_Included_In_Makefile
+
+:
diff --git a/tests/info.test b/tests/info.test
index 2cde524..e99a187 100755
--- a/tests/info.test
+++ b/tests/info.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,21 +16,22 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test to make sure info files are distributed correctly.
+# FIXME: This test is probably obsoleted, or wrong. The generated
+# Makefile.in seems not to define any `INFOS' variable!
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
info_TEXINFOS = foo.texi
-
-magic:
- @echo $(INFOS)
END
echo '@setfilename foo.info' > foo.texi
: > texinfo.tex
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
for i in `grep '^INFOS =' Makefile.in | sed -e 's/^INFOS = //'`; do
echo $i
@@ -41,3 +43,5 @@ for i in `grep '^INFOS =' Makefile.in | sed -e 's/^INFOS =
//'`; do
;;
esac
done
+
+:
diff --git a/tests/insh2.test b/tests/insh2.test
index c64f1f7..c3da9a9 100755
--- a/tests/insh2.test
+++ b/tests/insh2.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2010 Free
+# Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,14 +19,18 @@
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
pkgdata_DATA =
magic:
@echo $(DISTFILES)
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
$FGREP -v @SET_MAKE@ Makefile.in > Makefile.sed
$MAKE -s -f Makefile.sed SHELL=$SHELL magic | grep install-sh
+
+:
diff --git a/tests/instdat.test b/tests/instdat.test
index a6ec01a..d5b4d07 100755
--- a/tests/instdat.test
+++ b/tests/instdat.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,12 +19,16 @@
. ./defs || Exit 1
-echo 'AC_SUBST(INSTALL_DATA)' >> configure.in
+set -e
+
+cat >> configure.in <<END
+AC_SUBST([INSTALL_DATA])
+END
: > Makefile.am
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
-(grep '^DATA =' Makefile.in | grep INSTALL_DATA) && Exit 1
+grep '^DATA =' Makefile.in | grep 'INSTALL_DATA' && Exit 1
Exit 0
diff --git a/tests/instman2.test b/tests/instman2.test
index 77844fa..c519214 100755
--- a/tests/instman2.test
+++ b/tests/instman2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,13 +19,17 @@
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'EOF'
man8_MANS = frob.8
EOF
: > frob.8
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^install-man' Makefile.in
+
+:
diff --git a/tests/interp.test b/tests/interp.test
index af82e33..82938f9 100755
--- a/tests/interp.test
+++ b/tests/interp.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,6 +18,8 @@
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
END
@@ -28,7 +30,9 @@ s1 = z.c
qqq_SOURCES = $(s1)
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
$FGREP 'z.$(OBJEXT)' Makefile.in
+
+:
diff --git a/tests/interp2.test b/tests/interp2.test
index cff8d1d..a25d531 100755
--- a/tests/interp2.test
+++ b/tests/interp2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,6 +19,8 @@
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
AC_PATH_X
@@ -31,5 +33,7 @@ x_SOURCES = x.c
x_LDADD = $(X_EXTRA_LIBS)
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/javaprim.test b/tests/javaprim.test
index aa1506b..988024d 100755
--- a/tests/javaprim.test
+++ b/tests/javaprim.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,12 +18,18 @@
. ./defs || Exit 1
-echo 'AC_SUBST(JAVA)' >> configure.in
+set -e
+
+cat >> configure.in << 'END'
+AC_SUBST([JAVA])
+END
cat > Makefile.am << 'END'
javadir = $(datadir)/java
java_JAVA = a.java b.java c.java
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/javasubst.test b/tests/javasubst.test
index d018645..ae6bb78 100755
--- a/tests/javasubst.test
+++ b/tests/javasubst.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,14 +18,20 @@
. ./defs || Exit 1
-echo 'AC_SUBST(JAVAC)' >> configure.in
+set -e
+
+cat >> configure.in << 'END'
+AC_SUBST([JAVAC])
+END
cat > Makefile.am << 'END'
javadir = $(datadir)/java
java_JAVA = a.java b.java c.java
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'address@hidden@' Makefile.in
+
+:
diff --git a/tests/ldflags.test b/tests/ldflags.test
index 39ca274..d078eaa 100755
--- a/tests/ldflags.test
+++ b/tests/ldflags.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,14 +16,17 @@
# Check for LDFLAGS in conditional.
# PR 77.
+
required=libtool
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
AC_SUBST([LTLIBOBJS], [q.o])
-AM_CONDITIONAL(USE_SWIG, :)
+AM_CONDITIONAL([USE_SWIG], [:])
AC_OUTPUT
END
@@ -41,5 +44,7 @@ END
: > config.sub
: > q.c
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/library.test b/tests/library.test
index 1e2b58b..b35e883 100755
--- a/tests/library.test
+++ b/tests/library.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2008, 2010 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,6 +19,8 @@
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_RANLIB
AM_MAINTAINER_MODE
@@ -30,5 +33,7 @@ lib_LIBRARIES = libfoo.a
libfoo_a_DEPENDENCIES = libzot.a
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/libtool.test b/tests/libtool.test
index dd2a939..a75eada 100755
--- a/tests/libtool.test
+++ b/tests/libtool.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,14 +16,17 @@
# Make sure libtool is removed.
# Report from Kevin Dalley
+
required=libtool
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_LIBTOOL_DLOPEN
AC_DISABLE_SHARED
AC_PROG_LIBTOOL
-AC_SUBST(LIBTOOL_DEPS)
+AC_SUBST([LIBTOOL_DEPS])
END
: > Makefile.am
@@ -32,7 +35,9 @@ END
: > config.guess
: > config.sub
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'rm -f libtool' Makefile.in
+
+:
diff --git a/tests/libtool2.test b/tests/libtool2.test
index a50f6a4..e4ea89e 100755
--- a/tests/libtool2.test
+++ b/tests/libtool2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,20 +16,16 @@
# Make sure libtool clean targets exist.
# Report from Eric Magnien.
+
required=libtoolize
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(mypackage,0.1)
+set -e
+cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
-
-AC_CONFIG_FILES([
- sub/Makefile
- Makefile
-])
+AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
END
@@ -45,8 +41,10 @@ lib_LTLIBRARIES = libfoo.la
libfoo_la_SOURCES = foo.c
END
-$ACLOCAL || Exit 1
+$ACLOCAL
: > ltmain.sh
-$AUTOMAKE -a || Exit 1
+$AUTOMAKE -a
grep 'rm -f .*\.lo' sub/Makefile.in
+
+:
diff --git a/tests/listval.test b/tests/listval.test
index 5ff75db..5a71a05 100755
--- a/tests/listval.test
+++ b/tests/listval.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,11 +16,14 @@
# Test to make sure variable is expanded properly.
# From Adam J. Richter.
+
required=libtool
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
-AC_SUBST(LTLIBOBJS)
+AC_SUBST([LTLIBOBJS])
AC_PROG_LIBTOOL
END
@@ -37,5 +40,7 @@ END
: > config.guess
: > config.sub
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/mclean.test b/tests/mclean.test
index dcbe818..331b3d7 100755
--- a/tests/mclean.test
+++ b/tests/mclean.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,13 +19,17 @@
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
MAINTAINERCLEANFILES = foo
END
: > FOO
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'rm -f .*MAINTAINERCLEANFILES' Makefile.in
+
+:
--
1.7.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH] Enable `set -e' in more tests (plus some tweakings).,
Stefano Lattarini <=