[sheepdog] [PATCH v4 5/7] tests: teach tests to test md feature
Liu Yuan
namei.unix at gmail.com
Tue Mar 12 07:00:19 CET 2013
From: Liu Yuan <tailai.ly at taobao.com>
To test md feature, just pass -md to check
$ ./check -md ...
Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
tests/check | 9 +++++++++
tests/common.rc | 6 +++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/tests/check b/tests/check
index b700ff5..cfa157f 100755
--- a/tests/check
+++ b/tests/check
@@ -64,6 +64,9 @@ expunge=true
have_test_arg=false
randomize=false
valgrind=false
+
+export md=false
+
rm -f $tmp.list $tmp.tmp $tmp.sed
for r
@@ -141,6 +144,7 @@ check options
-zk use zookeeper driver
-valgrind use valgrind
-xdiff graphical mode diff
+ -md enable md for backend
-e exit immediately on test failure
-n show me, do not run tests
-T output timestamps
@@ -165,6 +169,11 @@ testlist options
xpand=false
;;
+ -md)
+ md=true
+ xpand=false
+ ;;
+
-valgrind)
valgrind=true
xpand=false
diff --git a/tests/common.rc b/tests/common.rc
index b160800..15dd530 100644
--- a/tests/common.rc
+++ b/tests/common.rc
@@ -221,7 +221,11 @@ _start_sheep()
_die "sheep $1 is still running"
fi
- $SHEEP $STORE/$1 -z $1 -p $((7000+$1)) -c $DRIVER -y 127.0.0.1 -d $2 -F $LOG_FORMAT
+ if $md; then
+ MD=",$STORE/$1/d0,$STORE/$1/d1"
+ fi
+
+ $SHEEP $STORE/$1$MD -z $1 -p $((7000+$1)) -c $DRIVER -y 127.0.0.1 -d $2 -F $LOG_FORMAT
if [ $? != 0 ]; then
_die "cannot start sheep $1"
--
1.7.9.5
More information about the sheepdog
mailing list