blob: 66fef1a1c902a3b35ee25d4ef2384b26a25db59a [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=(
31 "deployment_all"
32 "ejb_group_1"
33 "ejb_group_2"
34 "ejb_group_3"
35 "ejb_web_all"
36 "cdi_all"
37 "ql_gf_full_profile_all"
38 "ql_gf_nucleus_all"
39 "ql_gf_web_profile_all"
40 "nucleus_admin_all"
41 "jdbc_all"
42 "batch_all"
43 "persistence_all"
44 "connector_group_1"
45 "connector_group_2"
46 "connector_group_3"
47 "connector_group_4")
48 printf '\nNo tests specified as command arguments, using default set\n'
49else
50 declare -a arr=("$@")
51fi
52
53printf '\n Running tests for: \n\n'
54printf '* %s\n' "${arr[@]}"
55
56top_dir="$(pwd)"
57
58printf '\n Running tests from dir %s' "$top_dir"
59
60for i in "${arr[@]}"
61do
62
63 printf "\n\n\n\n\n ************************************** \n Start Running $i \n ************************************** \n\n\n\n\n\n"
64
65 ./appserver/tests/gftest.sh run_test ${i}
66
67 exit_code=$?
68
69 cd $top_dir
70
71 printf "\n\n\n\n\n ************************************** \n Finished Running $i \n ************************************** \n\n\n\n\n\n"
72
73 printf 'Back at %s\n' "$(pwd)"
74
75 if [ "$exit_code" -ne "0" ]; then
76 printf "\n\n\n\n EXITING BECAUSE OF FAILURES. SEE ABOVE! \n\n\n\n"
77 exit $exit_code
78 fi
79done
80
81