diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-11-07 20:39:19 +0100 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-11-07 21:13:59 +0100 |
commit | dd3fb7edb9639ae5c22c5fc0cfcd8d053f6c1688 (patch) | |
tree | a82044a54efc304e12ce4a36090a90cef3c19078 /t/silent-gen.sh | |
parent | 7dbf3d6acb8d3281140cb7958c4937d33e3e53ef (diff) | |
download | automake-dd3fb7edb9639ae5c22c5fc0cfcd8d053f6c1688.tar.gz |
tests: rename few tests (on silent-rules support)
Either to more informative names, or to names more consistent with the
ones of similar/related tests.
* t/silent.sh: Rename ...
* t/silent-c-generic.sh: ... like this, and adjust heading comments.
* t/silent2.sh: Rename ...
* t/silent-c-gcc.sh: ... like this, and adjust heading comments.
* t/silent3.sh: Rename ...
* t/silent-lt-generic.sh: ... like this, and adjust heading comments.
* t/silent4.sh: Rename ...
* t/silent-lt-gcc.sh: ... like this, and adjust heading comments.
* t/silentcxx.sh: Rename ...
* t/silent-cxx-generic.sh: ... like this, and adjust heading comments.
* t/silentcxx-gcc.sh: Rename ...
* t/silent-cxx-gcc.sh: ... like this, and adjust heading comments.
* t/silentf77.sh: Rename ...
* t/silent-f77.sh: ... like this, and adjust heading comments.
* t/silentf90.sh: Rename ...
* t/silent-f90.sh: ... like this, and adjust heading comments.
* t/silent7.sh: Rename ...
* t/silent-gen.sh: ... like this, and adjust heading comments.
* t/silent6.sh: Rename ...
* t/silent-custom.sh: ... like this.
* t/silent8.sh: Rename ...
* t/silent-texi.sh: ... like this.
* t/list-of-tests.mk: Adjust.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/silent-gen.sh')
-rwxr-xr-x | t/silent-gen.sh | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/t/silent-gen.sh b/t/silent-gen.sh new file mode 100755 index 000000000..cd01a4f63 --- /dev/null +++ b/t/silent-gen.sh @@ -0,0 +1,88 @@ +#!/bin/sh +# Copyright (C) 2009-2012 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/>. + +# Silent rules: use of pre-defined variables $(AM_V_GEN) and $(AM_V_at). +# Incidentally, also check that silent rules are disabled by default. + +. test-init.sh + +echo AC_OUTPUT >> configure.ac + +cat > Makefile.am <<'EOF' +all-local: foo + +## And here's how you should do it in your own code: +foo: foo.in + $(AM_V_GEN)cp $(srcdir)/foo.in $@ + $(AM_V_at)echo more >> $@ + +EXTRA_DIST = foo.in +CLEANFILES = foo +EOF + +: >foo.in + +$ACLOCAL +$AUTOMAKE --add-missing +$AUTOCONF + +# Silent rules are disabled by default, since we haven't called +# "AM_SILENT_RULES([yes])" explicitly. +./configure +$MAKE >stdout || { cat stdout; exit 1; } +cat stdout +grep 'GEN ' stdout && exit 1 +grep 'cp ' stdout +grep 'echo ' stdout + +$MAKE clean +$MAKE V=1 >stdout || { cat stdout; exit 1; } +cat stdout +grep 'GEN ' stdout && exit 1 +grep 'cp ' stdout +grep 'echo ' stdout + +$MAKE clean +$MAKE V=0 >stdout || { cat stdout; exit 1; } +cat stdout +grep 'GEN .*foo' stdout +grep 'cp ' stdout && exit 1 +grep 'echo ' stdout && exit 1 + +$MAKE distclean + +./configure --enable-silent-rules +$MAKE >stdout || { cat stdout; exit 1; } +cat stdout +grep 'GEN .*foo' stdout +grep 'cp ' stdout && exit 1 +grep 'echo ' stdout && exit 1 + +$MAKE clean +$MAKE V=0 >stdout || { cat stdout; exit 1; } +cat stdout +grep 'GEN .*foo' stdout +grep 'cp ' stdout && exit 1 +grep 'echo ' stdout && exit 1 + +$MAKE clean +$MAKE V=1 >stdout || { cat stdout; exit 1; } +cat stdout +grep 'GEN ' stdout && exit 1 +grep 'cp ' stdout +grep 'echo ' stdout + +: |