summaryrefslogtreecommitdiffstats
path: root/tests/include.rc
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2013-02-21 16:29:43 +0530
committerAnand Avati <avati@redhat.com>2013-03-06 21:13:08 -0800
commit7901795a494590bef45cc555a8cfbf29387ac456 (patch)
tree1b05727a8072933e6ba23ff6d9b0602736c7678b /tests/include.rc
parent419660e3283061fde6d467df5a3fa734b69f19f2 (diff)
tests: move common funtion definitions to include.rc
BUG: 765473 Change-Id: Id0d194374d34cfec8ee601090f7fe38b1856ac22 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.org/4631 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'tests/include.rc')
-rw-r--r--tests/include.rc22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/include.rc b/tests/include.rc
index 938207e58bd..03c615e5e1a 100644
--- a/tests/include.rc
+++ b/tests/include.rc
@@ -191,6 +191,28 @@ function cleanup()
umount -l $N1 2>/dev/null || true;
}
+function volinfo_field()
+{
+ local vol=$1;
+ local field=$2;
+
+ $CLI volume info $vol | grep "^$field: " | sed 's/.*: //';
+}
+
+function cleanup_tester ()
+{
+ local exe=$1
+ rm -f $exe
+}
+
+function build_tester ()
+{
+ local cfile=$1
+ local fname=$(basename "$cfile")
+ local ext="${fname##*.}"
+ local execname="${fname%.*}"
+ gcc -g -o $(dirname $cfile)/$execname $cfile
+}
alias EXPECT='_EXPECT $LINENO'
alias TEST='_TEST $LINENO'