[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Modernize, improve and/or fix various test scripts.
From: |
Stefano Lattarini |
Subject: |
[PATCH] Modernize, improve and/or fix various test scripts. |
Date: |
Sat, 8 May 2010 01:46:46 +0200 |
User-agent: |
KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; ) |
This seems huge, but most changes are trivial and/or similar.
And having all these tweakings packed in a big lump should make their
reviewing easier IMHO (at least, it shouldn't make it more difficult).
Regards,
Stefano
-*-*-*-
Modernize, improve and/or fix various test scripts.
* tests/sanity.test: Rely on the `configure.in' stub created by
`./defs', rather than writing one from scratch.
* tests/depend2.test: Likewise. Also, call `set -e' just after
the inclusion of `./defs', instead that later in the script.
* tests/canon5.test: Avoid a useless `|| Exit 1' after a call to
$AUTOMAKE, and improve the positioning of an $ACLOCAL call.
* tests/exeext4.test: Use $FGREP instead of grep, where possible.
Make auxiliary rules in the generated Makefile more silent.
These changes make some checks slighty stricter.
* tests/ext2.test: Call `Exit 1' if inclusion of `./defs' fails.
* tests/gettext2.test: Place final `:' at the end of the script,
rather than in the middle.
* tests/exeext.test: Call `set -e' just after the inclusion of
`./defs', instead that later in the script.
* tests/extra5.test: Likewise.
* tests/confdeps.test: Likewise. Also, prefer `mv -f' over
plain `mv', just to be sure.
* tests/depcomp.test: Enable `errexit' shell flag, with related
changes. Also, modernize the generated configure.in.
* tests/cond9.test: Likewise. Also, rely on the `configure.in'
stub created by `./defs', rather than writing one from scratch.
* tests/cond10.test: Likewise.
* tests/depcomp2.test: Likewise.
* tests/depend3.test: Likewise.
* tests/distcom7.test: Likewise.
* tests/fortdep.test: Likewise. Also, remove definition of
AUTOMAKE_OPTIONS to `foreign' in the generated Makefile.am,
since that flag is already provided by $AUTOMAKE.
* tests/mdate.test: Made stricter, by checking that Automake
actually failed, and by making a stricter grep on the error
message. Also, set shell `errexit flag'.
* tests/python2.test: Improved verbose messages.
From 7792ccaae5de34e641011a05fb33a5ae9f3dc325 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Sat, 8 May 2010 01:27:36 +0200
Subject: [PATCH] Modernize, improve and/or fix various test scripts.
* tests/sanity.test: Rely on the `configure.in' stub created by
`./defs', rather than writing one from scratch.
* tests/depend2.test: Likewise. Also, call `set -e' just after
the inclusion of `./defs', instead that later in the script.
* tests/canon5.test: Avoid a useless `|| Exit 1' after a call to
$AUTOMAKE, and improve the positioning of an $ACLOCAL call.
* tests/exeext4.test: Use $FGREP instead of grep, where possible.
Make auxiliary rules in the generated Makefile more silent.
These changes make some checks slighty stricter.
* tests/ext2.test: Call `Exit 1' if inclusion of `./defs' fails.
* tests/gettext2.test: Place final `:' at the end of the script,
rather than in the middle.
* tests/exeext.test: Call `set -e' just after the inclusion of
`./defs', instead that later in the script.
* tests/extra5.test: Likewise.
* tests/confdeps.test: Likewise. Also, prefer `mv -f' over
plain `mv', just to be sure.
* tests/depcomp.test: Enable `errexit' shell flag, with related
changes. Also, modernize the generated configure.in.
* tests/cond9.test: Likewise. Also, rely on the `configure.in'
stub created by `./defs', rather than writing one from scratch.
* tests/cond10.test: Likewise.
* tests/depcomp2.test: Likewise.
* tests/depend3.test: Likewise.
* tests/distcom7.test: Likewise.
* tests/fortdep.test: Likewise. Also, remove definition of
AUTOMAKE_OPTIONS to `foreign' in the generated Makefile.am,
since that flag is already provided by $AUTOMAKE.
* tests/mdate.test: Made stricter, by checking that Automake
actually failed, and by making a stricter grep on the error
message. Also, set shell `errexit flag'.
* tests/python2.test: Improved verbose messages.
---
ChangeLog | 36 ++++++++++++++++++++++++++++++++++++
tests/canon5.test | 8 +++++---
tests/cond10.test | 16 ++++++++--------
tests/cond9.test | 20 ++++++++++----------
tests/confdeps.test | 8 +++++---
tests/depcomp.test | 19 +++++++++++--------
tests/depcomp2.test | 17 +++++++++--------
tests/depend2.test | 14 ++++++--------
tests/depend3.test | 12 ++++++------
tests/distcom7.test | 11 ++++++-----
tests/exeext.test | 6 +++---
tests/exeext4.test | 22 +++++++++++-----------
tests/ext2.test | 2 +-
tests/extra5.test | 6 +++---
tests/fortdep.test | 17 ++++++++---------
tests/gettext2.test | 5 +++--
tests/mdate.test | 12 +++++++++---
tests/python2.test | 25 ++++++++++---------------
tests/sanity.test | 12 ++++--------
19 files changed, 154 insertions(+), 114 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 71b0d9b..a98dd5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,39 @@
+2010-05-08 Stefano Lattarini <address@hidden>
+
+ Modernize, improve and/or fix various test scripts.
+ * tests/sanity.test: Rely on the `configure.in' stub created by
+ `./defs', rather than writing one from scratch.
+ * tests/depend2.test: Likewise. Also, call `set -e' just after
+ the inclusion of `./defs', instead that later in the script.
+ * tests/canon5.test: Avoid a useless `|| Exit 1' after a call to
+ $AUTOMAKE, and improve the positioning of an $ACLOCAL call.
+ * tests/exeext4.test: Use $FGREP instead of grep, where possible.
+ Make auxiliary rules in the generated Makefile more silent.
+ These changes make some checks slighty stricter.
+ * tests/ext2.test: Call `Exit 1' if inclusion of `./defs' fails.
+ * tests/gettext2.test: Place final `:' at the end of the script,
+ rather than in the middle.
+ * tests/exeext.test: Call `set -e' just after the inclusion of
+ `./defs', instead that later in the script.
+ * tests/extra5.test: Likewise.
+ * tests/confdeps.test: Likewise. Also, prefer `mv -f' over
+ plain `mv', just to be sure.
+ * tests/depcomp.test: Enable `errexit' shell flag, with related
+ changes. Also, modernize the generated configure.in.
+ * tests/cond9.test: Likewise. Also, rely on the `configure.in'
+ stub created by `./defs', rather than writing one from scratch.
+ * tests/cond10.test: Likewise.
+ * tests/depcomp2.test: Likewise.
+ * tests/depend3.test: Likewise.
+ * tests/distcom7.test: Likewise.
+ * tests/fortdep.test: Likewise. Also, remove definition of
+ AUTOMAKE_OPTIONS to `foreign' in the generated Makefile.am,
+ since that flag is already provided by $AUTOMAKE.
+ * tests/mdate.test: Made stricter, by checking that Automake
+ actually failed, and by making a stricter grep on the error
+ message. Also, set shell `errexit flag'.
+ * tests/python2.test: Improved verbose messages.
+
2010-04-25 Ralf Wildenhues <address@hidden>
Warning and error message formatting cleanups.
diff --git a/tests/canon5.test b/tests/canon5.test
index 768e087..53cdeb2 100755
--- a/tests/canon5.test
+++ b/tests/canon5.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1999, 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
@@ -23,13 +24,14 @@ set -e
echo AC_PROG_CC >> configure.in
+$ACLOCAL
+
cat > Makefile.am << 'END'
bin_PROGRAMS = 123test
123test_SOURCES = 123.c
END
-$ACLOCAL
-$AUTOMAKE || Exit 1
+$AUTOMAKE
cat > Makefile.am << 'END'
bin_PROGRAMS = _foo
diff --git a/tests/cond10.test b/tests/cond10.test
index ec5766b..974dfdc 100755
--- a/tests/cond10.test
+++ b/tests/cond10.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,13 +18,13 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AM_INIT_AUTOMAKE(foo,0.0)
+set -e
+
+cat >> configure.in << 'END'
AC_PROG_CC
AM_CONDITIONAL(USE_A,[test x = y])
AM_CONDITIONAL(USE_B,[test x = z])
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
@@ -42,6 +42,6 @@ noinst_PROGRAMS=foo
foo_SOURCES=foo.c $(out)
END
-$ACLOCAL \
- && $AUTOMAKE -a \
- && grep 'USE_A_FALSE.*USE_B_FALSE.*output_c\...OBJEXT.' Makefile.in
+$ACLOCAL
+$AUTOMAKE -a
+grep 'USE_A_FALSE.*USE_B_FALSE.*output_c\...OBJEXT.' Makefile.in
diff --git a/tests/cond9.test b/tests/cond9.test
index dd59758..e798099 100755
--- a/tests/cond9.test
+++ b/tests/cond9.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,11 +18,11 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AM_INIT_AUTOMAKE(foo,0.0)
+set -e
+
+cat >> configure.in << 'END'
AM_CONDITIONAL(WRONG, [test x = y])
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
@@ -36,8 +36,8 @@ echo-something:
echo '$(this)'
END
-$ACLOCAL \
- && $AUTOCONF \
- && $AUTOMAKE -a \
- && ./configure \
- && $MAKE echo-something | grep interesting > /dev/null
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+./configure
+$MAKE echo-something | grep interesting > /dev/null
diff --git a/tests/confdeps.test b/tests/confdeps.test
index f706e8c..9c2cff0 100755
--- a/tests/confdeps.test
+++ b/tests/confdeps.test
@@ -18,11 +18,13 @@
. ./defs || Exit 1
-echo "FOO = foo" > Makefile.am
set -e
-echo "$me: Generated by aclocal ..."
+echo "FOO = foo" > Makefile.am
+
$ACLOCAL
+
+echo "$me: Generated by aclocal..."
$AUTOMAKE
grep '^\$(ACLOCAL_M4):' Makefile.in
@@ -30,7 +32,7 @@ echo "$me: Not generated by aclocal ..."
# Pretend it is not from aclocal (remove the signature),
# but keep it correct, i.e., with AM_INIT_AUTOMAKE etc.
sed -n '3,$p' aclocal.m4 >aclocal.m4t
-mv aclocal.m4t aclocal.m4
+mv -f aclocal.m4t aclocal.m4
$AUTOMAKE
grep '^\$(ACLOCAL_M4):' Makefile.in && Exit 1
diff --git a/tests/depcomp.test b/tests/depcomp.test
index 7e40617..8b9be29 100755
--- a/tests/depcomp.test
+++ b/tests/depcomp.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
@@ -19,11 +19,14 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([subdir/Makefile subdir2/Makefile])
AC_PROG_CC
-AC_OUTPUT(subdir/Makefile subdir2/Makefile)
+AC_OUTPUT
END
rm -f depcomp
@@ -40,9 +43,9 @@ cp subdir/Makefile.am subdir2/Makefile.am
: > subdir/foo.c
: > subdir2/foo.c
-$ACLOCAL || Exit 1
-$AUTOMAKE --add-missing || Exit 1
+$ACLOCAL
+$AUTOMAKE --add-missing
# There used to be a bug where this was created in the first subdir with C
# sources in it instead of in $top_srcdir or $ac_auxdir
-test -f depcomp || Exit 1
+test -f depcomp
diff --git a/tests/depcomp2.test b/tests/depcomp2.test
index 4653c90..2b4353c 100755
--- a/tests/depcomp2.test
+++ b/tests/depcomp2.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
@@ -20,11 +20,12 @@
required=gcc
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(subdir/foo.c)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([subdir/Makefile])
AC_PROG_CC
-AC_OUTPUT(Makefile subdir/Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
@@ -45,8 +46,8 @@ END
CFLAGS=
export CFLAGS
-$ACLOCAL || Exit 1
-$AUTOMAKE --add-missing || Exit 1
-$AUTOCONF || Exit 1
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
./configure CC='gcc' 2>error.log
test -z "`cat error.log`"
diff --git a/tests/depend2.test b/tests/depend2.test
index c259108..57d87d7 100755
--- a/tests/depend2.test
+++ b/tests/depend2.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 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
@@ -22,11 +22,11 @@
required=gcc
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(hello.c)
-AM_INIT_AUTOMAKE(hello,0.23)
+set -e
+
+cat >> configure.in << 'END'
AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
@@ -47,8 +47,6 @@ main (int argc, char *argv[])
}
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
diff --git a/tests/depend3.test b/tests/depend3.test
index 080fc56..f12e460 100755
--- a/tests/depend3.test
+++ b/tests/depend3.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 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
@@ -18,12 +19,11 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat >> configure.in << 'END'
AC_PROG_CC
AC_SUBST(DEPS)
-AC_OUTPUT(Makefile)
END
cat > Makefile.am << 'END'
@@ -45,5 +45,5 @@ DEPS = @DEPS@
TerraVision_DEPENDENCIES = $(DEPS)
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
diff --git a/tests/distcom7.test b/tests/distcom7.test
index 646275c..34f876e 100755
--- a/tests/distcom7.test
+++ b/tests/distcom7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2009, 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,11 +19,12 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(subdir/foo.c)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([subdir/Makefile])
AC_PROG_CC
-AC_OUTPUT(Makefile subdir/Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
diff --git a/tests/exeext.test b/tests/exeext.test
index 4ad837b..3fd42a8 100755
--- a/tests/exeext.test
+++ b/tests/exeext.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
@@ -23,6 +23,8 @@
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
AM_CONDITIONAL([WANT_MT], [test -z "$revert"])
@@ -52,8 +54,6 @@ print:
@echo 4BEG: $(libexec_PROGRAMS) :END4
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/tests/exeext4.test b/tests/exeext4.test
index 7bea7d4..e6cfe7d 100755
--- a/tests/exeext4.test
+++ b/tests/exeext4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 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
@@ -41,13 +41,13 @@ EXTRA_PROGRAMS = prg1 prg2 prg3
TESTS = prg1 prg3 prg4 $(BAZ)
print-bin:
- echo BEG: $(bin_PROGRAMS) :END
+ @echo BEG: $(bin_PROGRAMS) :END
print-extra:
- echo BEG: $(EXTRA_PROGRAMS) :END
+ @echo BEG: $(EXTRA_PROGRAMS) :END
print-tests:
- echo BEG: $(TESTS) :END
+ @echo BEG: $(TESTS) :END
print-barbaz:
- echo BEG: $(BAR) $(BAZ) :END
+ @echo BEG: $(BAR) $(BAZ) :END
END
$ACLOCAL
@@ -56,24 +56,24 @@ $AUTOMAKE
./configure
$MAKE print-bin > output
cat output
-grep 'prg1.bin prg2.bin prg1.bin prg2.bin prg3.bin' output
+$FGREP 'prg1.bin prg2.bin prg1.bin prg2.bin prg3.bin' output
$MAKE print-extra > output
cat output
-grep 'prg1.bin prg2.bin prg3.bin' output
+$FGREP 'prg1.bin prg2.bin prg3.bin' output
$MAKE print-tests > output
cat output
-grep 'prg1.bin prg3.bin prg4' output
+$FGREP 'prg1.bin prg3.bin prg4' output
./configure cond=yes
$MAKE print-bin > output
cat output
-grep 'prg1.bin prg2.bin prg1.bin prg2.bin prg3.bin bar.bin baz.bin' output
+$FGREP 'prg1.bin prg2.bin prg1.bin prg2.bin prg3.bin bar.bin baz.bin' output
$MAKE print-tests > output
cat output
-grep 'prg1.bin prg3.bin prg4 baz.bin bar.bin' output
+$FGREP 'prg1.bin prg3.bin prg4 baz.bin bar.bin' output
$MAKE print-barbaz > output
cat output
-grep 'bar baz bar' output
+$FGREP 'bar baz bar' output
# Only two am__EXEEXT_* variables are needed here: one for BAR, and one
# BAZ. The latter must use the former.
diff --git a/tests/ext2.test b/tests/ext2.test
index 3262f49..185b708 100755
--- a/tests/ext2.test
+++ b/tests/ext2.test
@@ -18,7 +18,7 @@
# Using different extensions for the same language should not
# output the build rules several times.
-. ./defs
+. ./defs || Exit 1
set -e
diff --git a/tests/extra5.test b/tests/extra5.test
index 21f756e..ebdda32 100755
--- a/tests/extra5.test
+++ b/tests/extra5.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
@@ -19,6 +19,8 @@
. ./defs || Exit 1
+set -e
+
echo AC_OUTPUT >> configure.in
cat > Makefile.am << 'END'
@@ -29,8 +31,6 @@ foo:
touch foo/bar
END
-set -e
-
$ACLOCAL
$AUTOMAKE
$AUTOCONF
diff --git a/tests/fortdep.test b/tests/fortdep.test
index 8e62298..585e7c1 100755
--- a/tests/fortdep.test
+++ b/tests/fortdep.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,24 +19,23 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(foo, 1.0, address@hidden)
-AM_INIT_AUTOMAKE(foo, 1.0)
-AC_CONFIG_SRCDIR(foo.f)
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_SRCDIR([foo.f])
AC_PROG_F77
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS=foreign
bin_PROGRAMS=foo
foo_SOURCES=foo.f
END
: > foo.f
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'foo\.Po' Makefile.in && Exit 1
Exit 0
diff --git a/tests/gettext2.test b/tests/gettext2.test
index 41128e2..a8c95ad 100755
--- a/tests/gettext2.test
+++ b/tests/gettext2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 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
@@ -52,7 +52,6 @@ $AUTOMAKE --add-missing
# Don't try running ./configure --with-included-gettext if the
# user is using AM_GNU_GETTEXT([external]).
grep 'with-included-gettext' Makefile.in && Exit 1
-:
# intl/ isn't wanted with AM_GNU_GETTEXT([external]).
@@ -60,3 +59,5 @@ mkdir intl
echo 'SUBDIRS = po intl' >Makefile.am
AUTOMAKE_fails --add-missing
grep 'intl.*AM_GNU_GETTEXT' stderr
+
+:
diff --git a/tests/mdate.test b/tests/mdate.test
index 704b393..0dfba07 100755
--- a/tests/mdate.test
+++ b/tests/mdate.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
@@ -18,6 +19,8 @@
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
END
@@ -30,5 +33,8 @@ END
# Required when using Texinfo.
: > texinfo.tex
-$ACLOCAL || Exit 1
-$AUTOMAKE 2>&1 > /dev/null | grep 'required file.*mdate-sh'
+$ACLOCAL
+AUTOMAKE_fails
+grep 'required file.*mdate-sh.*not found' stderr
+
+:
diff --git a/tests/python2.test b/tests/python2.test
index 7768e81..3e14fa2 100755
--- a/tests/python2.test
+++ b/tests/python2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -20,8 +20,8 @@
set -e
-echo 1
-# pythondir not defined
+
+echo 1. pythondir not defined
cat > Makefile.am <<'END'
PYTHON = x
@@ -32,8 +32,8 @@ $ACLOCAL
AUTOMAKE_fails -a
grep AM_PATH_PYTHON stderr
-echo 2
-# pkgpythondir not defined
+
+echo 2. pkgpythondir not defined
cat > Makefile.am <<'END'
PYTHON = x
@@ -45,8 +45,7 @@ AUTOMAKE_fails -a
grep AM_PATH_PYTHON stderr
-echo 3
-# pyexecdir not defined
+echo 3. pyexecdir not defined
cat > Makefile.am <<'END'
PYTHON = x
@@ -58,8 +57,7 @@ AUTOMAKE_fails -a
grep AM_PATH_PYTHON stderr
-echo 4
-# pkgpyexecdir not defined
+echo 4. pkgpyexecdir not defined
cat > Makefile.am <<'END'
PYTHON = x
@@ -71,8 +69,7 @@ AUTOMAKE_fails -a
grep AM_PATH_PYTHON stderr
-echo 5
-# PYTHON not defined.
+echo 5. PYTHON not defined.
cat > Makefile.am <<'END'
pkgpyexecdir = /here/we/go
@@ -84,8 +81,7 @@ AUTOMAKE_fails -a
grep AM_PATH_PYTHON stderr
-echo 6
-# Ok.
+echo 6. Ok.
cat > Makefile.am <<'END'
PYTHON = x
@@ -98,8 +94,7 @@ $AUTOMAKE -a
test -f py-compile
-echo 7
-# Ok.
+echo 7. Ok again.
cat > Makefile.am <<'END'
PYTHON = x
diff --git a/tests/sanity.test b/tests/sanity.test
index 1c96c78..8416976 100755
--- a/tests/sanity.test
+++ b/tests/sanity.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -23,13 +23,8 @@ set -e
mkdir 'unsafe$'
cd 'unsafe$'
-cat > configure.in << 'END'
-AC_INIT([sanity], [1.0])
-AM_INIT_AUTOMAKE([foreign])
-AC_OUTPUT(Makefile)
-END
-
-cp ../install-sh ../missing .
+mv ../configure.in .
+mv ../install-sh ../missing .
: > Makefile.am
@@ -46,4 +41,5 @@ cd build
../unsafe$/configure 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr
grep 'unsafe srcdir' stderr
+
:
--
1.6.5
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Modernize, improve and/or fix various test scripts.,
Stefano Lattarini <=