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

brad at samba.org brad at samba.org
Tue Oct 24 01:04:21 GMT 2006


Author: brad
Date: 2006-10-24 01:04:20 +0000 (Tue, 24 Oct 2006)
New Revision: 19470

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

Log:
Move common windows test functions into their own script wintest_functions.sh, and remove them from the main windows test script.


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


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/test_win.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/test_win.sh	2006-10-23 20:13:53 UTC (rev 19469)
+++ branches/SAMBA_4_0/source/script/tests/test_win.sh	2006-10-24 01:04:20 UTC (rev 19470)
@@ -9,43 +9,11 @@
 
 . script/tests/test_functions.sh
 
+. script/tests/wintest_functions.sh
+
 # This variable is defined in the per-hosts .fns file.
 . $WINTESTCONF
 
-# Setup the windows environment.
-# This was the best way I could figure out including library files
-# for the moment.
-# I was finding that "cat common.exp wintest_setup.exp | expect -f -"
-# fails to run, but exits with 0 status something like 1% of the time.
-
-setup_share_test()
-{
-	echo -e "\nSetting up windows environment."
-	cat $WINTEST_DIR/common.exp > $TMPDIR/setup.exp
-	cat $WINTEST_DIR/wintest_setup.exp >> $TMPDIR/setup.exp
-	expect $TMPDIR/setup.exp
-	err_rtn=$?
-	rm -f $TMPDIR/setup.exp
-}
-
-# Clean up the windows environment after the test has run or failed.
-remove_share_test()
-{
-	echo -e "\nCleaning up windows environment."
-	cat $WINTEST_DIR/common.exp > $TMPDIR/remove.exp
-	cat $WINTEST_DIR/wintest_remove.exp >> $TMPDIR/remove.exp
-	expect $TMPDIR/remove.exp
-	err_rtn=$?
-	rm -f $TMPDIR/remove.exp
-}
-
-restore_snapshot()
-{
-	echo -e $1
-	vmrun revertToSnapshot "$VM_CFG_PATH"
-	echo "Snapshot restored."
-}
-
 # Index variable to count the total number of tests which fail.
 all_errs=0
 

Added: branches/SAMBA_4_0/source/script/tests/win/wintest_functions.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/win/wintest_functions.sh	2006-10-23 20:13:53 UTC (rev 19469)
+++ branches/SAMBA_4_0/source/script/tests/win/wintest_functions.sh	2006-10-24 01:04:20 UTC (rev 19470)
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# Setup the windows environment.
+# This was the best way I could figure out including library files
+# for the moment.
+# I was finding that "cat common.exp wintest_setup.exp | expect -f -"
+# fails to run, but exits with 0 status something like 1% of the time.
+
+setup_share_test()
+{
+	echo -e "\nSetting up windows environment."
+	cat $WINTEST_DIR/common.exp > $TMPDIR/setup.exp
+	cat $WINTEST_DIR/wintest_setup.exp >> $TMPDIR/setup.exp
+	expect $TMPDIR/setup.exp
+	err_rtn=$?
+	rm -f $TMPDIR/setup.exp
+}
+
+# Clean up the windows environment after the test has run or failed.
+remove_share_test()
+{
+	echo -e "\nCleaning up windows environment."
+	cat $WINTEST_DIR/common.exp > $TMPDIR/remove.exp
+	cat $WINTEST_DIR/wintest_remove.exp >> $TMPDIR/remove.exp
+	expect $TMPDIR/remove.exp
+	err_rtn=$?
+	rm -f $TMPDIR/remove.exp
+}
+
+restore_snapshot()
+{
+	echo -e $1
+	vmrun revertToSnapshot "$VM_CFG_PATH"
+	echo "Snapshot restored."
+}


Property changes on: branches/SAMBA_4_0/source/script/tests/win/wintest_functions.sh
___________________________________________________________________
Name: svn:executable
   + *



More information about the samba-cvs mailing list