summaryrefslogtreecommitdiffstats
path: root/tests/include.rc
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2012-12-18 20:39:21 +0530
committerAnand Avati <avati@redhat.com>2012-12-18 18:01:33 -0800
commit2dcde13e0d46c02a22ac3180c1e6d3e878c80f4a (patch)
tree15c38479f8deef0a164dd32b64bc984043092d9d /tests/include.rc
parenta402a3ab29f780662cc8498f44841f08d6fc29db (diff)
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>
Diffstat (limited to 'tests/include.rc')
-rw-r--r--tests/include.rc7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/include.rc b/tests/include.rc
index 7772bf2d4f3..509e783feff 100644
--- a/tests/include.rc
+++ b/tests/include.rc
@@ -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;
}