diff options
author | Brad Henry <brad@samba.org> | 2007-02-20 19:53:18 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:48:40 -0500 |
commit | 23c36460e17c06380130b95308b224c363b15e79 (patch) | |
tree | df6bddffa2f6575261253b6002f861b16078783b /source4/script/tests/win/wintest_functions.sh | |
parent | b3ef5c0b92dc86aadd3d81e981edc17559ce0026 (diff) | |
download | samba-23c36460e17c06380130b95308b224c363b15e79.tar.gz samba-23c36460e17c06380130b95308b224c363b15e79.tar.bz2 samba-23c36460e17c06380130b95308b224c363b15e79.zip |
r21473: 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.
(This used to be commit 76c6c5b8de58618ac013f5b26a6aafc98e15f57c)
Diffstat (limited to 'source4/script/tests/win/wintest_functions.sh')
-rwxr-xr-x | source4/script/tests/win/wintest_functions.sh | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/source4/script/tests/win/wintest_functions.sh b/source4/script/tests/win/wintest_functions.sh index 16f7c4041c..3c0a1dccac 100755 --- a/source4/script/tests/win/wintest_functions.sh +++ b/source4/script/tests/win/wintest_functions.sh @@ -29,7 +29,26 @@ remove_share_test() 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 } |