forked from eclipse-ee4j/glassfish
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gftest.sh
executable file
·92 lines (74 loc) · 2.67 KB
/
gftest.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
#
# Copyright (c) 2020 Eclipse Foundation and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0, which is available at
# http://www.eclipse.org/legal/epl-2.0.
#
# This Source Code may also be made available under the following Secondary
# Licenses when the conditions for such availability set forth in the
# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
# version 2 with the GNU Classpath Exception, which is available at
# https://www.gnu.org/software/classpath/license.html.
#
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#
#!/bin/bash -e
export WORKSPACE=`pwd`
export S1AS_HOME="${WORKSPACE}/glassfish7/glassfish"
export APS_HOME="${WORKSPACE}/appserver/tests/appserv-tests"
export TEST_RUN_LOG="${WORKSPACE}/tests-run.log"
export LANG="en_US.UTF-8"
export MVN_REPOSITORY="${MVN_REPOSITORY:=${HOME}/.m2/repository}"
export M2_REPO="${M2_REPO:=$MVN_REPOSITORY}"
export GF_VERSION="$(mvn help:evaluate -f "${WORKSPACE}/pom.xml" -Dexpression=project.version -q -DforceStdout)"
echo WORKSPACE = $WORKSPACE
echo S1AS_HOME = $S1AS_HOME
echo APS_HOME = $APS_HOME
echo TEST_RUN_LOG = $TEST_RUN_LOG
echo M2_REPO=MVN_REPOSITORY = ${M2_REPO}
echo GF_VERSION = ${GF_VERSION}
if [ "$#" -eq 0 ]; then
declare -a arr=(
"web_jsp"
"deployment_all"
"ejb_group_1"
"ejb_group_2"
"ejb_group_3"
"ejb_group_embedded"
"ejb_web_all"
"cdi_all"
"ql_gf_full_profile_all"
"ql_gf_nucleus_all"
"ql_gf_web_profile_all"
"nucleus_admin_all"
"jdbc_all"
"batch_all"
"persistence_all"
"connector_group_1"
"connector_group_2"
"connector_group_3"
"connector_group_4")
printf '\nNo tests specified as command arguments, using default set\n'
else
declare -a arr=("$@")
fi
echo "Removing old glassfish directory: ${S1AS_HOME}";
rm -rf "${S1AS_HOME}";
printf '\n Running tests for: \n\n'
printf '* %s\n' "${arr[@]}"
top_dir="$(pwd)"
printf '\n Running tests from dir %s' "$top_dir"
for i in "${arr[@]}"
do
printf "\n\n\n\n\n ************************************** \n Start Running $i \n ************************************** \n\n\n\n\n\n"
./appserver/tests/gftest.sh run_test ${i}
exit_code=$?
cd $top_dir
printf "\n\n\n\n\n ************************************** \n Finished Running $i \n ************************************** \n\n\n\n\n\n"
printf 'Back at %s\n' "$(pwd)"
if [ "$exit_code" -ne "0" ]; then
printf "\n\n\n\n EXITING BECAUSE OF FAILURES. SEE ABOVE! \n\n\n\n"
exit $exit_code
fi
done