Avoid possible false negatives in cond46.test. * tests/cond46.test: Enable shell `errexit' flag (and bumped copyright years). Due to this change, the testcase should now fail on unexpected failures in calls to $ACLOCAL/$AUTOMAKE (whose outcomes were previously unchecked), and on failures in grepping the expected diagnostic in Automake stderr.
No portability problems should be introduced, since the test script uses only simple commands and a call to the `AUTOMAKE_fails' shell function, which calls `Exit 1' on unexpected $AUTOMAKE success (thus avoiding the possibility of false negatives), and returns with a status of `0' otherwise (thus avoiding the possibility of false positives).
From e7daa4e00f92b0a091710070832dd0e10a06e739 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Fri, 9 Apr 2010 01:27:23 +0200 Subject: [PATCH] Avoid possible false negatives in cond46.test. * tests/cond46.test: Enable shell `errexit' flag (and bumped copyright years). Due to this change, the testcase should now fail on unexpected failures in calls to $ACLOCAL/$AUTOMAKE (whose outcomes were previously unchecked), and on failures in grepping the expected diagnostic in Automake stderr. No portability problems should be introduced, since the test script uses only simple commands and a call to the `AUTOMAKE_fails' shell function, which calls `Exit 1' on unexpected $AUTOMAKE success (thus avoiding the possibility of false negatives), and returns with a status of `0' otherwise (thus avoiding the possibility of false positives). --- ChangeLog | 9 +++++++++ tests/cond46.test | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a5b5426..c8a57e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-04-08 Stefano Lattarini <stefano.lattar...@gmail.com> + + Avoid possible false negatives in cond46.test. + * tests/cond46.test: Enable shell `errexit' flag (and bumped + copyright years). Due to this change, the testcase should now + fail on unexpected failures in calls to $ACLOCAL/$AUTOMAKE (whose + outcomes were previously unchecked), and on failures in grepping + the expected diagnostic in Automake stderr. + 2010-04-04 Stefano Lattarini <stefano.lattar...@gmail.com> Generated tests are now just a thin layer around other tests. diff --git a/tests/cond46.test b/tests/cond46.test index 73b6e94..0b8696c 100755 --- a/tests/cond46.test +++ b/tests/cond46.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009, 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 @@ -18,6 +18,8 @@ . ./defs || Exit 1 +set -e + cat >> configure.in << 'END' AM_CONDITIONAL([USE_A],[test x = y]) AM_CONDITIONAL([USE_B],[test x = z]) @@ -106,5 +108,3 @@ endif END $AUTOMAKE - -Exit 0 -- 1.6.5