blob: f6ef32c10e92988edb788b35a8a0183d0756c0d1 [file] [log] [blame]
arjantijms79b293d2020-06-09 15:17:29 +02001#
arjantijms093ed972020-06-09 18:24:34 +02002# Copyright (c) 2020 Eclipse Foundation and/or its affiliates. All rights reserved.
arjantijms79b293d2020-06-09 15:17:29 +02003#
arjantijms093ed972020-06-09 18:24:34 +02004# This program and the accompanying materials are made available under the
5# terms of the Eclipse Public License v. 2.0, which is available at
6# http://www.eclipse.org/legal/epl-2.0.
arjantijms79b293d2020-06-09 15:17:29 +02007#
arjantijms093ed972020-06-09 18:24:34 +02008# This Source Code may also be made available under the following Secondary
9# Licenses when the conditions for such availability set forth in the
10# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
11# version 2 with the GNU Classpath Exception, which is available at
12# https://www.gnu.org/software/classpath/license.html.
arjantijms79b293d2020-06-09 15:17:29 +020013#
arjantijms093ed972020-06-09 18:24:34 +020014# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
arjantijms79b293d2020-06-09 15:17:29 +020015#
16
17#!/bin/bash -e
18
19export WORKSPACE=`pwd`
20export S1AS_HOME="${WORKSPACE}/glassfish6/glassfish"
21export APS_HOME="${WORKSPACE}/appserver/tests/appserv-tests"
22export TEST_RUN_LOG="${WORKSPACE}/tests-run.log"
23
24echo WORKSPACE = $WORKSPACE
25echo S1AS_HOME = $S1AS_HOME
26echo APS_HOME = $APS_HOME
27echo TEST_RUN_LOG = $TEST_RUN_LOG
28
29if [ "$#" -eq 0 ]; then
30 declare -a arr=(
arjantijms87e21012020-06-10 15:07:23 +020031 "web_jsp"
David Matějčekf4dc06a2021-05-17 12:10:57 +020032 "deployment_all"
33 "ejb_group_1"
34 "ejb_group_2"
35 "ejb_group_3"
36 "ejb_web_all"
37 "cdi_all"
38 "ql_gf_full_profile_all"
39 "ql_gf_nucleus_all"
arjantijms79b293d2020-06-09 15:17:29 +020040 "ql_gf_web_profile_all"
41 "nucleus_admin_all"
42 "jdbc_all"
43 "batch_all"
44 "persistence_all"
45 "connector_group_1"
46 "connector_group_2"
47 "connector_group_3"
48 "connector_group_4")
49 printf '\nNo tests specified as command arguments, using default set\n'
50else
51 declare -a arr=("$@")
52fi
53
54printf '\n Running tests for: \n\n'
55printf '* %s\n' "${arr[@]}"
56
57top_dir="$(pwd)"
58
59printf '\n Running tests from dir %s' "$top_dir"
60
61for i in "${arr[@]}"
62do
63
64 printf "\n\n\n\n\n ************************************** \n Start Running $i \n ************************************** \n\n\n\n\n\n"
David Matějčekf4dc06a2021-05-17 12:10:57 +020065
arjantijms79b293d2020-06-09 15:17:29 +020066 ./appserver/tests/gftest.sh run_test ${i}
67
68 exit_code=$?
69
70 cd $top_dir
71
72 printf "\n\n\n\n\n ************************************** \n Finished Running $i \n ************************************** \n\n\n\n\n\n"
73
74 printf 'Back at %s\n' "$(pwd)"
75
76 if [ "$exit_code" -ne "0" ]; then
77 printf "\n\n\n\n EXITING BECAUSE OF FAILURES. SEE ABOVE! \n\n\n\n"
78 exit $exit_code
79 fi
80done
81
82