Skip to content
This repository was archived by the owner on Nov 15, 2022. It is now read-only.

Commit 0958f5e

Browse files
SAMEER PANDITarindam-bandyopadhyay
authored andcommitted
add maven-embedded-glassfish-plugin test (#21730)
* add maven-embedded-glassfish-plugin test
1 parent 5f02589 commit 0958f5e

File tree

3 files changed

+113
-1
lines changed

3 files changed

+113
-1
lines changed

main/appserver/tests/embedded/maven-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190
<plugin>
191191
<groupId>org.glassfish.embedded</groupId>
192192
<artifactId>maven-embedded-glassfish-plugin</artifactId>
193-
<version>${project.version}</version>
193+
<version>4.1.1</version>
194194
<configuration>
195195
<goalPrefix>glassfish</goalPrefix>
196196
<app>target/${project.artifactId}.war</app>
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
#!/bin/bash -ex
2+
#
3+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4+
#
5+
# Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
6+
#
7+
# The contents of this file are subject to the terms of either the GNU
8+
# General Public License Version 2 only ("GPL") or the Common Development
9+
# and Distribution License("CDDL") (collectively, the "License"). You
10+
# may not use this file except in compliance with the License. You can
11+
# obtain a copy of the License at
12+
# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
13+
# or packager/legal/LICENSE.txt. See the License for the specific
14+
# language governing permissions and limitations under the License.
15+
#
16+
# When distributing the software, include this License Header Notice in each
17+
# file and include the License file at packager/legal/LICENSE.txt.
18+
#
19+
# GPL Classpath Exception:
20+
# Oracle designates this particular file as subject to the "Classpath"
21+
# exception as provided by Oracle in the GPL Version 2 section of the License
22+
# file that accompanied this code.
23+
#
24+
# Modifications:
25+
# If applicable, add the following below the License Header, with the fields
26+
# enclosed by brackets [] replaced by your own identifying information:
27+
# "Portions Copyright [year] [name of copyright owner]"
28+
#
29+
# Contributor(s):
30+
# If you wish your version of this file to be governed by only the CDDL or
31+
# only the GPL Version 2, indicate your decision by adding "[Contributor]
32+
# elects to include this software in this distribution under the [CDDL or GPL
33+
# Version 2] license." If you don't indicate a single choice of license, a
34+
# recipient has the option to distribute your version of this file under
35+
# either the CDDL, the GPL Version 2 or to extend the choice of license to
36+
# its licensees as provided above. However, if you add GPL Version 2 code
37+
# and therefore, elected the GPL Version 2 license, then the option applies
38+
# only if the new code is made subject to such option by the copyright
39+
# holder.
40+
test_run_embedded_publisher(){
41+
M2_HOME=/net/gf-hudson/scratch/gf-hudson/export2/hudson/tools/apache-maven-3.0.3
42+
MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=384m"; export MAVEN_OPTS
43+
MAVEN_REPO=$WORKSPACE/repository
44+
MAVEN_SETTINGS=$M2_HOME/settings-nexus.xml
45+
PATH=$M2_HOME/bin:$JAVA_HOME/bin:$PATH; export PATH
46+
mvn -version
47+
echo $WORKSPACE
48+
cd $WORKSPACE/main
49+
mvn -Dmaven.repo.local=$WORKSPACE/repository -DskipTests=true clean install
50+
EMBEDDED_WORKSPACE=$WORKSPACE/main/appserver/extras/embedded
51+
cd $EMBEDDED_WORKSPACE/all
52+
mvn -Dmaven.repo.local=$WORKSPACE/repository -DskipTests=true clean install
53+
cd $EMBEDDED_WORKSPACE/nucleus
54+
mvn -Dmaven.repo.local=$WORKSPACE/repository -DskipTests=true clean install
55+
cd $EMBEDDED_WORKSPACE/web
56+
mvn -Dmaven.repo.local=$WORKSPACE/repository -DskipTests=true clean install
57+
cd $WORKSPACE/main/appserver/tests/embedded/maven-plugin/remoteejbs
58+
mvn -Dmaven.repo.local=$WORKSPACE/repository -DskipTests=true clean verify
59+
cd $WORKSPACE/main/appserver/tests/embedded/maven-plugin/mdb
60+
mvn -Dmaven.repo.local=$WORKSPACE/repository -DskipTests=true clean verify
61+
cd $WORKSPACE/main/appserver/tests/embedded
62+
mvn -Dmaven.repo.local=$WORKSPACE/repository -DskipTests=true clean verify
63+
merge_junits
64+
}
65+
66+
merge_junits(){
67+
TEST_ID="embedded_publisher_all"
68+
rm -rf ${WORKSPACE}/results || true
69+
mkdir -p ${WORKSPACE}/results/junitreports
70+
JUD="${WORKSPACE}/results/junitreports/test_results_junit.xml"
71+
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > ${JUD}
72+
echo "<testsuites>" >> ${JUD}
73+
for i in `find . -type d -name "surefire-reports"`
74+
do
75+
ls -d -1 ${i}/*.xml | xargs cat | ${SED} 's/<?xml version=\"1.0\" encoding=\"UTF-8\" *?>//g' >> ${JUD}
76+
done
77+
echo "</testsuites>" >> ${JUD}
78+
${SED} -i 's/\([a-zA-Z-]\w*\)\./\1-/g' ${JUD}
79+
${SED} -i "s/\bclassname=\"/classname=\"${TEST_ID}./g" ${JUD}
80+
}
81+
82+
run_test_id(){
83+
source `dirname $0`/../common_test.sh
84+
kill_process
85+
rm main.zip rm version-info.txt || true
86+
download_test_resources main.zip version-info.txt
87+
rm -rf main || true
88+
unzip_test_resources $WORKSPACE/bundles/main.zip
89+
case ${TEST_ID} in
90+
embedded_publisher_all)
91+
test_run_embedded_publisher;;
92+
esac
93+
upload_test_results
94+
delete_bundle
95+
96+
}
97+
98+
99+
list_test_ids(){
100+
echo embedded_publisher_all
101+
}
102+
103+
OPT=$1
104+
TEST_ID=$2
105+
106+
case $OPT in
107+
list_test_ids )
108+
list_test_ids;;
109+
run_test_id )
110+
run_test_id $TEST_ID ;;
111+
esac

main/appserver/tests/test_groups/gating

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ nucleus_admin_all
1717
cts_smoke_all
1818
servlet_tck_all
1919
findbugs_all
20+
embedded_publisher_all

0 commit comments

Comments
 (0)