arjantijms | 79b293d | 2020-06-09 15:17:29 +0200 | [diff] [blame] | 1 | # |
arjantijms | 093ed97 | 2020-06-09 18:24:34 +0200 | [diff] [blame] | 2 | # Copyright (c) 2020 Eclipse Foundation and/or its affiliates. All rights reserved. |
arjantijms | 79b293d | 2020-06-09 15:17:29 +0200 | [diff] [blame] | 3 | # |
arjantijms | 093ed97 | 2020-06-09 18:24:34 +0200 | [diff] [blame] | 4 | # 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. |
arjantijms | 79b293d | 2020-06-09 15:17:29 +0200 | [diff] [blame] | 7 | # |
arjantijms | 093ed97 | 2020-06-09 18:24:34 +0200 | [diff] [blame] | 8 | # 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. |
arjantijms | 79b293d | 2020-06-09 15:17:29 +0200 | [diff] [blame] | 13 | # |
arjantijms | 093ed97 | 2020-06-09 18:24:34 +0200 | [diff] [blame] | 14 | # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
arjantijms | 79b293d | 2020-06-09 15:17:29 +0200 | [diff] [blame] | 15 | # |
| 16 | |
| 17 | #!/bin/bash -e |
| 18 | |
| 19 | export WORKSPACE=`pwd` |
| 20 | export S1AS_HOME="${WORKSPACE}/glassfish6/glassfish" |
| 21 | export APS_HOME="${WORKSPACE}/appserver/tests/appserv-tests" |
| 22 | export TEST_RUN_LOG="${WORKSPACE}/tests-run.log" |
| 23 | |
| 24 | echo WORKSPACE = $WORKSPACE |
| 25 | echo S1AS_HOME = $S1AS_HOME |
| 26 | echo APS_HOME = $APS_HOME |
| 27 | echo TEST_RUN_LOG = $TEST_RUN_LOG |
| 28 | |
| 29 | if [ "$#" -eq 0 ]; then |
| 30 | declare -a arr=( |
arjantijms | 87e2101 | 2020-06-10 15:07:23 +0200 | [diff] [blame] | 31 | "web_jsp" |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame] | 32 | "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" |
arjantijms | 79b293d | 2020-06-09 15:17:29 +0200 | [diff] [blame] | 40 | "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' |
| 50 | else |
| 51 | declare -a arr=("$@") |
| 52 | fi |
| 53 | |
| 54 | printf '\n Running tests for: \n\n' |
| 55 | printf '* %s\n' "${arr[@]}" |
| 56 | |
| 57 | top_dir="$(pwd)" |
| 58 | |
| 59 | printf '\n Running tests from dir %s' "$top_dir" |
| 60 | |
| 61 | for i in "${arr[@]}" |
| 62 | do |
| 63 | |
| 64 | printf "\n\n\n\n\n ************************************** \n Start Running $i \n ************************************** \n\n\n\n\n\n" |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame] | 65 | |
arjantijms | 79b293d | 2020-06-09 15:17:29 +0200 | [diff] [blame] | 66 | ./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 |
| 80 | done |
| 81 | |
| 82 | |