summaryrefslogtreecommitdiff
path: root/source3/script
diff options
context:
space:
mode:
authorVicentiu Ciorbaru <cvicentiu@gmail.com>2011-08-10 11:58:25 +0300
committerMichael Adam <obnox@samba.org>2011-08-22 13:59:28 +0200
commited233dba9a2b755ce4baf1385099ca937ae96e0b (patch)
tree01b644c959e5b62a5afa932881d286b22eb7d725 /source3/script
parent57b7fb7256e0d4e09c29e48950820f80d5c613dc (diff)
downloadsamba-ed233dba9a2b755ce4baf1385099ca937ae96e0b.tar.gz
samba-ed233dba9a2b755ce4baf1385099ca937ae96e0b.tar.bz2
samba-ed233dba9a2b755ce4baf1385099ca937ae96e0b.zip
s3-test: Enhanced the net registry roundtrip test script
The script now supports an rpc mode, which is triggered by the presence of a fourth command line parameter "rpc" Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/script')
-rwxr-xr-xsource3/script/tests/test_net_registry_roundtrip.sh27
1 files changed, 14 insertions, 13 deletions
diff --git a/source3/script/tests/test_net_registry_roundtrip.sh b/source3/script/tests/test_net_registry_roundtrip.sh
index 77b261fbba..72bc693557 100755
--- a/source3/script/tests/test_net_registry_roundtrip.sh
+++ b/source3/script/tests/test_net_registry_roundtrip.sh
@@ -15,16 +15,17 @@ fi
SCRIPTDIR="$1"
SERVERCONFFILE="$2"
CONFIGURATION="$3"
+RPC="$4"
NET="$VALGRIND ${NET:-$BINDIR/net} $CONFIGURATION"
-
if test "x${RPC}" = "xrpc" ; then
- NETREG="${NET} -U${USERNAME}%${PASSWORD} -I ${SERVER_IP} rpc registry"
+ NETCMD="${NET} -U${USERNAME}%${PASSWORD} -I ${SERVER_IP} rpc"
else
- NETREG="${NET} registry"
+ NETCMD="${NET}"
fi
+
incdir=`dirname $0`/../../../testprogs/blackbox
. $incdir/subunit.sh
@@ -72,23 +73,23 @@ conf_roundtrip()
sed -e "$SED_INVALID_PARAMS" $1 >$DIR/conf_in
- conf_roundtrip_step $NET conf drop
+ conf_roundtrip_step $NETCMD conf drop
test "x$?" = "x0" || {
return 1
}
- test -z "$($NET conf list)" 2>>$LOG
+ test -z "$($NETCMD conf list)" 2>>$LOG
if [ "$?" = "1" ]; then
echo "ERROR: conf drop failed" | tee -a $LOG
return 1
fi
- conf_roundtrip_step $NET conf import $DIR/conf_in
+ conf_roundtrip_step $NETCMD conf import $DIR/conf_in
test "x$?" = "x0" || {
return 1
}
- conf_roundtrip_step $NET conf list > $DIR/conf_exp
+ conf_roundtrip_step $NETCMD conf list > $DIR/conf_exp
test "x$?" = "x0" || {
return 1
}
@@ -99,28 +100,28 @@ conf_roundtrip()
return 1
fi
- conf_roundtrip_step $NET -d10 registry export $REGPATH $DIR/conf_exp.reg
+ conf_roundtrip_step $NETCMD -d10 registry export $REGPATH $DIR/conf_exp.reg
test "x$?" = "x0" || {
return 1
}
- conf_roundtrip_step $NET conf drop
+ conf_roundtrip_step $NETCMD conf drop
test "x$?" = "x0" || {
return 1
}
- test -z "$($NET conf list)" 2>>$LOG
+ test -z "$($NETCMD conf list)" 2>>$LOG
if [ "$?" = "1" ]; then
echo "ERROR: conf drop failed" | tee -a $LOG
return 1
fi
- conf_roundtrip_step $NET registry import $DIR/conf_exp.reg
+ conf_roundtrip_step $NETCMD registry import $DIR/conf_exp.reg
test "x$?" = "x0" || {
return 1
}
- conf_roundtrip_step $NET conf list >$DIR/conf_out
+ conf_roundtrip_step $NETCMD conf list >$DIR/conf_out
test "x$?" = "x0" || {
return 1
}
@@ -131,7 +132,7 @@ conf_roundtrip()
return 1
fi
- conf_roundtrip_step $NET registry export $REGPATH $DIR/conf_out.reg
+ conf_roundtrip_step $NETCMD registry export $REGPATH $DIR/conf_out.reg
test "x$?" = "x0" || {
return 1
}