automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1.11-917-g391f55a
Date: Sat, 11 Jun 2011 10:47:48 +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=391f55ae47ddbe43a5fc4524f7ec9bb0d67689c0

The branch, testsuite-work has been updated
       via  391f55ae47ddbe43a5fc4524f7ec9bb0d67689c0 (commit)
       via  5b7c6b4ce170477dc3a25a5ca669d117bfb40aa8 (commit)
      from  29ce2209d36afba7d2cc672ee86fc00020872005 (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 391f55ae47ddbe43a5fc4524f7ec9bb0d67689c0
Merge: 29ce220 5b7c6b4
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jun 11 12:22:15 2011 +0200

    Merge branch 'maint' into testsuite-work
    
    * maint:
      test defs: new function 'fatal_', for hard errors

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

Summary of changes:
 ChangeLog    |   17 +++++++++++++++++
 tests/README |    6 ++++--
 tests/defs   |    1 +
 3 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e1fc269..6ada906 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2011-06-08  Stefano Lattarini  <address@hidden>
+
+       test defs: new function 'fatal_', for hard errors
+       Before this patch, the only way offered by tests/defs to
+       properly signal a hard error was the `framework_failure_'
+       function.  But the error message issued by that function,
+       as its name would suggest, refers to a set-up failure in the
+       testsuite, while hard errors can obviously also be due to
+       other reasons.  The best way to fix this inconsistency is to
+       introduce a new function with a more general error message.
+       Inspired by a recent similar change to Gnulib's tests/init.sh.
+       * tests/defs (fatal_): New function.
+       * tests/README (Section "Writing test cases" subsection "Do"):
+       Suggest the use of `fatal_', not of `framework_failure_', for
+       generic hard errors.  The latter should be reserved for "real"
+       set-up failures.
+
 2011-06-07  Stefano Lattarini  <address@hidden>
 
        tests: `lib/' shell scripts transparently tested also with $SHELL
diff --git a/tests/README b/tests/README
index d74a725..c120dce 100644
--- a/tests/README
+++ b/tests/README
@@ -146,8 +146,10 @@ Do
 
   Use the `skip_' function to skip tests, with a meaningful message if
   possible.  Where convenient, use the `warn_' function to print generic
-  warnings, and the `fail_' function for test failures.  Finally, you may
-  use the `framework_fail_' function for hard errors.
+  warnings, the `fail_' function for test failures, and the `fatal_'
+  function for hard errors.  In case a hard error is due to a failed
+  set-up of a test scenario, you can use the `framework_fail_' function
+  instead.
 
   For tests that use the `parallel-tests' Automake option, set the shell
   variable `parallel_tests' to "yes" before including ./defs.  Also,
diff --git a/tests/defs b/tests/defs
index e8ff92e..b65989a 100644
--- a/tests/defs
+++ b/tests/defs
@@ -179,6 +179,7 @@ Exit ()
 warn_ () { echo "$@" 1>&$stderr_fileno_; }
 fail_ () { warn_ "$me: failed test: $@"; Exit 1; }
 skip_ () { warn_ "$me: skipped test: $@"; Exit 77; }
+fatal_ () { warn_ "$me: hard error: $@"; Exit 99; }
 framework_failure_ () { warn_ "$me: set-up failure: $@"; Exit 99; }
 
 # cross_compiling


hooks/post-receive
-- 
GNU Automake



reply via email to

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