diff options
author | Brad Henry <brad@samba.org> | 2006-10-24 01:04:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:21:37 -0500 |
commit | ac83f285a17cedeb8c40e66f79253b57a56a5ceb (patch) | |
tree | d63ff21bba2b8754a35ba43c171120ba699bb77d /source4 | |
parent | 3c203ab927b0ec793ec431199526bb218cc6e2bc (diff) | |
download | samba-ac83f285a17cedeb8c40e66f79253b57a56a5ceb.tar.gz samba-ac83f285a17cedeb8c40e66f79253b57a56a5ceb.tar.bz2 samba-ac83f285a17cedeb8c40e66f79253b57a56a5ceb.zip |
r19470: Move common windows test functions into their own script wintest_functions.sh, and remove them from the main windows test script.
(This used to be commit 587196092846dbab009be9063b1680ad73ae9c14)
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/script/tests/test_win.sh | 36 | ||||
-rwxr-xr-x | source4/script/tests/win/wintest_functions.sh | 35 |
2 files changed, 37 insertions, 34 deletions
diff --git a/source4/script/tests/test_win.sh b/source4/script/tests/test_win.sh index 764672adf0..d7f61cefdf 100755 --- a/source4/script/tests/test_win.sh +++ b/source4/script/tests/test_win.sh @@ -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 diff --git a/source4/script/tests/win/wintest_functions.sh b/source4/script/tests/win/wintest_functions.sh new file mode 100755 index 0000000000..16f7c4041c --- /dev/null +++ b/source4/script/tests/win/wintest_functions.sh @@ -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." +} |