From: Stefano Lattarini Date: Sat, 16 Jul 2011 08:50:24 +0000 (+0200) Subject: tests: remove duplication about testing of config.* aux files X-Git-Tag: v1.11b~257^2~163 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb248782b23aea3db563b9767e26d9ae5c3d7386;p=platform%2Fupstream%2Fautomake.git tests: remove duplication about testing of config.* aux files * tests/add-missing.test: Also check that the `AC_CANONICAL_SYSTEM' autoconf macro causes the `config.sub' and `config.guess' scripts to be installed by `automake --add-missing'. Since we are at it, fix minor buglets and cosmetic issues in the `check_' function. * tests/hosts.test: Removed, completely subsumed by the previous test now. * tests/Makefile.am (TESTS): Update. --- diff --git a/ChangeLog b/ChangeLog index 41acf61..88611c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2011-07-16 Stefano Lattarini + tests: remove duplication about testing of config.* aux files + * tests/add-missing.test: Also check that the `AC_CANONICAL_SYSTEM' + autoconf macro causes the `config.sub' and `config.guess' scripts + to be installed by `automake --add-missing'. Since we are at it, + fix minor buglets and cosmetic issues in the `check_' function. + * tests/hosts.test: Removed, completely subsumed by the previous + test now. + * tests/Makefile.am (TESTS): Update. + +2011-07-16 Stefano Lattarini + tests: more uses of the 'unindent' subroutine * tests/backcompat.test: Prefer `unindent' over plain `cat' for here documents created from within a loop of if/else body. diff --git a/tests/Makefile.am b/tests/Makefile.am index 155d628..bfede0d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -541,7 +541,6 @@ help-regex.test \ help-silent.test \ help-upc.test \ hfs.test \ -hosts.test \ implicit.test \ info.test \ init.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 003d07f..235f2ef 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -829,7 +829,6 @@ help-regex.test \ help-silent.test \ help-upc.test \ hfs.test \ -hosts.test \ implicit.test \ info.test \ init.test \ diff --git a/tests/add-missing.test b/tests/add-missing.test index 7e3d08c..9fd858d 100755 --- a/tests/add-missing.test +++ b/tests/add-missing.test @@ -45,6 +45,7 @@ AC_PROG_CC AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET +AC_CANONICAL_SYSTEM AM_PATH_LISPDIR AM_PATH_PYTHON END @@ -63,12 +64,12 @@ check_ () set +x # Temporary disable shell traces to remove noise from log files. override=no run_aclocal=no - extra_files= + extra_file= while test $# -gt 0; do case $1 in --override) override=yes;; --run-aclocal) run_aclocal=yes;; - --extra-file*) extra_files="$with_files $2"; shift;; + --extra-file) extra_file=$2; shift;; *) framework_failure_ "check_: invalid argument '$1'";; esac shift @@ -81,13 +82,7 @@ check_ () else cp ../configure.stub configure.in fi - for f in $extra_files; do - if test -f ../$f; then - cp ../$f . - else - : > $f - fi - done + test -z "$extra_file" || cp ../"$extra_file" . # Read description of "test scenario" from standard input. what= line= @@ -97,9 +92,8 @@ check_ () '== Makefile.am ==') what=Makefile.am;; '== configure.in ==') what=configure.in;; '== Files ==') what=LIST;; - '==.*') framework_failure_ "invalid input line: $line";; - ''|'#%'*) - : empty line or ad-hoc comment, ignore;; + '==*') framework_failure_ "invalid input line: $line";; + ''|'#%'*) : Empty line or ad-hoc comment, ignore. ;; *) if test $what = LIST; then files="$files $line" @@ -219,7 +213,8 @@ END : %%% config.guess and config.sub %%% -for macro in AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET; do +for macro in AC_CANONICAL_BUILD AC_CANONICAL_HOST \ + AC_CANONICAL_TARGET AC_CANONICAL_SYSTEM; do check_ <. - -# Test to make sure automake correctly recognizes presence of -# AC_CANONICAL_(BUILD|HOST|SYSTEM|TARGET), and creates config.* in all -# those cases. -# From Norman Gray. - -. ./defs || Exit 1 - -: >Makefile.am - -$ACLOCAL -$AUTOMAKE --add-missing -test ! -f config.guess -test ! -f config.sub - -# Test all four of the AC_CANONICAL_* targets, including _SYSTEM, which is -# supported but deprecated by autoconf. -for macro in AC_CANONICAL_BUILD AC_CANONICAL_HOST \ - AC_CANONICAL_SYSTEM AC_CANONICAL_TARGET -do - rm -rf autom4te.cache config.sub config.guess - - cat >configure.in<