From: Stefano Lattarini Date: Wed, 15 Sep 2010 19:43:56 +0000 (+0200) Subject: Test automake-generated portions of configure help screen. X-Git-Tag: v1.12.0b~467 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e09f00c8aada78d19c199bb6f7743330dc086afa;p=platform%2Fupstream%2Fautomake.git 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. --- diff --git a/ChangeLog b/ChangeLog index a6f712d..0328c5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2010-09-15 Stefano Lattarini + + 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 * tests/README: Don't put GCS mandated tools in $required. diff --git a/tests/Makefile.am b/tests/Makefile.am index 58103cc..ba695f5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 \ diff --git a/tests/Makefile.in b/tests/Makefile.in index e967caa..9ea9d74 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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 index 0000000..ed9447e --- /dev/null +++ b/tests/help-depend.test @@ -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 . + +# 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 <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 index 0000000..b4133b4 --- /dev/null +++ b/tests/help-depend2.test @@ -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 . + +# 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 <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 index 0000000..c20288d --- /dev/null +++ b/tests/help-dmalloc.test @@ -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 . + +# Make sure that our macro `AM_WITH_DMALLOC' adds proper text to +# the configure help screen. + +. ./defs || Exit 1 + +set -e + +cat > configure.in <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 index 0000000..a3af271 --- /dev/null +++ b/tests/help-init.test @@ -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 . + +# 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 <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 index 0000000..3d82074 --- /dev/null +++ b/tests/help-lispdir.test @@ -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 . + +# Make sure that our macro `AM_PATH_LISPDIR' adds proper text to +# the configure help screen. + +. ./defs || Exit 1 + +set -e + +cat > configure.in <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 index 0000000..72fc98a --- /dev/null +++ b/tests/help-maintainer.test @@ -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 . + +# Make sure that our macro `AM_MAINTAINER_MODE' adds proper text to +# the configure help screen. + +. ./defs || Exit 1 + +set -e + +cat > configure.in <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 index 0000000..0016c76 --- /dev/null +++ b/tests/help-multilib.test @@ -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 . + +# Make sure that our macro `AM_ENABLE_MULTILIB' adds proper text to +# the configure help screen. + +. ./defs || Exit 1 + +set -e + +cat > configure.in <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 index 0000000..3eff5f9 --- /dev/null +++ b/tests/help-regex.test @@ -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 . + +# Make sure that obsolescent macro `AM_WITH_REGEX' adds proper text to +# the configure help screen. + +. ./defs || Exit 1 + +set -e + +cat > configure.in <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 index 0000000..b338907 --- /dev/null +++ b/tests/help-silent.test @@ -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 . + +# Make sure that our macro `AM_SILENT_RULES' adds proper text to +# the configure help screen. + +. ./defs || Exit 1 + +set -e + +cat > configure.in <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 index 0000000..586299b --- /dev/null +++ b/tests/help-upc.test @@ -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 . + +# Make sure that our macro `AM_PROG_UPC' adds proper text to +# the configure help screen. + +. ./defs || Exit 1 + +set -e + +cat > configure.in <stdout || { cat stdout; Exit 1; } +cat stdout + +grep ' UPCFLAGS .*Unified Parallel C compiler flags' stdout +grep ' UPC .*Unified Parallel C compiler command' stdout + +: diff --git a/tests/mmode.test b/tests/mmode.test index 19f83f1..c5a16c9 100755 --- a/tests/mmode.test +++ b/tests/mmode.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 @@ -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 + :