This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
it.sh
executable file
·101 lines (89 loc) · 2.05 KB
/
it.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/bin/bash
set -e
case "$OSTYPE" in
darwin*)
default="\x1B[0m"
cyan="\x1B[36m"
yellow="\x1B[33m"
magenta="\x1B[35m"
creeol="\r\033[K"
;;
*)
default="\e[0m"
cyan="\e[36m"
yellow="\e[33m"
magenta="\e[35m"
creeol="\r\033[K"
;;
esac
fn_echo(){
echo -en "${creeol}${cyan}$@${default}"
echo -en "\n"
}
fn_select_group() {
PS3='Please enter integration test group tag (-Dgroups): '
options=("anomaly-test" "connection-retry-test" "batch-insert-test" "batch-update-test" "QUIT")
select opt in "${options[@]}"
do
case $opt in
"connection-retry-test")
groups=$opt
break
;;
"batch-insert-test")
groups=$opt
break
;;
"batch-update-test")
groups=$opt
break
;;
"anomaly-test")
groups=$opt
break
;;
"QUIT")
exit 0
;;
*) echo "invalid option $REPLY";;
esac
done
}
fn_select_profile() {
PS3='Please enter integration test Maven profile (-P): '
options=("it-local" "it-dedicated" "it-dev" "QUIT")
select opt in "${options[@]}"
do
case $opt in
"it-local")
profile=$opt
fn_select_group
break
;;
"it-dev")
profile=$opt
fn_select_group
break
;;
"it-dedicated")
profile=$opt
fn_select_group
break
;;
"QUIT")
exit 0
;;
*) echo "invalid option $REPLY";;
esac
done
}
################################
################################
################################
profile=it
groups=
fn_echo "** Integration Test Menu **"
fn_select_profile
fn_echo "Maven Profile: $profile"
fn_echo "Test Group(s): $groups"
./mvnw -P "$profile" -Dgroups="$groups" clean install