svn commit: samba r21473 - in branches/SAMBA_4_0/source/script/tests/win: .

brad at samba.org brad at samba.org
Tue Feb 20 19:53:19 GMT 2007


Author: brad
Date: 2007-02-20 19:53:18 +0000 (Tue, 20 Feb 2007)
New Revision: 21473

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21473

Log:

Added new parameters to test_win.conf that apply only to the DC tests.

Made the restore_snapshot() routine in wintest_functions.sh more robust.
This change would have broken the existing windows tests, if they weren't already broken.

Will fix those once the windows DC tests are committed and working in the build farm.


Modified:
   branches/SAMBA_4_0/source/script/tests/win/test_win.conf
   branches/SAMBA_4_0/source/script/tests/win/wintest_functions.sh


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/win/test_win.conf
===================================================================
--- branches/SAMBA_4_0/source/script/tests/win/test_win.conf	2007-02-20 19:30:30 UTC (rev 21472)
+++ branches/SAMBA_4_0/source/script/tests/win/test_win.conf	2007-02-20 19:53:18 UTC (rev 21473)
@@ -5,6 +5,25 @@
 # Command prompt that we are expecting on the windows host.
 export SMBTORTURE_REMOTE_PROMPT=">"
 
+##
+## The variables in this section apply to the 'make wintest_dc' set of tests.
+##
+
+# A username and password with admin rights to the DC we're testing against.
+export WIN2K3_DC_USERNAME="tortureuser"
+export WIN2K3_DC_PASSWORD="torturepass"
+
+# The domain and realm that the DC is configured for.
+export WIN2K3_DC_DOMAIN="WINTESTDC"
+export WIN2K3_DC_REALM="wintest.dc"
+
+# The path to the DC vmware image config file, local to the vmware server.
+export WIN2K3_DC_VM_CFG_PATH="/var/lib/vmware/Virtual Machines/Windows Server 2003 DC BuildFarm/Windows 2003 DC BuildFarm.vmx"
+
+##
+## The parameters in this section apply to the 'make wintest' set of tests.
+##
+
 # The username and password we will be testing with.
 # This user will need admin rights on the remote windows host.
 export SMBTORTURE_USERNAME="tortureuser"

Modified: branches/SAMBA_4_0/source/script/tests/win/wintest_functions.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/win/wintest_functions.sh	2007-02-20 19:30:30 UTC (rev 21472)
+++ branches/SAMBA_4_0/source/script/tests/win/wintest_functions.sh	2007-02-20 19:53:18 UTC (rev 21473)
@@ -29,7 +29,26 @@
 
 restore_snapshot()
 {
-	echo -e $1
-	vmrun revertToSnapshot "$VM_CFG_PATH"
-	echo "Snapshot restored."
+	err_str=$1
+	VMX_PATH=$2
+
+	# Display the error that caused us to restore the snapshot.
+	echo -e $err_str
+
+	if [ -z $HOST_SERVER_NAME ]; then
+		# The vmware server is running locally.
+		vmrun revertToSnapshot "$VMX_PATH"
+		err_rtn=$?
+	else
+		vmrun -h $HOST_SERVER_NAME -P $HOST_SERVER_PORT \
+			-u $HOST_USERNAME -p $HOST_PASSWORD \
+			revertToSnapshot "$VMX_PATH"
+		err_rtn=$?
+	fi
+
+	if [ $err_rtn -eq 0 ]; then
+		echo "Snapshot restored."
+	else
+		echo "Error $err_rtn restoring snapshot!"
+	fi
 }



More information about the samba-cvs mailing list