[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-211-g
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-211-ga82bc0d |
Date: |
Sun, 26 Sep 2010 14:48:00 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=a82bc0d5cfea18fc96476c23a4fb2d458af09c89
The branch, maint has been updated
via a82bc0d5cfea18fc96476c23a4fb2d458af09c89 (commit)
via a25c6733a0e78fd7aef28e560e027bcef9684e96 (commit)
from 067455ce40bfa4c7234d46368ab64efb893ab808 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 34 +++++++++++++++++++++++
Makefile.am | 8 +++++
Makefile.in | 7 +++++
tests/Makefile.am | 3 ++
tests/Makefile.in | 3 ++
tests/README | 3 ++
tests/compile2.test | 8 +----
tests/help.test | 33 ++++++++++++----------
tests/{help.test => help2.test} | 35 +++++++++++------------
tests/help3.test | 57 +++++++++++++++++++++++++++++++++++++++
tests/help4.test | 51 ++++++++++++++++++++++++++++++++++
tests/instmany-mans.test | 5 ++-
tests/instmany-python.test | 4 +-
tests/instmany.test | 4 +-
tests/man4.test | 4 +-
tests/mkinst3.test | 4 +-
tests/mmodely.test | 5 ++-
tests/multlib.test | 2 +-
tests/txinfo30.test | 4 +-
19 files changed, 220 insertions(+), 54 deletions(-)
copy tests/{help.test => help2.test} (58%)
create mode 100755 tests/help3.test
create mode 100755 tests/help4.test
diff --git a/ChangeLog b/ChangeLog
index b96918c..b4d4890 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,39 @@
+2010-09-26 Stefano Lattarini <address@hidden>
+
+ Extend tests on `--help' and `--version' options.
+ * tests/help.test: Create a new empty directory and chdir into
+ it, rather than removing already present files. Run the aclocal
+ and automake wrapper scripts directly, instead of relying on
+ $AUTOMAKE and $ACLOCAL. Be sure to correctly match literal dots
+ in aclocal's and automake's stderr. Add a trailing `:' command.
+ * tests/help2.test: New test, checking that options `--help' and
+ `--version' works in directories with broken `configure.in'.
+ * tests/help3.test: New test, checking that options `--help' and
+ `--version' take precedence on the other options.
+ * tests/help4.test: New test, checking that the first among the
+ `--help' and `--version' options to be specified on the command
+ line wins.
+ * tests/Makefile.am (TESTS): Updated.
+
2010-09-25 Stefano Lattarini <address@hidden>
+ Testsuite: Use `$PATH_SEPARATOR', not `:', when extending PATH.
+ * tests/compile2.test: Do no uselessly (implicitly) repeat the
+ computation of PATH_SEPARATOR again.
+ * tests/instmany-mans.test: Use `$PATH_SEPARATOR', not `:', when
+ extending/redefining PATH.
+ * tests/instmany-python.test: Likewise.
+ * tests/instmany.test: Likewise.
+ * tests/man4.test: Likewise.
+ * tests/mkinst3.test: Likewise.
+ * tests/mmodely.test: Likewise.
+ * tests/multlib.test: Likewise.
+ * tests/txinfo30.test: Likewise.
+ * tests/README (Section "Writing test cases" subsection "Do"):
+ Updated.
+ * Makefile.am (sc_tests_PATH_SEPARATOR): New maintainer check.
+ (syntax_check_rules): Updated.
+
Testsuite: new variables `$PATH_SEPARATOR' and `$APIVERSION'.
* tests/defs.in ($APIVERSION): New AC_SUBST'd variable.
($ACLOCAL, $AUTOMAKE): Use it.
diff --git a/Makefile.am b/Makefile.am
index 3aead75..d19d974 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -140,6 +140,7 @@ sc_tests_required_after_defs \
sc_tests_overriding_macros_on_cmdline \
sc_tests_plain_sleep \
sc_tests_plain_egrep_fgrep \
+sc_tests_PATH_SEPARATOR \
sc_mkdir_p \
sc_perl_at_substs \
sc_unquoted_DESTDIR \
@@ -409,6 +410,13 @@ sc_tests_plain_egrep_fgrep:
exit 1; \
fi
+## Using `:' as a PATH separator is not portable.
+sc_tests_PATH_SEPARATOR:
+ @if grep -E '\bPATH=.*:.*' $(srcdir)/tests/*.test ; then \
+ echo "Use \`$$PATH_SEPARATOR', not \`:', in PATH definitions above."
1>&2; \
+ exit 1; \
+ fi
+
sc_mkdir_p:
@if grep 'mkdir_p' $(srcdir)/automake.in \
$(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
diff --git a/Makefile.in b/Makefile.in
index 528b80e..649565b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -298,6 +298,7 @@ sc_tests_required_after_defs \
sc_tests_overriding_macros_on_cmdline \
sc_tests_plain_sleep \
sc_tests_plain_egrep_fgrep \
+sc_tests_PATH_SEPARATOR \
sc_mkdir_p \
sc_perl_at_substs \
sc_unquoted_DESTDIR \
@@ -1090,6 +1091,12 @@ sc_tests_plain_egrep_fgrep:
exit 1; \
fi
+sc_tests_PATH_SEPARATOR:
+ @if grep -E '\bPATH=.*:.*' $(srcdir)/tests/*.test ; then \
+ echo "Use \`$$PATH_SEPARATOR', not \`:', in PATH definitions above."
1>&2; \
+ exit 1; \
+ fi
+
sc_mkdir_p:
@if grep 'mkdir_p' $(srcdir)/automake.in \
$(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index ba695f5..6c6f24f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -348,6 +348,9 @@ gnits2.test \
gnits3.test \
header.test \
help.test \
+help2.test \
+help3.test \
+help4.test \
help-depend.test \
help-depend2.test \
help-dmalloc.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 9ea9d74..43d803e 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -586,6 +586,9 @@ gnits2.test \
gnits3.test \
header.test \
help.test \
+help2.test \
+help3.test \
+help4.test \
help-depend.test \
help-depend2.test \
help-dmalloc.test \
diff --git a/tests/README b/tests/README
index a063348..93f9cbf 100644
--- a/tests/README
+++ b/tests/README
@@ -136,6 +136,9 @@ Do
Use `Exit' rather than `exit' to abort a test.
+ Use `$PATH_SEPARATOR', not hard-coded `:', as the separator of
+ PATH's entries.
+
It's more important to make sure that a feature works, than
make sure that Automake's output looks correct. It might look
correct and still fail to work. In other words, prefer
diff --git a/tests/compile2.test b/tests/compile2.test
index fe4574a..334f154 100755
--- a/tests/compile2.test
+++ b/tests/compile2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -66,11 +66,7 @@ test -f "$amtest_object"
# Absolute w32 paths should be accepted.
# Do not actually run this test on anything that could be w32.
test -d "C:\\" && Exit 77
-# This test is taken from Autoconf's _AS_PATH_SEPARATOR_PREPARE.
-(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- Exit 77
-}
+case $PATH_SEPARATOR in ';'|':');; *) Exit 77;; esac
amtest_source='C:\libltdl\libltdl\slist.c'
amtest_object='C:\libltdl\libltdl\libltdl_libltdl_la-slist.obj'
diff --git a/tests/help.test b/tests/help.test
index e9ccf62..ddeb92f 100755
--- a/tests/help.test
+++ b/tests/help.test
@@ -21,21 +21,24 @@
set -e
-# Ensure we are run from the right directory.
-# (The last thing we want is to delete some random user files.)
-test -f ../defs
-rm -f *
+# Ensure we run in an empty directory.
+mkdir emptydir
+cd emptydir
-$ACLOCAL --version
-$ACLOCAL --help
-$AUTOMAKE --version
-$AUTOMAKE --help
+aclocal-$APIVERSION --version
+aclocal-$APIVERSION --help
+automake-$APIVERSION --version
+automake-$APIVERSION --help
-# aclocal and automake cannot work without configure.ac or configure.in
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+# Sanity checks: aclocal and automake cannot work without configure.ac
+# or configure.in.
+aclocal-$APIVERSION 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
-grep configure.ac stderr
-grep configure.in stderr
-AUTOMAKE_fails
-grep configure.ac stderr
-grep configure.in stderr
+$FGREP configure.ac stderr
+$FGREP configure.in stderr
+automake-$APIVERSION 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+$FGREP configure.ac stderr
+$FGREP configure.in stderr
+
+:
diff --git a/tests/help.test b/tests/help2.test
similarity index 58%
copy from tests/help.test
copy to tests/help2.test
index e9ccf62..014f187 100755
--- a/tests/help.test
+++ b/tests/help2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -14,28 +14,27 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure --help and --version work, even when no configure.ac
-# is in the current directory.
-
+# Make sure --help and --version work, even when the current directory
+# contains a broken configure.in.
. ./defs || Exit 1
set -e
-# Ensure we are run from the right directory.
-# (The last thing we want is to delete some random user files.)
-test -f ../defs
-rm -f *
+# Ensure we run in a new, clean directory.
+mkdir cleandir
+cd cleandir
+
+echo '[' > configure.in
-$ACLOCAL --version
-$ACLOCAL --help
-$AUTOMAKE --version
-$AUTOMAKE --help
+automake-$APIVERSION --version
+automake-$APIVERSION --help
# aclocal and automake cannot work without configure.ac or configure.in
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+aclocal-$APIVERSION 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
-grep configure.ac stderr
-grep configure.in stderr
-AUTOMAKE_fails
-grep configure.ac stderr
-grep configure.in stderr
+$FGREP configure.in stderr
+automake-$APIVERSION 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+$FGREP configure.in stderr
+
+:
diff --git a/tests/help3.test b/tests/help3.test
new file mode 100755
index 0000000..8e9e76f
--- /dev/null
+++ b/tests/help3.test
@@ -0,0 +1,57 @@
+#! /bin/sh
+# Copyright (C) 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure --help and --version takes precedence over other options.
+
+. ./defs || Exit 1
+
+set -e
+
+# We must have full control over the content of the current directory.
+mkdir cleandir
+cd cleandir
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([.]) dnl prevent automake from looking into '..'
+AM_INIT_AUTOMAKE([foreign])
+AC_CONFIG_FILES([Makefile])
+END
+
+cat > Makefile.am <<END
+## so that install-sh will be required
+pkgdata_DATA =
+END
+
+aclocal-$APIVERSION --force --help --output=foo.m4
+test ! -r foo.m4
+aclocal-$APIVERSION --output=foo.m4 --version --force
+test ! -r foo.m4
+# Sanity check.
+aclocal-$APIVERSION --output=foo.m4 --force
+test -f foo.m4
+
+mv -f foo.m4 aclocal.m4 # automake will need aclocal.m4
+
+automake-$APIVERSION --add-missing --help --copy
+test ! -r install-sh
+automake-$APIVERSION --copy --version --add-mising
+test ! -r install-sh
+# Sanity check.
+automake-$APIVERSION --add-missing --copy
+test -f install-sh
+
+:
diff --git a/tests/help4.test b/tests/help4.test
new file mode 100755
index 0000000..906e508
--- /dev/null
+++ b/tests/help4.test
@@ -0,0 +1,51 @@
+#! /bin/sh
+# Copyright (C) 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure --help and --version work, even when no configure.ac
+# is in the current directory.
+
+. ./defs || Exit 1
+
+set -e
+
+# Ensure we run in an empty directory.
+mkdir emptydir
+cd emptydir
+
+escape_dots () { sed 's/\./\\./g'; } # avoid issues with `\' in backquotes
+apiversion_rx=`echo "$APIVERSION" | escape_dots`
+
+aclocal-$APIVERSION --version --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep "^aclocal.*$apiversion_rx" stdout
+grep "^Usage" stdout && Exit 1
+
+aclocal-$APIVERSION --help --version >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep "^Usage" stdout
+grep "^aclocal.*$apiversion_rx" stdout && Exit 1
+
+automake-$APIVERSION --version --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep "^automake.*$apiversion_rx" stdout
+grep "^Usage" stdout && Exit 1
+
+automake-$APIVERSION --help --version >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep "^Usage" stdout
+grep "^automake.*$apiversion_rx" stdout && Exit 1
+
+:
diff --git a/tests/instmany-mans.test b/tests/instmany-mans.test
index fcee60b..fe55be4 100755
--- a/tests/instmany-mans.test
+++ b/tests/instmany-mans.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2008, 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
@@ -123,7 +123,7 @@ test `find "$instdir" -type f -print | wc -l` = 0
# Try whether we don't exceed the low limit.
INSTALL='$(SHELL) $(top_builddir)/myinstall' $MAKE -e install
-env save_PATH="$PATH" PATH="`pwd`/..:$PATH" $MAKE uninstall
+env save_PATH="$PATH" PATH="`pwd`/..$PATH_SEPARATOR$PATH" $MAKE uninstall
cd $subdir
srcdir=../../$subdir
@@ -146,4 +146,5 @@ for file in page3.man page$nfiles.man npage3.man
npage$nfiles.man; do
$MAKE install-man3 && Exit 1
chmod u+r $srcdir/$file
done
+
:
diff --git a/tests/instmany-python.test b/tests/instmany-python.test
index 6831c9e..7648e1b 100755
--- a/tests/instmany-python.test
+++ b/tests/instmany-python.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2008, 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
@@ -113,7 +113,7 @@ test `find "$instdir" -type f -print | wc -l` = 0
# Try whether we don't exceed the low limit.
INSTALL='$(SHELL) $(top_builddir)/myinstall' $MAKE -e install
-env save_PATH="$PATH" PATH="`pwd`/..:$PATH" $MAKE uninstall
+env save_PATH="$PATH" PATH="`pwd`/..$PATH_SEPARATOR$PATH" $MAKE uninstall
cd $subdir
srcdir=../../$subdir
diff --git a/tests/instmany.test b/tests/instmany.test
index a3b10cb..2de026d 100755
--- a/tests/instmany.test
+++ b/tests/instmany.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2008, 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
@@ -137,7 +137,7 @@ test `find "$instdir" -type f -print | wc -l` = 0
# Try whether we don't exceed the low limit.
INSTALL='$(SHELL) $(top_builddir)/myinstall' $MAKE -e install
-env save_PATH="$PATH" PATH="`pwd`/..:$PATH" $MAKE uninstall
+env save_PATH="$PATH" PATH="`pwd`/..$PATH_SEPARATOR$PATH" $MAKE uninstall
cd $subdir
srcdir=../../$subdir
diff --git a/tests/man4.test b/tests/man4.test
index aa86a9e..de75f83 100755
--- a/tests/man4.test
+++ b/tests/man4.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
@@ -73,7 +73,7 @@ END
chmod +x foo bar help2man
save_PATH=$PATH
-PATH=`pwd`:$PATH
+PATH=`pwd`$PATH_SEPARATOR$PATH
$ACLOCAL
$AUTOMAKE
diff --git a/tests/mkinst3.test b/tests/mkinst3.test
index 18f18fb..20b9b04 100755
--- a/tests/mkinst3.test
+++ b/tests/mkinst3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -52,7 +52,7 @@ EOF
chmod +x bin/mkdir
AM_PATH=$PATH
export AM_PATH
-PATH=`pwd`/bin:$PATH
+PATH=`pwd`/bin$PATH_SEPARATOR$PATH
export PATH
# Test mkinstalldirs without mkdir -p.
diff --git a/tests/mmodely.test b/tests/mmodely.test
index 0f9bb3b..fc94d37 100755
--- a/tests/mmodely.test
+++ b/tests/mmodely.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2004, 2006, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006, 2007, 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
@@ -82,7 +83,7 @@ cat >mylex.sh <<'END'
echo "$@" >lex.yy.c
END
chmod +x myyacc.sh mylex.sh
-PATH="`pwd`:$PATH"
+PATH="`pwd`$PATH_SEPARATOR$PATH"
# make maintainer-clean; ./configure; make should always work,
# per GNU Standard.
diff --git a/tests/multlib.test b/tests/multlib.test
index 5ff19d7..3f88be3 100755
--- a/tests/multlib.test
+++ b/tests/multlib.test
@@ -45,7 +45,7 @@ gcc ${1+"$@"}
END
chmod +x mycc
-PATH=`pwd`:$PATH
+PATH=`pwd`$PATH_SEPARATOR$PATH
cat >Makefile.am <<'EOF'
SUBDIRS = @subdirs@
diff --git a/tests/txinfo30.test b/tests/txinfo30.test
index 8db42d9..296180d 100755
--- a/tests/txinfo30.test
+++ b/tests/txinfo30.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005, 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,7 +41,7 @@ EOF
chmod +x makeinfo
-PATH=`pwd`:$PATH
+PATH=`pwd`$PATH_SEPARATOR$PATH
export PATH
$ACLOCAL
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-211-ga82bc0d,
Stefano Lattarini <=