automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, parallel-tests-maint, updat


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, parallel-tests-maint, updated. v1.11-368-g5c237a6
Date: Fri, 20 May 2011 22:16:59 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=5c237a6208c74eb445613e5237b4749d62f18b28

The branch, parallel-tests-maint has been updated
       via  5c237a6208c74eb445613e5237b4749d62f18b28 (commit)
       via  82fc4d353ce941f09f16738a31fb8958d0320be2 (commit)
       via  3352b4e8e52d48fd98cda77750d21a819f5cfd47 (commit)
       via  0f53bd10322ac70691d8bed06533424eef8db0e6 (commit)
       via  2fec9f098ac951e1f7725bce5894c3c7355c59ba (commit)
       via  daa946a431442335bdf965e27b6f81f6c109fddc (commit)
      from  a9eef973b5ea47cc3495f1a8307d4f7b85aea46f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5c237a6208c74eb445613e5237b4749d62f18b28
Merge: a9eef97 82fc4d3
Author: Stefano Lattarini <address@hidden>
Date:   Sat May 21 00:16:25 2011 +0200

    Merge branch 'maint' into parallel-tests-maint
    
    * maint:
      testsuite: avoid re-running few tests with 'parallel-tests' option
      testsuite: allow tests to avoid the use of 'parallel-tests' option
      tests/README: update obsoleted advice
      test defs: rename requirement 'non-cross' -> 'native'
      testsuite: be more cross-compile friendly

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                |   57 ++++++++++++++++++++++++++++++++++++++++++++++
 tests/Makefile.in        |    5 +---
 tests/README             |   19 +++++++++------
 tests/defs.in            |   50 +++++++++++++++++++++++++++++++++++++--
 tests/gen-parallel-tests |   11 +++++++-
 tests/pr401.test         |    1 +
 tests/pr401b.test        |    1 +
 tests/pr401c.test        |    1 +
 8 files changed, 128 insertions(+), 17 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1207390..6eb09d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,60 @@
+2011-05-20  Stefano Lattarini  <address@hidden>
+
+       testsuite: avoid re-running few tests with 'parallel-tests' option
+       Some tests in our testsuite use the 'simple-tests' driver only
+       marginally, or simply as a mean to conveniently check unrelated
+       invariants.  It makes little sense to force these tests to also
+       run with the 'parallel-tests' Automake option active, as doing so
+       offers no real gain in coverage, while often causing a measurable
+       overhead in execution time (for an already too-slow testsuite).
+       * tests/pr401.test (parallel_tests): Define to "no", to prevent
+       the generation of a sibling test script using the 'parallel-tests'
+       driver.
+       * tests/pr401b.test: Likewise.
+       * tests/pr401c.test: Likewise.
+
+2011-05-20  Stefano Lattarini  <address@hidden>
+
+       testsuite: allow tests to avoid the use of 'parallel-tests' option
+       * tests/gen-parallel-tests: Do not generate "siblings" for tests
+       that explicitly define the `parallel_tests', whether to "yes" or
+       to any other value.  Extend heading comments to give a rationale
+       for this behaviour.
+       * tests/README: Update.
+
+2011-05-20  Stefano Lattarini  <address@hidden>
+
+       tests/README: update obsoleted advice
+       * tests/README (Section "Writing test cases" subsection "Do"):
+       Do not suggest to use the `*-p.test' pattern for the names of
+       hand-written tests which use the `parallel-tests' Automake option.
+       Not only is this not respected by the existing tests, but it is
+       more likely to cause conflicts with auto-generated tests.
+       So, suggest to *avoid* using the `*-p.test' pattern in names
+       of hand-written tests instead.
+       (Section "Writing test cases" subsection "Do not"):  When
+       suggesting not to override Makefile variables using command
+       line arguments, do not use the badly outdated variables `U'
+       and 'ANSI2KNR' in the example; instead, use the more common
+       and typical `DESTDIR'.
+
+2011-05-19  Stefano Lattarini  <address@hidden>
+
+       test defs: rename requirement 'non-cross' -> 'native'
+       * tests/defs.in (non-cross): Rename requirement ...
+       (native): ... to this, which is clearer and fits the
+       existing lingo better.
+       Suggestion by Ralf Wildenhues.
+
+2011-05-15  Stefano Lattarini  <address@hidden>
+
+       testsuite: be more cross-compile friendly
+       * tests/defs.in (cross_compiling): New subroutine.
+       (am__tool_prefix): New internal variable.
+       (gcc, g++, gcj): Force the use of the correct "tool prefix"
+       when cross compiling.
+       (gfortran, g77, non-cross): New requirements.
+
 2011-05-11  Stefano Lattarini  <address@hidden>
 
        docs: parallel-tests is not experimental anymore
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 44aac47..80f6b15 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -302,10 +302,7 @@ comment9-p.test \
 dejagnu-p.test \
 exeext4-p.test \
 maken3-p.test \
-maken4-p.test \
-pr401-p.test \
-pr401b-p.test \
-pr401c-p.test
+maken4-p.test
 
 MAINTAINERCLEANFILES = $(parallel_tests)
 
diff --git a/tests/README b/tests/README
index 26ce3ff..9680a54 100644
--- a/tests/README
+++ b/tests/README
@@ -107,8 +107,11 @@ Do
 
   For tests that use the `parallel-tests' Automake option, set the shell
   variable `parallel_tests' to "yes" before including ./defs.  Also,
-  use for them a name that ends in `-p.test' and does not clash with any
-  generated tests in the suite.
+  do not use for them a name that ends in `-p.test', since that would
+  risk to clash with automatically-generated tests.  For tests that are
+  *not* meant to work with the `parallel-tests' Automake option (these
+  should be very very few), set the shell variable `parallel_tests' to
+  "no" before including ./defs.
 
   ./defs sets a skeleton configure.in.  If possible, append to this
   file.  In some cases you'll have to overwrite it, but this should
@@ -177,12 +180,12 @@ Do not
   reason, but at least it makes sure the original error is still
   here.)
 
-  Do not override Makefile variables using make arguments, as in
-    $MAKE ANSI2KNR=./ansi2knr U=_ all
-  this is not portable for recursive targets (targets that
-  call a sub-make may not pass `ANSI2KNR=./ansi2knr U=_' along).
-  Use the following instead.
-    ANSI2KNR=./ansi2knr U=_ $MAKE -e all
+  Do not override Makefile variables using make arguments, as in e.g.:
+    $MAKE DESTDIR=/foo/bar install
+  This is not portable for recursive targets (targets that call a
+  sub-make may not pass `DESTDIR=/foo/bar' along).  Use the following
+  instead:
+    DESTDIR=/foo/bar $MAKE -e install
 
   Do not send a test case without signing a copyright disclaimer.
   See http://sources.redhat.com/automake/contribute.html or
diff --git a/tests/defs.in b/tests/defs.in
index 8f9534e..e020498 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -148,6 +148,23 @@ fail_ () { warn_ "$me: failed test: $@"; Exit 1; }
 skip_ () { warn_ "$me: skipped test: $@"; Exit 77; }
 framework_failure_ () { warn_ "$me: set-up failure: $@"; Exit 99; }
 
+# cross_compiling
+# ---------------
+# Tell whether we are cross-compiling.  This is especially useful to skip
+# tests (or portions of them) that requires a native compiler.
+cross_compiling ()
+{
+  test x"$host_alias" != x
+}
+
+# So that we can force the use of correct gcc, g++ etc., consistently
+# with cross-compilation settings.
+if cross_compiling; then
+  am__tool_prefix="$host_alias-"
+else
+  am__tool_prefix=
+fi
+
 for tool in : $required
 do
   # Check that each required tool is present.
@@ -195,24 +212,48 @@ do
       # always use it.  This is important only when the user
       # has defined CC in his environment, otherwise ./configure will
       # prefer gcc to other compilers.
-      CC=gcc
+      CC=${am__tool_prefix}gcc
       export CC
       echo "$me: running $CC --version"
       ( $CC --version ) || exit 77
       ;;
     gcj)
-      GCJ=gcj
+      GCJ=${am__tool_prefix}gcj
       export GCJ
       echo "$me: running $GCJ --version"
       ( $GCJ --version ) || exit 77
       ( $GCJ -v ) || exit 77
       ;;
     g++)
-      CXX=g++
+      CXX=${am__tool_prefix}g++
       export CXX
       echo "$me: running $CXX --version"
       ( $CXX --version ) || exit 77
       ;;
+    gfortran)
+      FC=${am__tool_prefix}gfortran
+      export FC
+      echo "$me: running $FC --version"
+      $FC --version || skip_ "GNU Fortran compiler not available"
+      echo "$me: running $FC -v"
+      $FC -v || skip_ "botched installation for GNU Fortran compiler"
+      case " $required " in
+        *\ g77\ *) ;;
+        *) F77=$FC; export F77;;
+      esac
+      ;;
+    g77)
+      F77=${am__tool_prefix}g77
+      export F77
+      echo "$me: running $F77 --version"
+      $F77 --version || skip_ "GNU Fortran 77 compiler not available"
+      echo "$me: running $F77 -v"
+      $F77 -v || skip_ "botched installation for GNU Fortran 77 compiler"
+      case " $required " in
+        *\ gfortran\ *) ;;
+        *) FC=$F77; export FC;;
+      esac
+      ;;
     icc)
       CC=icc
       export CC
@@ -251,6 +292,9 @@ do
       rm -f $priv_check_temp
       test $overwrite_status = 0 && exit 77
       ;;
+    native)
+      cross_compiling && skip_ "doesn't work in cross-compile mode"
+      ;;
     python)
       # Python doesn't support --version, it has -V
       echo "$me: running python -V"
diff --git a/tests/gen-parallel-tests b/tests/gen-parallel-tests
index 39f5d1e..451fb77 100755
--- a/tests/gen-parallel-tests
+++ b/tests/gen-parallel-tests
@@ -19,6 +19,14 @@
 # For each test in the TESTS list in this Makefile.am file, that itself
 # tests features of the TESTS automake interface, generate a sibling
 # test that does likewise, but with the option `parallel-tests' enabled.
+# Individual tests can prevent the creation of such a sibling by
+# explicitly setting the `$parallel_tests' variable to either "yes" or
+# "no".  The rationale for this is that if the variable is set to "yes",
+# the test already uses the `parallel-tests' option, so that a sibling
+# would be just a duplicate; while if the variable is set to "no", the
+# test doesn't support, or is not meant to run with, the `parallel-tests'
+# option, and forcing it to do so in the sibling would likely cause a
+# spurious failure.
 
 set -e
 
@@ -31,8 +39,7 @@ grep -v '.-p\.test' |
 LC_ALL=C sort -u |
 while read tst; do
   if grep '^[^#]*parallel-tests' $tst >/dev/null \
-     || grep "parallel_tests=yes" $tst >/dev/null \
-     || grep "parallel_tests=['\"]yes" $tst >/dev/null
+     || grep "parallel_tests=" $tst >/dev/null
   then :; else echo $tst; fi;
 done |
 {
diff --git a/tests/pr401.test b/tests/pr401.test
index b68b5ed..88f7733 100755
--- a/tests/pr401.test
+++ b/tests/pr401.test
@@ -17,6 +17,7 @@
 # Check support for AC_CONFIG_LIBOBJ_DIR vs LIBOBJS.
 # (pr401b.test and pr401c.test do the same for LTLIBOBJS and ALLOCA)
 
+parallel_tests=no
 required=gcc
 . ./defs || Exit 1
 
diff --git a/tests/pr401b.test b/tests/pr401b.test
index 8e296ef..0af4646 100755
--- a/tests/pr401b.test
+++ b/tests/pr401b.test
@@ -17,6 +17,7 @@
 # Check support for AC_CONFIG_LIBOBJ_DIR vs LTLIBOBJS.
 # (pr401.test and pr401c.test do the same for LIBOBJS and ALLOCA)
 
+parallel_tests=no
 required='gcc libtoolize'
 . ./defs || Exit 1
 
diff --git a/tests/pr401c.test b/tests/pr401c.test
index 8682dc0..b94bc16 100755
--- a/tests/pr401c.test
+++ b/tests/pr401c.test
@@ -17,6 +17,7 @@
 # Check support for AC_CONFIG_LIBOBJ_DIR vs ALLOCA.
 # (pr401.test and pr401b.test do the same for LIBOBJS and LTLIBOBJS)
 
+parallel_tests=no
 required=gcc
 . ./defs || Exit 1
 


hooks/post-receive
-- 
GNU Automake



reply via email to

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