diff options
author | Venky Shankar <vshankar@redhat.com> | 2012-12-11 13:31:12 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-12-11 16:26:52 -0800 |
commit | a86e36373b648ba51a286614cae889a0fe9d3f52 (patch) | |
tree | 81f5a261ca7f15334dea1c5d508c2e5b5431d582 /tests/include.rc | |
parent | cc9701d4f533bf7337d2925424e2498ab64fdf13 (diff) |
gsyncd / geo-rep: do not start geo-rep if replace brick is in progress
Change-Id: I9db32544ceb6f90c8231aaf40d722f6869a72614
BUG: 861945
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/4289
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.rc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/include.rc b/tests/include.rc index b572fbc6379..7877bd5c129 100644 --- a/tests/include.rc +++ b/tests/include.rc @@ -13,7 +13,7 @@ mkdir -p $B0; mkdir -p $M0 $M1; mkdir -p $N0 $N1; -testcnt=`egrep '^[ \t]*(EXPECT|TEST|EXPECT_WITHIN)' $0 | wc -l`; +testcnt=`egrep '^[ \t]*(EXPECT|TEST|EXPECT_WITHIN|EXPECT_KEYWORD)' $0 | wc -l`; echo 1..$testcnt t=1 @@ -64,6 +64,20 @@ function _EXPECT() test_footer; } +function _EXPECT_KEYWORD() +{ + TESTLINE=$1; + shift; + + test_header "$@"; + + e="$1"; + shift; + "$@" | tail -1 | grep -q "$e" + + test_footer; +} + function _TEST() { @@ -128,4 +142,5 @@ function cleanup() alias EXPECT='_EXPECT $LINENO' alias TEST='_TEST $LINENO' alias EXPECT_WITHIN='_EXPECT_WITHIN $LINENO' +alias EXPECT_KEYWORD='_EXPECT_KEYWORD $LINENO' shopt -s expand_aliases |