From d137a68c3c38a896d62ed6c5725c705b82f6b5d6 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Thu, 6 May 2010 03:18:45 +0200 Subject: [PATCH] Avoid possible false negatives in dejagnu7.test. * tests/dejagnu7.test: Enable shell `errexit' flag. Also, avoid unportable use of fgrep option `-e'. Signed-off-by: Ralf Wildenhues --- ChangeLog | 4 ++++ tests/dejagnu7.test | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f1a33a13..9a33a676d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-05-23 Stefano Lattarini + Avoid possible false negatives in dejagnu7.test. + * tests/dejagnu7.test: Enable shell `errexit' flag. Also, avoid + unportable use of fgrep option `-e'. + * tests/conflnk3.test: Use `test -r FILE' and `test ! -r FILE' instead of respectively `test -e FILE' and `test ! -e FILE', since Solaris Sh doesn't grok the latter. Do not SKIP the test diff --git a/tests/dejagnu7.test b/tests/dejagnu7.test index 9abd42890..552c2caa1 100755 --- a/tests/dejagnu7.test +++ b/tests/dejagnu7.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -20,8 +20,10 @@ required=runtest . ./defs || Exit 1 +set -e + # Check whether DejaGnu supports --status -runtest --help | $FGREP -e --status || Exit 77 +runtest --help | grep '.*--status' || Exit 77 cat > failtcl << 'END' #! /bin/sh -- 2.47.2