Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 1 | #!/bin/bash -ex |
| 2 | # |
| 3 | # Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved. |
| 4 | # |
| 5 | # This program and the accompanying materials are made available under the |
| 6 | # terms of the Eclipse Public License v. 2.0, which is available at |
| 7 | # http://www.eclipse.org/legal/epl-2.0. |
| 8 | # |
| 9 | # This Source Code may also be made available under the following Secondary |
| 10 | # Licenses when the conditions for such availability set forth in the |
| 11 | # Eclipse Public License v. 2.0 are satisfied: GNU General Public License, |
| 12 | # version 2 with the GNU Classpath Exception, which is available at |
| 13 | # https://www.gnu.org/software/classpath/license.html. |
| 14 | # |
| 15 | # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
| 16 | # |
| 17 | |
| 18 | list_test_ids(){ |
| 19 | echo jms_all |
| 20 | } |
| 21 | |
| 22 | test_run(){ |
| 23 | cd $APS_HOME/devtests/jms |
| 24 | ant $TARGET | tee $TEST_RUN_LOG |
| 25 | } |
| 26 | |
| 27 | |
| 28 | run_test_id(){ |
| 29 | |
| 30 | source `dirname $0`/../../../common_test.sh |
| 31 | kill_process |
| 32 | delete_gf |
| 33 | download_test_resources glassfish.zip version-info.txt |
| 34 | unzip_test_resources $WORKSPACE/bundles/glassfish.zip |
| 35 | cd `dirname $0` |
| 36 | test_init |
| 37 | get_test_target $1 |
| 38 | |
| 39 | |
| 40 | test_run |
| 41 | |
| 42 | check_successful_run |
| 43 | generate_junit_report $1 |
| 44 | change_junit_report_class_names |
| 45 | copy_test_artifects |
| 46 | upload_test_results |
| 47 | delete_bundle |
| 48 | cd - |
| 49 | } |
| 50 | |
| 51 | get_test_target(){ |
| 52 | case $1 in |
| 53 | jms_all ) |
| 54 | TARGET=all |
| 55 | export TARGET;; |
| 56 | esac |
| 57 | |
| 58 | } |
| 59 | |
| 60 | OPT=$1 |
| 61 | TEST_ID=$2 |
| 62 | case $OPT in |
| 63 | list_test_ids ) |
| 64 | list_test_ids;; |
| 65 | run_test_id ) |
| 66 | run_test_id $TEST_ID ;; |
| 67 | esac |