]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: minor reorganization of few tests
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 14 Jun 2012 21:27:42 +0000 (23:27 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 14 Jun 2012 21:37:31 +0000 (23:37 +0200)
* t/subdir3.sh: Rename ...
* t/sourcefile-in-subdir.sh: ... like this.
* t/subdir4.sh: Rename ...
* t/depcomp-implicit-auxdir.sh: ... like this.
* t/subdir6.sh: Rename ...
* t/confh-subdir-clean.sh: ... like this.
* t/subdir7.sh: Renamed ...
* t/dir-named-obj-is-bad.sh: ... like this, and enhance.
* t/srcsub.sh, t/srcsub2.sh: Unify ...
* t/src-acsubst.sh: ... as this test.
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
t/confh-subdir-clean.sh [moved from t/subdir6.sh with 100% similarity]
t/depcomp-implicit-auxdir.sh [moved from t/subdir4.sh with 100% similarity]
t/dir-named-obj-is-bad.sh [moved from t/subdir7.sh with 71% similarity]
t/list-of-tests.mk
t/sourcefile-in-subdir.sh [moved from t/subdir3.sh with 100% similarity]
t/src-acsubst.sh [moved from t/srcsub.sh with 58% similarity]
t/srcsub2.sh [deleted file]

similarity index 100%
rename from t/subdir6.sh
rename to t/confh-subdir-clean.sh
similarity index 100%
rename from t/subdir4.sh
rename to t/depcomp-implicit-auxdir.sh
similarity index 71%
rename from t/subdir7.sh
rename to t/dir-named-obj-is-bad.sh
index a2c47a14fd4d8438a43f7ebf126665c110d807fc..e422f1928933a953ef5718361c922ed74b140ddf 100755 (executable)
@@ -26,12 +26,12 @@ AC_OUTPUT
 END
 
 : > obj/Makefile.am
-echo 'SUBDIRS = obj' >Makefile.am
+echo 'SUBDIRS = obj' > Makefile.am
 
 $ACLOCAL
 
 AUTOMAKE_fails
-grep 'Makefile.am:1:.*obj.*BSD' stderr
+grep "^Makefile\.am:1:.*'obj'.*BSD make" stderr
 
 cat >Makefile.am <<'END'
 SUBDIRS = @STH@
@@ -40,6 +40,22 @@ DIST_SUBDIRS = $(FOO)
 END
 
 AUTOMAKE_fails
-grep 'Makefile.am:2:.*obj.*BSD' stderr
+grep "^Makefile\\.am:2:.*'obj'.*BSD make" stderr
+
+rm -rf autom4te*.cache
+
+cat >configure.ac << 'END'
+AC_INIT([x], [1.0])
+AC_CONFIG_AUX_DIR([obj])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+END
+
+rm -f obj/Makefile.am
+: > Makefile.am
+
+$ACLOCAL
+AUTOMAKE_fails -a
+grep "^configure\.ac:2:.*'obj'.*BSD make" stderr
 
 :
index 4e07a192e67a91003cf8b0c97c007ec3b8874dca..c73afda278e0187e5d1ac646a1ac79e115c7ac23 100644 (file)
@@ -316,6 +316,7 @@ t/confh5.sh \
 t/confh6.sh \
 t/confh7.sh \
 t/confh8.sh \
+t/confh-subdir-clean.sh \
 t/confincl.sh \
 t/conflnk.sh \
 t/conflnk2.sh \
@@ -368,6 +369,7 @@ t/depcomp.sh \
 t/depcomp2.sh \
 t/depcomp8a.sh \
 t/depcomp8b.sh \
+t/depcomp-implicit-auxdir.sh \
 t/depdist.sh \
 t/depend.sh \
 t/depend3.sh \
@@ -376,6 +378,7 @@ t/depend5.sh \
 t/depend6.sh \
 t/deprecated-acinit.sh \
 t/destdir.sh \
+t/dir-named-obj-is-bad.sh \
 t/dirlist.sh \
 t/dirlist2.sh \
 t/dirlist-abspath.sh \
@@ -989,8 +992,8 @@ t/silent-nested-vars.sh \
 t/silent-lex.sh \
 t/silent-yacc.sh \
 t/silent-yacc-headers.sh \
-t/srcsub.sh \
-t/srcsub2.sh \
+t/src-acsubst.sh \
+t/sourcefile-in-subdir.sh \
 t/space.sh \
 t/specflg.sh \
 t/specflg2.sh \
@@ -1026,10 +1029,6 @@ t/subdir-cond-gettext.sh \
 t/subdir-order.sh \
 t/subdir-with-slash.sh \
 t/subdir-subsub.sh \
-t/subdir3.sh \
-t/subdir4.sh \
-t/subdir6.sh \
-t/subdir7.sh \
 t/subdir10.sh \
 t/subdir-distclean.sh \
 t/subdirbuiltsources.sh \
similarity index 100%
rename from t/subdir3.sh
rename to t/sourcefile-in-subdir.sh
similarity index 58%
rename from t/srcsub.sh
rename to t/src-acsubst.sh
index 978a10538549726eedfed5fc2c7bc0e1ea7c9fb4..97d536c898b280ccc6eda33d612573c5577102d0 100755 (executable)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test to make sure config sub in _SOURCES fails.
+# Test to make sure config substitution in _SOURCES fails.
 
 . ./defs || Exit 1
 
-cat >> configure.ac << 'END'
-AC_PROG_CC
-END
+echo AC_PROG_CC >> configure.ac
 
 cat > Makefile.am << 'END'
-bin_PROGRAMS = x
+bin_PROGRAMS = x y
 x_SOURCES = x.c @FOO@
-EXTRA_x_SOURCES = y.c
+bar = @FOO@
+foo = $(bar)
+EXTRA_y_SOURCES = $(foo) y.c
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'Makefile.am:2:.*x_SOURCES.*substitution' stderr
+
+cat > exp-err << 'END'
+Makefile.am:2: error: 'x_SOURCES' includes configure substitution '@FOO@';
+Makefile.am:2: configure substitutions are not allowed in _SOURCES variables
+Makefile.am:3: error: 'bar' includes configure substitution '@FOO@'
+Makefile.am:3: and is referred to from 'EXTRA_y_SOURCES';
+Makefile.am:3: configure substitutions are not allowed in _SOURCES variables
+END
+
+diff exp-err stderr
+
+:
diff --git a/t/srcsub2.sh b/t/srcsub2.sh
deleted file mode 100755 (executable)
index 2d6da97..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2001-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/>.
-
-# Test to make sure config sub in _SOURCES fails.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-END
-
-cat > Makefile.am << 'END'
-bin_PROGRAMS = x
-bar = @FOO@
-foo = $(bar)
-x_SOURCES = x.c $(foo)
-EXTRA_x_SOURCES = y.c
-END
-
-$ACLOCAL
-AUTOMAKE_fails
-grep 'Makefile.am:2:.*bar.*substitution' stderr
-grep 'Makefile.am:2:.*x_SOURCES' stderr