r19471: Move BASE and RAW tests to their own scripts. Run the same set of tests as...
[Samba/ekacnet.git] / source4 / script / tests / win / wintest_raw.sh
blob2459b21d6d2648b4a654f222b9f21edb86fb7281
1 #!/bin/sh
3 . script/tests/test_functions.sh
5 . script/tests/win/wintest_functions.sh
7 # This variable is defined in the per-hosts .fns file.
8 . $WINTESTCONF
10 if [ $# -lt 4 ]; then
11 cat <<EOF
12 Usage: test_net.sh SERVER USERNAME PASSWORD DOMAIN
13 EOF
14 exit 1;
17 server="$1"
18 username="$2"
19 password="$3"
20 domain="$4"
21 shift 4
23 raw_tests="RAW-QFILEINFO RAW-SFILEINFO RAW-MKDIR RAW-SEEK RAW-OPEN RAW-WRITE RAW-UNLINK RAW-READ RAW-CLOSE RAW-IOCTL RAW-RENAME RAW-EAS RAW-STREAMS"
24 # This test fails: RAW-QFSINFO
26 all_errs=0
28 for t in $raw_tests; do
29 test_name="$t / WINDOWS SERVER"
30 echo -e "\n$test_name SETUP PHASE"
32 setup_share_test
34 if [ $err_rtn -ne 0 ]; then
35 # If test setup fails, load VM snapshot and skip test.
36 restore_snapshot "\n$test_name setup failed, skipping test."
37 else
38 echo -e "\n$test_name setup completed successfully."
39 old_errs=$all_errs
41 testit "$test_name" $SMBTORTURE_BIN_PATH \
42 -U $username%$password \
43 -W $domain //$server/$SMBTORTURE_REMOTE_SHARE_NAME \
44 $t || all_errs=`expr $all_errs + 1`
45 if [ $old_errs -lt $all_errs ]; then
46 restore_snapshot "\n$test_name failed."
47 else
48 echo -e "\n$test_name CLEANUP PHASE"
49 remove_share_test
50 if [ $err_rtn -ne 0 ]; then
51 # If cleanup fails, restore VM snapshot.
52 restore_snapshot "\n$test_name removal failed."
53 else
54 echo -e "\n$test_name removal completed successfully."
58 done
60 testok $0 $all_errs