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=( |
| 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' |
| 49 | else |
| 50 | declare -a arr=("$@") |
| 51 | fi |
| 52 | |
| 53 | printf '\n Running tests for: \n\n' |
| 54 | printf '* %s\n' "${arr[@]}" |
| 55 | |
| 56 | top_dir="$(pwd)" |
| 57 | |
| 58 | printf '\n Running tests from dir %s' "$top_dir" |
| 59 | |
| 60 | for i in "${arr[@]}" |
| 61 | do |
| 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 |
| 79 | done |
| 80 | |
| 81 | |