forked from join-monster/join-monster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest
executable file
·108 lines (98 loc) · 2.23 KB
/
test
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
102
103
104
105
106
107
#!/bin/bash
set -e
export TZ=UTC
GREEN='\033[102m'
BLUE='\033[104m'
YELLOW='\033[33m'
NC='\033[0m'
ORACLE=1
PG=1
MYSQL=1
SQLITE=1
while [[ $# -gt 0 ]]
do
case $1 in
-o|--no-oracle)
ORACLE=0
;;
-p|--no-pg)
PG=0
;;
-m|--no-mysql)
MYSQL=0
;;
-s|--no-sqlite)
SQLITE=0
;;
*)
echo unrecognized option $1
exit 1
;;
esac
shift # past argument or value
done
echo -e "${BLUE} running with all joins ${NC}"
if [ $SQLITE = 1 ]; then
echo -e "${YELLOW} testing sqlite3${NC}"
npm run testsqlite3
fi
if [ $MYSQL = 1 ]; then
echo -e "${YELLOW} testing mysql${NC}"
npm run testmysql
fi
if [ $ORACLE = 1 ]; then
echo -e "${YELLOW} testing oracle${NC}"
npm run testoracle
npm run testoracle-paging
fi
if [ $PG = 1 ]; then
echo -e "${YELLOW} testing postgres${NC}"
npm run testpg
npm run testpg-paging
MINIFY=1 npm run testpg
MINIFY=1 npm run testpg-paging
fi
echo -e "${BLUE} running with all batches ${NC}"
if [ $SQLITE = 1 ]; then
echo -e "${YELLOW} testing sqlite3${NC}"
STRATEGY=batch npm run testsqlite3
fi
if [ $MYSQL = 1 ]; then
echo -e "${YELLOW} testing mysql${NC}"
STRATEGY=batch npm run testmysql
STRATEGY=batch npm run testmysql-paging
fi
if [ $ORACLE = 1 ]; then
echo -e "${YELLOW} testing oracle${NC}"
STRATEGY=batch npm run testoracle
STRATEGY=batch npm run testoracle-paging
fi
if [ $PG = 1 ]; then
echo -e "${YELLOW} testing postgres${NC}"
STRATEGY=batch npm run testpg
STRATEGY=batch npm run testpg-paging
STRATEGY=batch MINIFY=1 npm run testpg
STRATEGY=batch MINIFY=1 npm run testpg-paging
fi
echo -e "${BLUE} running with mixture ${NC}"
if [ $SQLITE = 1 ]; then
echo -e "${YELLOW} testing sqlite3${NC}"
STRATEGY=mix npm run testsqlite3
fi
if [ $MYSQL = 1 ]; then
echo -e "${YELLOW} testing mysql${NC}"
STRATEGY=mix npm run testmysql
fi
if [ $ORACLE = 1 ]; then
echo -e "${YELLOW} testing oracle${NC}"
STRATEGY=mix npm run testoracle
STRATEGY=mix npm run testoracle-paging
fi
if [ $PG = 1 ]; then
echo -e "${YELLOW} testing postgres${NC}"
STRATEGY=mix npm run testpg
STRATEGY=mix npm run testpg-paging
STRATEGY=mix MINIFY=1 npm run testpg
STRATEGY=mix MINIFY=1 npm run testpg-paging
fi
echo -e "${GREEN} PASSED ${NC}"