diff options
author | Michael Adam <obnox@samba.org> | 2011-03-04 23:17:02 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-03-05 01:31:33 +0100 |
commit | 7b4fc4d745d3286363d4627b7c6d93696269fd65 (patch) | |
tree | c3f6dc9e55a222796d062fa91bf7a52497ac3a5c | |
parent | f5ab9c1e77fceca7893449d4aeb763fc9a91562b (diff) | |
download | samba-7b4fc4d745d3286363d4627b7c6d93696269fd65.tar.gz samba-7b4fc4d745d3286363d4627b7c6d93696269fd65.tar.bz2 samba-7b4fc4d745d3286363d4627b7c6d93696269fd65.zip |
s3:test: correctly react to each failing step in the net registry roundtrip tests
-rwxr-xr-x | source3/script/tests/test_net_registry_roundtrip.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source3/script/tests/test_net_registry_roundtrip.sh b/source3/script/tests/test_net_registry_roundtrip.sh index a50e18e6d9..ad07f2bc59 100755 --- a/source3/script/tests/test_net_registry_roundtrip.sh +++ b/source3/script/tests/test_net_registry_roundtrip.sh @@ -73,6 +73,10 @@ conf_roundtrip() sed -e "$SED_INVALID_PARAMS" $1 >$DIR/conf_in conf_roundtrip_step $NET conf drop + test "x$?" = "x0" || { + return 1 + } + test -z "$($NET conf list)" 2>>$LOG if [ "$?" = "1" ]; then echo "ERROR: conf drop failed" | tee -a $LOG @@ -80,7 +84,14 @@ conf_roundtrip() fi conf_roundtrip_step $NET conf import $DIR/conf_in + test "x$?" = "x0" || { + return 1 + } + conf_roundtrip_step $NET conf list > $DIR/conf_exp + test "x$?" = "x0" || { + return 1 + } grep "\[global\]" $DIR/conf_exp >/dev/null 2>>$LOG if [ "$?" = "1" ]; then @@ -89,8 +100,15 @@ conf_roundtrip() fi conf_roundtrip_step $NET -d10 registry export $REGPATH $DIR/conf_exp.reg + test "x$?" = "x0" || { + return 1 + } conf_roundtrip_step $NET conf drop + test "x$?" = "x0" || { + return 1 + } + test -z "$($NET conf list)" 2>>$LOG if [ "$?" = "1" ]; then echo "ERROR: conf drop failed" | tee -a $LOG @@ -98,8 +116,15 @@ conf_roundtrip() fi conf_roundtrip_step $NET registry import $DIR/conf_exp.reg + test "x$?" = "x0" || { + return 1 + } conf_roundtrip_step $NET conf list >$DIR/conf_out + test "x$?" = "x0" || { + return 1 + } + diff -q $DIR/conf_out $DIR/conf_exp >> $LOG if [ "$?" = "1" ]; then echo "ERROR: registry import => conf export failed" | tee -a $LOG @@ -107,6 +132,10 @@ conf_roundtrip() fi conf_roundtrip_step $NET registry export $REGPATH $DIR/conf_out.reg + test "x$?" = "x0" || { + return 1 + } + diff -q $DIR/conf_out.reg $DIR/conf_exp.reg >>$LOG if [ "$?" = "1" ]; then echo "Error: registry import => registry export failed" | tee -a $LOG |