-
Notifications
You must be signed in to change notification settings - Fork 19
/
tests.sh
executable file
·135 lines (105 loc) · 4.33 KB
/
tests.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#!/usr/bin/env bash
set -euo pipefail
GLASSFISH_URL="http://download.eclipse.org/glassfish/web-5.1.0.zip"
WILDFLY_URL="https://download.jboss.org/wildfly/19.1.0.Final/wildfly-19.1.0.Final.zip"
#BUILD_PROFILE=""
BUILD_PROFILE="-Pstaging"
if [ "${1}" == "glassfish-bundled" ]; then
curl -L -s -o glassfish5.zip "${GLASSFISH_URL}"
unzip -q glassfish5.zip
mvn -B -V -Pbundled clean install ${BUILD_PROFILE}
find ./examples/ -name \*.war -exec cp {} ./glassfish5/glassfish/domains/domain1/autodeploy/ \;
glassfish5/bin/asadmin start-domain
sleep 120
mvn -Pintegration -Dintegration.serverPort=8080 verify ${BUILD_PROFILE}
glassfish5/bin/asadmin stop-domain
elif [ "${1}" == "glassfish-module" ]; then
curl -L -s -o glassfish5.zip "${GLASSFISH_URL}"
unzip -q glassfish5.zip
mvn -B -V -P\!bundled,module clean install ${BUILD_PROFILE}
cp core/target/krazo-core-*.jar ./glassfish5/glassfish/modules/
cp jersey/target/krazo-jersey-*.jar ./glassfish5/glassfish/modules/
cp ~/.m2/repository/jakarta.mvc/jakarta.mvc-api/1.0.0/*.jar ./glassfish5/glassfish/modules/
find ./examples/ -name \*.war -exec cp {} ./glassfish5/glassfish/domains/domain1/autodeploy/ \;
glassfish5/bin/asadmin start-domain
sleep 120
mvn -Pintegration -Dintegration.serverPort=8080 verify ${BUILD_PROFILE}
glassfish5/bin/asadmin stop-domain
elif [[ ${1} == tck-glassfish51-* ]]; then
echo "Downloading Glassfish..."
curl -L -s -o glassfish5.zip "${GLASSFISH_URL}"
unzip -q glassfish5.zip
if [[ ${1} == *-patched ]]; then
echo "Patching Glassfish..."
curl -L -s -o glassfish5/glassfish/modules/jersey-cdi1x.jar \
"https://www.dropbox.com/s/wc2ukjns388lwir/jersey-cdi1x-2.28-fix1.jar"
curl -L -s -o glassfish5/glassfish/modules/jersey-common.jar \
"https://www.dropbox.com/s/qgms27wxlpxw74x/jersey-common-2.28-fix1.jar"
fi
echo "Building Krazo..."
mvn -B -V -DskipTests clean install ${BUILD_PROFILE}
echo "Starting Glassfish..."
glassfish5/bin/asadmin start-domain
sleep 30
echo "Running TCK..."
pushd tck
mvn -B -V -Dtck-env=glassfish verify ${BUILD_PROFILE}
popd
echo "Stopping Glassfish..."
glassfish5/bin/asadmin stop-domain
elif [[ ${1} == tck-wildfly19* ]]; then
echo "Downloading Wildfly..."
curl -L -s -o wildfly-19.1.0.Final.zip $WILDFLY_URL
unzip wildfly-19.1.0.Final.zip
mv wildfly-19.1.0.Final wildfly
echo "Building Krazo..."
mvn -B -V -DskipTests clean install ${BUILD_PROFILE}
echo "Starting Wildfly..."
LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=wildfly.pid ./wildfly/bin/standalone.sh > wildfly.log 2>&1 &
sleep 30
echo "Running TCK..."
pushd tck
mvn -B -V -Dtck-env=wildfly verify ${BUILD_PROFILE}
popd
echo "Stopping Wildfly..."
kill "$(cat wildfly.pid)"
elif [[ ${1} == tck-wildfly22* ]]; then
source .travis/start-wildfly.sh
mvn -B -V -DskipTests clean install ${BUILD_PROFILE}
pushd tck
mvn -B -V -Dtck-env=wildfly verify ${BUILD_PROFILE}
popd
#elif [ "${1}" == "tck-liberty" ]; then
#
# source .travis/install-liberty.sh
# mvn -B -V -DskipTests clean install ${BUILD_PROFILE}
# pushd tck
# mvn -B -V -Dtck-env=liberty -Dliberty.home=${LIBERTY_HOME} verify ${BUILD_PROFILE}
# popd
elif [[ ${1} == testsuite-wildfly ]]; then
source .travis/start-wildfly.sh
mvn -B -V -DskipTests clean install ${BUILD_PROFILE}
mvn -P${TYPE} --projects testsuite clean verify ${BUILD_PROFILE}
elif [[ ${1} == testsuite-payara ]]; then
source .travis/docker-payara.sh
echo "Building Krazo..."
mvn -B -V -DskipTests clean install ${BUILD_PROFILE}
echo "Running test suite on Payara"
mvn -P${TYPE} --projects testsuite clean verify ${BUILD_PROFILE}
# elif [[ ${1} == testsuite-liberty ]]; then
#
# source .travis/install-liberty.sh && mvn -P${TYPE} -Dliberty.home=${LIBERTY_HOME} --projects testsuite clean verify ${BUILD_PROFILE}
# echo "Building Krazo..."
# mvn -B -V -DskipTests clean install ${BUILD_PROFILE}
# echo "Running test suite on Liberty"
# mvn -P${TYPE} -Dliberty.home=${LIBERTY_HOME} --projects testsuite clean verify ${BUILD_PROFILE}
elif [[ ${1} == testsuite-glassfish ]]; then
source .travis/start-glassfish.sh
echo "Building Krazo..."
mvn -B -V -DskipTests clean install ${BUILD_PROFILE}
echo "Running test suite on Glassfish"
mvn -P${TYPE} --projects testsuite clean verify ${BUILD_PROFILE}
else
echo "Unknown test type: $1"
exit 1;
fi