s3:test: improve logging in the net registry roundtrip test steps
authorMichael Adam <obnox@samba.org>
Fri, 4 Mar 2011 22:12:08 +0000 (23:12 +0100)
committerMichael Adam <obnox@samba.org>
Sat, 5 Mar 2011 00:31:32 +0000 (01:31 +0100)
source3/script/tests/test_net_registry_roundtrip.sh

index eba28a6223802c272f11227f19c071f72318ee29..a50e18e6d987a9f67c2a9b64dd0996c6c493f0d5 100755 (executable)
@@ -50,8 +50,14 @@ s/servername/;&/g
 REGPATH="HKLM\Software\Samba"
 
 conf_roundtrip_step() {
-    echo $* >>$LOG
+    echo "CMD: $*" >>$LOG
     $@ 2>>$LOG
+    RC=$?
+    echo "RC: $RC" >> $LOG
+    test "x$RC" = "x0" || {
+        echo "ERROR: $@ failed (RC=$RC)" | tee -a $LOG
+    }
+    return $RC
 #    echo -n .
 }