Test automake-generated portions of configure help screen.
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 15 Sep 2010 19:43:56 +0000 (21:43 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 16 Sep 2010 18:30:58 +0000 (20:30 +0200)
* tests/help-depend.test: New test.
* tests/help-depend2.test: Likewise.
* tests/help-dmalloc.test: Likewise.
* tests/help-init.test: Likewise.
* tests/help-lispdir.test: Likewise.
* tests/help-maintainer.test: Likewise.
* tests/help-multilib.test: Likewise.
* tests/help-regex.test: Likewise.
* tests/help-silent.test: Likewise.
* tests/help-upc.test: Likewise.
* tests/mmode.test: Remove tests on `configure --help' output,
they are supersed by tests in `help-maintainer.test'.
* tests/Makefile.am (TESTS): Update.

14 files changed:
ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/help-depend.test [new file with mode: 0755]
tests/help-depend2.test [new file with mode: 0755]
tests/help-dmalloc.test [new file with mode: 0755]
tests/help-init.test [new file with mode: 0755]
tests/help-lispdir.test [new file with mode: 0755]
tests/help-maintainer.test [new file with mode: 0755]
tests/help-multilib.test [new file with mode: 0755]
tests/help-regex.test [new file with mode: 0755]
tests/help-silent.test [new file with mode: 0755]
tests/help-upc.test [new file with mode: 0755]
tests/mmode.test

index a6f712d..0328c5a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2010-09-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Test automake-generated portions of configure help screen.
+       * tests/help-depend.test: New test.
+       * tests/help-depend2.test: Likewise.
+       * tests/help-dmalloc.test: Likewise.
+       * tests/help-init.test: Likewise.
+       * tests/help-lispdir.test: Likewise.
+       * tests/help-maintainer.test: Likewise.
+       * tests/help-multilib.test: Likewise.
+       * tests/help-regex.test: Likewise.
+       * tests/help-silent.test: Likewise.
+       * tests/help-upc.test: Likewise.
+       * tests/mmode.test: Remove tests on `configure --help' output,
+       they are supersed by tests in `help-maintainer.test'.
+       * tests/Makefile.am (TESTS): Update.
+
 2010-09-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        * tests/README: Don't put GCS mandated tools in $required.
index 58103cc..ba695f5 100644 (file)
@@ -348,6 +348,16 @@ gnits2.test \
 gnits3.test \
 header.test \
 help.test \
+help-depend.test \
+help-depend2.test \
+help-dmalloc.test \
+help-init.test \
+help-lispdir.test \
+help-maintainer.test \
+help-multilib.test \
+help-regex.test \
+help-silent.test \
+help-upc.test \
 hfs.test \
 hosts.test \
 implicit.test \
index e967caa..9ea9d74 100644 (file)
@@ -586,6 +586,16 @@ gnits2.test \
 gnits3.test \
 header.test \
 help.test \
+help-depend.test \
+help-depend2.test \
+help-dmalloc.test \
+help-init.test \
+help-lispdir.test \
+help-maintainer.test \
+help-multilib.test \
+help-regex.test \
+help-silent.test \
+help-upc.test \
 hfs.test \
 hosts.test \
 implicit.test \
diff --git a/tests/help-depend.test b/tests/help-depend.test
new file mode 100755 (executable)
index 0000000..ed9447e
--- /dev/null
@@ -0,0 +1,41 @@
+#! /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 that our private macro `AM_DEP_TRACK' adds proper text to
+# the configure help screen.
+# Keep this in sync with sister test `help-depend2.test'
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_DEP_TRACK
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$FGREP ' --enable-dependency-tracking ' stdout
+$FGREP ' --disable-dependency-tracking ' stdout
+$FGREP ' one-time build' stdout
+$FGREP ' slow dependency extract' stdout
+
+:
diff --git a/tests/help-depend2.test b/tests/help-depend2.test
new file mode 100755 (executable)
index 0000000..b4133b4
--- /dev/null
@@ -0,0 +1,42 @@
+#! /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 that when automake automatically activates support for
+# dependency tracking, it adds proper text to the configure help screen.
+# Keep this in sync with sister test `help-depend.test'
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$FGREP ' --enable-dependency-tracking ' stdout
+$FGREP ' --disable-dependency-tracking ' stdout
+$FGREP ' one-time build' stdout
+$FGREP ' slow dependency extract' stdout
+
+:
diff --git a/tests/help-dmalloc.test b/tests/help-dmalloc.test
new file mode 100755 (executable)
index 0000000..c20288d
--- /dev/null
@@ -0,0 +1,39 @@
+#! /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 that our macro `AM_WITH_DMALLOC' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_WITH_DMALLOC
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$FGREP ' --with-dmalloc ' stdout
+$FGREP ' use dmalloc' stdout
+$FGREP 'www.dmalloc.com' stdout
+
+:
diff --git a/tests/help-init.test b/tests/help-init.test
new file mode 100755 (executable)
index 0000000..a3af271
--- /dev/null
@@ -0,0 +1,39 @@
+#! /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 that our grand macro `AM_INIT_AUTOMAKE' add proper text
+# to the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+grep ' --program-prefix[= ]' stdout
+grep ' --program-suffix[= ]' stdout
+grep ' --program-transform-name[= ]' stdout
+
+:
diff --git a/tests/help-lispdir.test b/tests/help-lispdir.test
new file mode 100755 (executable)
index 0000000..3d82074
--- /dev/null
@@ -0,0 +1,40 @@
+#! /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 that our macro `AM_PATH_LISPDIR' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_PATH_LISPDIR
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+grep ' --with-lispdir .*override.*lisp directory' stdout
+grep ' EMACS .*[eE]macs editor' stdout
+grep ' EMACSLOADPATH' stdout
+grep ' .*[eE]macs library search path' stdout
+
+:
diff --git a/tests/help-maintainer.test b/tests/help-maintainer.test
new file mode 100755 (executable)
index 0000000..72fc98a
--- /dev/null
@@ -0,0 +1,58 @@
+#! /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 that our macro `AM_MAINTAINER_MODE' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_MAINTAINER_MODE
+END
+
+cat configure.in
+$ACLOCAL
+$AUTOCONF --force
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep ' --enable-maintainer-mode.*enable make rules' stdout
+
+rm -rf autom4te*.cache # just to be sure
+sed 's/\(AM_MAINTAINER_MODE\).*/\1([disable])/' configure.in >t
+mv -f t configure.in
+
+cat configure.in
+$ACLOCAL
+$AUTOCONF --force
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep ' --enable-maintainer-mode.*enable make rules' stdout
+
+rm -rf autom4te*.cache # just to be sure
+sed 's/\(AM_MAINTAINER_MODE\).*/\1([enable])/' configure.in >t
+mv -f t configure.in
+
+cat configure.in
+$ACLOCAL
+$AUTOCONF --force
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep ' --disable-maintainer-mode.*disable make rules' stdout
+
+:
diff --git a/tests/help-multilib.test b/tests/help-multilib.test
new file mode 100755 (executable)
index 0000000..0016c76
--- /dev/null
@@ -0,0 +1,38 @@
+#! /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 that our macro `AM_ENABLE_MULTILIB' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_ENABLE_MULTILIB
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$FGREP ' --enable-multilib ' stdout
+$FGREP ' many library versions (default)' stdout
+
+:
diff --git a/tests/help-regex.test b/tests/help-regex.test
new file mode 100755 (executable)
index 0000000..3eff5f9
--- /dev/null
@@ -0,0 +1,38 @@
+#! /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 that obsolescent macro `AM_WITH_REGEX' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_WITH_REGEX
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$FGREP ' --without-regex ' stdout
+$FGREP ' use GNU rx ' stdout
+
+:
diff --git a/tests/help-silent.test b/tests/help-silent.test
new file mode 100755 (executable)
index 0000000..b338907
--- /dev/null
@@ -0,0 +1,43 @@
+#! /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 that our macro `AM_SILENT_RULES' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_SILENT_RULES
+END
+
+$ACLOCAL
+
+mv -f configure.in configure.tmpl
+
+for args in '' '([])' '([yes])' '([no])'; do
+  sed "s/AM_SILENT_RULES.*/&$args/" configure.tmpl >configure.in
+  cat configure.in
+  $AUTOCONF --force
+  ./configure --help >stdout || { cat stdout; Exit 1; }
+  cat stdout
+  grep ' --enable-silent-rules  *less verbose build.*undo.*make V=1' stdout
+  grep ' --disable-silent-rules  *verbose build.*undo.*make V=0' stdout
+done
+
+:
diff --git a/tests/help-upc.test b/tests/help-upc.test
new file mode 100755 (executable)
index 0000000..586299b
--- /dev/null
@@ -0,0 +1,38 @@
+#! /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 that our macro `AM_PROG_UPC' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_PROG_UPC
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+grep ' UPCFLAGS .*Unified Parallel C compiler flags' stdout
+grep ' UPC .*Unified Parallel C compiler command' stdout
+
+:
index 19f83f1..c5a16c9 100755 (executable)
@@ -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
@@ -31,7 +31,6 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure --help | grep 'enable-maintainer-mode.*enable make rules'
 ./configure
 grep '^MAINT.*#' Makefile
 
@@ -51,7 +50,6 @@ sed 's/\(AM_MAINTAINER_MODE\).*/\1([enable])/' configure.in > configure.int
 mv -f configure.int configure.in
 $AUTOCONF --force
 
-./configure --help | grep 'disable-maintainer-mode.*disable make rules'
 ./configure
 grep '^MAINT.*#' Makefile && Exit 1
 
@@ -64,4 +62,5 @@ grep '^MAINT.*#' Makefile
 sed 's/\(AM_MAINTAINER_MODE\).*/\1([foo])/' configure.in > configure.int
 mv -f configure.int configure.in
 $AUTOCONF --force -Werror && Exit 1
+
 :