-
Notifications
You must be signed in to change notification settings - Fork 2
/
run-tck.sh
executable file
·91 lines (68 loc) · 2.76 KB
/
run-tck.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
#!/bin/bash
set -x
err_report() {
echo "Error on line $1"
exit 1
}
trap 'err_report $LINENO' ERR
BATCH_TCK_VER=${SET_BATCH_TCK_VER:-2.1.1}
wget https://download.eclipse.org/jakartaee/batch/2.1/jakarta.batch.official.tck-${BATCH_TCK_VER}.zip
unzip jakarta.batch.official.tck-${BATCH_TCK_VER}.zip
git clone --depth 1 https://github.com/jberet/jberet-tck-porting.git
pushd jberet-tck-porting
mvn install -DskipTests
popd
git clone --depth 1 https://github.com/jberet/jsr352.git
pushd jsr352
mvn install -DskipTests
jberet_ver=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
popd
export BATCH_TCK_DIR=$(pwd)/jakarta.batch.official.tck-${BATCH_TCK_VER}
export JBERET_PORTING_DIR=$(pwd)/jberet-tck-porting
WFLY_VER=$(curl --silent -qI https://github.com/wildfly/wildfly/releases/latest | grep '^location.*' | tr -d '\r')
WFLY_VER=${WFLY_VER##*/}
wget https://github.com/wildfly/wildfly/releases/download/${WFLY_VER}/wildfly-${WFLY_VER}.zip
unzip wildfly-${WFLY_VER}.zip
export JBOSS_HOME=$(pwd)/wildfly-${WFLY_VER}
cp $JBERET_PORTING_DIR/target/jberet-tck-porting.jar $JBOSS_HOME/standalone/deployments/
cp $JBERET_PORTING_DIR/src/main/resources/runners/sigtest/pom-parent-param.xml $BATCH_TCK_DIR/runners/sigtest/pom.xml
cp $JBERET_PORTING_DIR/src/main/resources/runners/se-classpath/pom-parent-param.xml $BATCH_TCK_DIR/runners/se-classpath/pom.xml
cp $JBERET_PORTING_DIR/src/main/resources/runners/platform-arquillian/pom-parent-param.xml $BATCH_TCK_DIR/runners/platform-arquillian/pom.xml
cp $JBERET_PORTING_DIR/src/main/resources/runners/platform-arquillian/src/test/resources/arquillian.xml $BATCH_TCK_DIR/runners/platform-arquillian/src/test/resources/arquillian.xml
sed -ie "s/BATCH_PARENT_VER/${BATCH_TCK_VER}/g" $BATCH_TCK_DIR/runners/sigtest/pom.xml
sed -ie "s/BATCH_PARENT_VER/${BATCH_TCK_VER}/g" $BATCH_TCK_DIR/runners/se-classpath/pom.xml
sed -ie "s/BATCH_PARENT_VER/${BATCH_TCK_VER}/g" $BATCH_TCK_DIR/runners/platform-arquillian/pom.xml
# Run sigtest
pushd $BATCH_TCK_DIR/runners/sigtest
mvn install -Dversion.org.jberet.jberet-core=${jberet_ver}
popd
# Run SE tests
pushd $BATCH_TCK_DIR/runners/se-classpath
mvn install -Dversion.org.jberet.jberet-core=${jberet_ver}
popd
# Run integration tests
# start WildFly server
pushd $JBOSS_HOME/bin
./standalone.sh &
sleep 10
NUM=0
while true
do
NUM=$[$NUM + 1]
if (("$NUM" > "6")); then
echo "Application server failed to start up!"
exit 1
fi
if ./jboss-cli.sh --connect command=':read-attribute(name=server-state)' | grep running; then
echo "server is running"
break
fi
echo "server is not yet running"
sleep 10
done
popd
pushd $BATCH_TCK_DIR/runners/platform-arquillian
mvn install
popd
# stop WildFly server
$JBOSS_HOME/bin/jboss-cli.sh --connect --commands="undeploy jberet-tck-porting.jar, shutdown"