forked from infinispan/infinispan-simple-tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testAll.sh
executable file
·88 lines (76 loc) · 2.04 KB
/
testAll.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
#!/usr/bin/env bash
#npm and docker are mandatory
function runTestAndExitOnError {
cd $1
if [ $2 ]; then
CMD="mvn package exec:exec@$2"
else
CMD="mvn package exec:exec"
fi
$CMD
rc=$?
if [[ $rc -ne 0 ]] ; then
echo 'tests failing on' $1 ; exit $rc
else
cd ..
fi
}
if [ $1 ]; then
echo "skip building"
else
echo "Building ..."
mvn clean install
rc=$?
if [[ $rc -ne 0 ]] ; then
echo 'project does not compile'; exit $rc
fi
fi
runTestAndExitOnError clusterexec
runTestAndExitOnError distexec
runTestAndExitOnError distributed
runTestAndExitOnError functional
runTestAndExitOnError jcache
runTestAndExitOnError listen
runTestAndExitOnError map
runTestAndExitOnError query
runTestAndExitOnError replicated
runTestAndExitOnError streams
runTestAndExitOnError spring spring-caching
runTestAndExitOnError spring spring-annotations
runTestAndExitOnError tx
runTestAndExitOnError counter
runTestAndExitOnError multimap
runTestAndExitOnError lock
cd hibernate-cache
runTestAndExitOnError local
runTestAndExitOnError spring-local
cd ..
read -p "Start Infinispan Server, press any key when ready..."
# tests below need infinispan server in local 127.0.0.1
runTestAndExitOnError remote
runTestAndExitOnError remote-listen
runTestAndExitOnError remote-tx
runTestAndExitOnError remote-counter
runTestAndExitOnError remote-query
runTestAndExitOnError remote-continuous-query
runTestAndExitOnError remote-multimap
runTestAndExitOnError scripting
cd server-tasks
mvn clean package wildfly:deploy
cd ..
runTestAndExitOnError server-tasks
# npm should be installed
echo "NPM should be installed"
cd javascript
npm install
node index.js
cd ..
read -p "Stop Infinispan Server, start Wildfly and press any key..."
# tests below need wildfly in local 127.0.0.1
cd hibernate-cache/wildfly-local
mvn clean package wildfly:deploy
for i in {1..15}; do curl http://localhost:8080/wildfly-local/infinispan/hibernate-cache/$i; done
cd ../..
# test below needs docker !
echo "Docker should be installed"
runTestAndExitOnError spark