Tests: Redirect 'TEST' errors when it is expecting errors

Change-Id: Iad2535eca7a58526d1a23cea9b7cf445a3846782
BUG: 764966
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4329
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
This commit is contained in:
Pranith Kumar K 2012-12-18 20:39:21 +05:30 committed by Anand Avati
parent a402a3ab29
commit 2dcde13e0d

View File

@ -83,10 +83,15 @@ function _TEST()
{
TESTLINE=$1;
shift;
local redirect=""
test_header "$@";
eval "$@" >/dev/null 2>&1
if [ "$1"="!" ]; then
redirect="2>&1"
fi
eval "$@" >/dev/null $redirect
test_footer;
}