automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Improve and extend tests `asm*.test'.


From: Stefano Lattarini
Subject: [PATCH] Improve and extend tests `asm*.test'.
Date: Wed, 14 Jul 2010 14:19:20 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

* 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       |   11 ++++++
 tests/asm.test  |   77 ++++++++++++++++++--------------------------
 tests/asm2.test |   95 +++++++++++++++++++++++--------------------------------
 tests/asm3.test |   90 +++++++++++++++++++++------------------------------
 4 files changed, 120 insertions(+), 153 deletions(-)
From 6af2cab7d7c91c781d83fcb43bbc44a17a2c8fe2 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 14 Jul 2010 14:01:43 +0200
Subject: [PATCH] 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.
---
 ChangeLog       |   11 ++++++
 tests/asm.test  |   77 ++++++++++++++++++--------------------------
 tests/asm2.test |   95 +++++++++++++++++++++++--------------------------------
 tests/asm3.test |   90 +++++++++++++++++++++------------------------------
 4 files changed, 120 insertions(+), 153 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4366381..5f41a4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-07-14  Stefano Lattarini  <address@hidden>
+
+       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.
+
 2010-06-26  Ralf Wildenhues  <address@hidden>
 
        Update program --help output to match current GCS.
diff --git a/tests/asm.test b/tests/asm.test
index 6c0aa3d..3b8a772 100755
--- a/tests/asm.test
+++ b/tests/asm.test
@@ -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
@@ -14,31 +14,30 @@
 # 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 '*** Run 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 '*** Run 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 '*** Run 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 '*** Run 4 -- We have every needed, expect a 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 '*** Run 5 -- We have every needed, expect a success ***'
+cat configure.stub - > configure.in << 'END'
 AM_PROG_AS
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 $AUTOMAKE
 
-Exit 0
+:
diff --git a/tests/asm2.test b/tests/asm2.test
index 8afd4f9..a848ba2 100755
--- a/tests/asm2.test
+++ b/tests/asm2.test
@@ -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
@@ -14,31 +15,30 @@
 # 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 '*** Run 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 '*** Run 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 '*** Run 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 '*** Run 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 'define .*am__fastdepCCAS.* 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 '*** Run 5 -- We have every needed, expect a 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 '*** Run 6 -- We have every needed, expect a success. ***'
+cat configure.stub - > configure.in << 'END'
 AM_PROG_AS
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 $AUTOMAKE
 
-Exit 0
+:
diff --git a/tests/asm3.test b/tests/asm3.test
index 0738d6a..101e106 100755
--- a/tests/asm3.test
+++ b/tests/asm3.test
@@ -16,30 +16,29 @@
 # 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 '*** Run 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 '*** Run 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 '*** Run 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 '*** Run 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 'define .*am__fastdepCCAS.* 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 '*** Run 5 -- We have every needed, expect a 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 '*** Run 6 -- We have every needed, expect a success. ***'
+cat configure.stub - > configure.in << 'END'
 AM_PROG_AS
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 $AUTOMAKE
 
-Exit 0
+:
-- 
1.7.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]