forked from Zimbra/zm-load-testing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathruntest.sh
52 lines (47 loc) · 1.12 KB
/
runtest.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
usage=$(
cat <<EOF
$0 [OPTION]
-u VALUE set "u" argument to specify type of customer
EOF
)
userType=""
while getopts "u:i" OPTION; do
case "$OPTION" in
u)
userType="$OPTARG"
;;
*)
echo "unrecognized option"
echo "$usage"
;;
esac
done
if [ "$userType" = "BSP" ]; then {
echo "Executing test for BSP customer"
setsid ant BSP-zsoap > BSP-zsoap.out 2>&1 &
setsid ant BSP-pop > BSP-pop.out 2>&1 &
setsid ant BSP-imap > BSP-imap.out 2>&1 &
}
else {
if [ "$userType" = 'CSP' ]; then {
echo "Executing test for CSP customer"
setsid ant CSP-zsoap > CSP-zsoap.out 2>&1 &
setsid ant CSP-pop > CSP-pop.out 2>&1 &
setsid ant CSP-imap > CSP-imap.out 2>&1 &
}
else {
if [ "$userType" = 'CSP1' ]; then {
echo "Executing test for CSP1 customer"
setsid ant CSP1-zsoap > CSP1-zsoap.out 2>&1 &
setsid ant CSP1-pop > CSP1-pop.out 2>&1 &
setsid ant CSP1-imap > CSP1-imap.out 2>&1 &
}
else {
echo "Customer type not mentioned"
}
fi
}
fi
}
fi