3 # Setup the windows environment.
4 # This was the best way I could figure out including library files
6 # I was finding that "cat common.exp wintest_setup.exp | expect -f -"
7 # fails to run, but exits with 0 status something like 1% of the time.
11 echo -e "\nSetting up windows environment."
12 cat $WINTEST_DIR/common.exp
> $TMPDIR/setup.exp
13 cat $WINTEST_DIR/wintest_setup.exp
>> $TMPDIR/setup.exp
14 expect
$TMPDIR/setup.exp
16 rm -f $TMPDIR/setup.exp
19 # Clean up the windows environment after the test has run or failed.
22 echo -e "\nCleaning up windows environment."
23 cat $WINTEST_DIR/common.exp
> $TMPDIR/remove.exp
24 cat $WINTEST_DIR/wintest_remove.exp
>> $TMPDIR/remove.exp
25 expect
$TMPDIR/remove.exp
27 rm -f $TMPDIR/remove.exp
35 # Display the error that caused us to restore the snapshot.
38 if [ -z $HOST_SERVER_NAME ]; then
39 # The vmware server is running locally.
40 vmrun revertToSnapshot
"$VMX_PATH"
43 vmrun
-h $HOST_SERVER_NAME -P $HOST_SERVER_PORT \
44 -u $HOST_USERNAME -p $HOST_PASSWORD \
45 revertToSnapshot
"$VMX_PATH"
49 if [ $err_rtn -eq 0 ]; then
50 echo "Snapshot restored."
52 echo "Error $err_rtn restoring snapshot!"