]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Improve and extend tests `asm*.test'.
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 14 Jul 2010 12:01:43 +0000 (14:01 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 10 Aug 2010 17:39:22 +0000 (19:39 +0200)
* tests/asm.test: Use configure.in stub generated by ./defs,
and avoid obsoleted autoconf constructs.  Make grepping of
Automake stderr stricter.  Do not create useless source file.
Improve verbose messages.  Minor cosmetic changes.  Tell to
keep it in sync with other sister tests asm*.test.
* tests/asm2.test: Likewise.
* tests/asm3.test: Likewise.

ChangeLog
tests/asm.test
tests/asm2.test
tests/asm3.test

index a1cb38f424e64d3b62cd221814e3eed5f6f3ea0f..b18c57127511754bc610a78ed26d3a1a91a198e8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2010-08-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Improve and extend tests `asm*.test'.
+       * tests/asm.test: Use configure.in stub generated by ./defs,
+       and avoid obsoleted autoconf constructs.  Make grepping of
+       Automake stderr stricter.  Do not create useless source file.
+       Improve verbose messages.  Minor cosmetic changes.  Tell to
+       keep it in sync with other sister tests asm*.test.
+       * tests/asm2.test: Likewise.
+       * tests/asm3.test: Likewise.
+
        Modernize, improve and/or extend test scripts `conf*.test'.
        * tests/confh5.test: Cosmetic changes.
        * tests/conff.test: Likewise.
index 6c0aa3d9d99f7f52547a57500bc1a1513328f164..f1bcb7637930d22fd500febd7efb48f44e98be94 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 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
 # 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 of basic assembly functionality
+# Test of basic assembly functionality.
+# Keep this in sync with sister tests asm2.test and asm3.test.
 
 . ./defs || Exit 1
 
 set -e
 
+mv configure.in configure.stub
+
 cat > Makefile.am << 'END'
 noinst_PROGRAMS = maude
 maude_SOURCES = maude.s
 END
 
-: > maude.s
-
-# Should fail because we need CC and CCAS.
-echo 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+echo '*** Try 1 -- should fail because we need CC and CCAS ***'
+cat configure.stub - > configure.in << 'END'
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 # On fast machines the autom4te.cache created during the above run of
 # $AUTOMAKE is likely to have the same time stamp as the configure.in
@@ -48,51 +47,42 @@ grep AM_PROG_AS stderr
 # bogus installations of Autoconf use a versioned cache.)
 rm -rf autom4te*.cache
 
-# We still need CCAS.
-echo 2
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 2 -- we still need CCAS ***'
+cat configure.stub - > configure.in << 'END'
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCAS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need CCASFLAGS.
-echo 3
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 3 -- we need CCASFLAGS ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCASFLAGS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCASFLAGS.* undefined' stderr
+grep 'define .*CCASFLAGS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 4
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 4 -- we have everything needed, expect success ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
@@ -100,16 +90,13 @@ $AUTOMAKE
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 5
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 5 -- we have everything needed, expect success ***'
+cat configure.stub - > configure.in << 'END'
 AM_PROG_AS
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 $AUTOMAKE
 
-Exit 0
+:
index 8afd4f9961f2ef08ffa19dff2f8fb3a57173da97..ab141e7a9d5403d97777e62279d73e79df485113 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 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
 # 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 of basic preprocessed assembly functionality
+# Test of basic preprocessed assembly functionality.
+# Keep this in sync with sister tests asm.test and asm3.test.
 
 . ./defs || Exit 1
 
 set -e
 
+mv configure.in configure.stub
+
 cat > Makefile.am << 'END'
 noinst_PROGRAMS = maude
 maude_SOURCES = maude.S
 END
 
-: > maude.s
-
-# Should fail because we need CC and CCAS.
-echo 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+echo '*** Try 1 -- should fail because we need CC and CCAS ***'
+cat configure.stub - > configure.in << 'END'
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 # On fast machines the autom4te.cache created during the above run of
 # $AUTOMAKE is likely to have the same time stamp as the configure.in
@@ -48,70 +48,58 @@ grep AM_PROG_AS stderr
 # bogus installations of Autoconf use a versioned cache.)
 rm -rf autom4te*.cache
 
-# We still need CCAS.
-echo 2
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 2 -- we still need CCAS ***'
+cat configure.stub - > configure.in << 'END'
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCAS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need CCASFLAGS.
-echo 3
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 3 -- we need CCASFLAGS ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCASFLAGS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCASFLAGS.* undefined' stderr
+grep 'define .*CCASFLAGS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need dependency tracking.
-echo 4
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 4 -- we need dependency tracking. ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep ' add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 5
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 5 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-_AM_DEPENDENCIES(CCAS)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+_AM_DEPENDENCIES([CCAS])
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
@@ -119,16 +107,13 @@ $AUTOMAKE
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 6
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 6 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
 AM_PROG_AS
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 $AUTOMAKE
 
-Exit 0
+:
index 0738d6aee771823b7b01056f070f1caa1aa81788..5c42c48cd654dbcf138a7a47042cdbf01f3c842d 100755 (executable)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test of basic preprocessed assembly functionality with extension .sx.
+# Keep this in sync with sister tests asm.test and asm2.test.
 
 . ./defs || Exit 1
 
 set -e
 
+mv configure.in configure.stub
+
 cat > Makefile.am << 'END'
 noinst_PROGRAMS = maude
 maude_SOURCES = maude.sx
 END
 
-: > maude.sx
-
-# Should fail because we need CC and CCAS.
-echo 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+echo '*** Try 1 -- should fail because we need CC and CCAS ***'
+cat configure.stub - > configure.in << 'END'
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 # On fast machines the autom4te.cache created during the above run of
 # $AUTOMAKE is likely to have the same time stamp as the configure.in
@@ -49,70 +48,58 @@ grep AM_PROG_AS stderr
 # bogus installations of Autoconf use a versioned cache.)
 rm -rf autom4te*.cache
 
-# We still need CCAS.
-echo 2
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 2 -- we still need CCAS ***'
+cat configure.stub - > configure.in << 'END'
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCAS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need CCASFLAGS.
-echo 3
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 3 -- we need CCASFLAGS ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCASFLAGS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCASFLAGS.* undefined' stderr
+grep 'define .*CCASFLAGS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need dependency tracking.
-echo 4
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 4 -- we need dependency tracking. ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep ' add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 5
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 5 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-_AM_DEPENDENCIES(CCAS)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+_AM_DEPENDENCIES([CCAS])
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
@@ -120,16 +107,13 @@ $AUTOMAKE
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 6
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 6 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
 AM_PROG_AS
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 $AUTOMAKE
 
-Exit 0
+: