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

Commit 96e47b5

Browse files
authored
Merge pull request #89 from travis1111/build-test-bundles
Build openapi eclipse plugin junit test bundles
2 parents ad4684a + 400714c commit 96e47b5

19 files changed

Lines changed: 724 additions & 14 deletions

File tree

dev/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM sgrio/java:jre_8_ubuntu
2+
WORKDIR /home
3+
RUN apt-get update
4+
RUN apt-get install -y net-tools
5+
RUN apt-get install -y telnet
6+
RUN apt-get install -y wget xvfb unzip libgtk-3-dev
7+
# Set locale
8+
RUN apt-get clean && apt-get update && apt-get install -y locales
9+
RUN locale-gen en_US.UTF-8
10+
ENV LANG en_US.UTF-8
11+
ENV LANGUAGE en_US:en
12+
ENV LC_ALL en_US.UTF-8
13+
RUN wget http://www.eclipse.org/external/technology/epp/downloads/release/2019-09/R/eclipse-jee-2019-09-R-linux-gtk-x86_64.tar.gz
14+
RUN tar xzf eclipse-jee-2019-09-R-linux-gtk-x86_64.tar.gz
15+
ADD run.sh /home
16+
ADD runTest.sh /home
17+
RUN chmod 755 /home/run.sh
18+
RUN chmod 755 /home/runTest.sh
19+
20+
CMD ./run.sh

dev/ant_build/build-cw.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<antcall target="cw_imports.generateCWSuppliersUpdateSiteRestore"/>
6161

6262
<antcall target="cw_imports.generateCWUpdateSite"/>
63-
63+
<antcall target="cw_test_imports.generateCWTestUpdateSite"/>
6464
<echo message="Delete tools.image"/>
6565
<delete dir="${cw_build.basedir}/tools.image" failonerror="false"/>
6666
</target>

dev/ant_build/cw_test_imports.xml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,31 +73,36 @@
7373
</copy>
7474

7575
<!-- Copy build result content -->
76+
<echo message="Copy to ${sourceDir}" />
7677
<copy todir="${sourceDir}/features" overwrite="true" verbose="true">
77-
<fileset dir="${local.workspace}/tools.image/test/features">
78+
<fileset dir="${local.workspace}/tools.image/update_testplugins/features">
7879
<include name="**/*.jar"/>
7980
</fileset>
8081
</copy>
8182

8283
<copy todir="${sourceDir}/plugins" overwrite="true" verbose="true">
83-
<fileset dir="${local.workspace}/tools.image/test/plugins">
84+
<fileset dir="${local.workspace}/tools.image/update_testplugins/plugins">
8485
<include name="**/*.jar"/>
8586
</fileset>
8687
</copy>
8788

8889
<!-- Step 1 -->
90+
<echo message="sourceDir: ${sourceDir}" />
91+
<echo message="tempDir: ${tempDir}" />
92+
<echo message="updateSiteDir: ${updateSiteDir}" />
93+
<echo message="updateSiteDirFull: ${updateSiteDirFull}" />
8994
<!-- Create site.xml with top level feature(s) -->
9095
<generateUpdateSite
9196
tempDir="${tempDir}"
9297
sourceDir="${sourceDir}"
9398
outputDir="${updateSiteDir}"
94-
addIncludedFeatures="false">
99+
addIncludedFeatures="true">
95100

96101
<!-- Add Main feature here -->
97-
<category name="OpenAPI Tools"
102+
<category name="OpenAPI Tools Test"
98103
label="Codewind V${version} Unit Tests"
99104
description="Codewind V${version} Unit Tests">
100-
<feature id="org.eclipse.codewind.openapi.test" />
105+
<feature id="org.eclipse.codewind.openapi.feature.test" />
101106
</category>
102107
</generateUpdateSite>
103108

@@ -110,7 +115,7 @@
110115
addIncludedFeatures="true">
111116

112117
<!-- Add Main feature here -->
113-
<feature id="org.eclipse.codewind.openapi.test" />
118+
<feature id="org.eclipse.codewind.openapi.feature.test" />
114119
</generateUpdateSite>
115120

116121
<!-- Step 3 -->

dev/buildAll.gradle

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,14 @@ def openApiCliFile = file(projDir + project.properties['codewind.core.prereqlib.
7878

7979
def filePrefix = "codewind-openapi-eclipse"
8080

81+
def swtBotEclipseFinderFile = file(projDir + project.properties['eclipse.target.platform.ies.folder'] + '/eclipse/dropins/plugins/org.eclipse.swtbot.eclipse.finder_2.8.0.201906121535.jar')
82+
def swtBotJunitFile = file(projDir + project.properties['eclipse.target.platform.ies.folder'] + '/eclipse/dropins/plugins/org.eclipse.swtbot.junit4_x_2.8.0.201906121535.jar')
83+
def swtBotSwtFile = file(projDir + project.properties['eclipse.target.platform.ies.folder'] + '/eclipse/dropins/plugins/org.eclipse.swtbot.swt.finder_2.8.0.201906121535.jar')
8184

82-
// Download dependent plugins from maven repository for 'org.eclipse.codewind.core'
85+
86+
87+
88+
// Download dependent plugins from maven repository for 'org.eclipse.codewind.openapi.core'
8389
task getCoreDependencies(type: Copy) {
8490

8591
if (!corelibFolder.exists()) {
@@ -107,6 +113,26 @@ task downloadOpenApiCli(type: Download) {
107113
target = openApiCliFile
108114
}
109115

116+
task downloadSWTBotEclipseFinderJar(type: Download) {
117+
println("Downloading SWTBot Eclipse Finder jar")
118+
sourceUrl='http://download.eclipse.org/technology/swtbot/releases/latest/plugins/org.eclipse.swtbot.eclipse.finder_2.8.0.201906121535.jar'
119+
target=swtBotEclipseFinderFile
120+
}
121+
122+
task downloadSWTBotJunitJar(type: Download) {
123+
println("Downloading SWTBot Junit jar")
124+
sourceUrl='http://download.eclipse.org/technology/swtbot/releases/latest/plugins/org.eclipse.swtbot.junit4_x_2.8.0.201906121535.jar'
125+
target=swtBotJunitFile
126+
}
127+
128+
task downloadSWTBotSwtJar(type: Download) {
129+
println("Downloading SWTBot SWT jar")
130+
sourceUrl='http://download.eclipse.org/technology/swtbot/releases/latest/plugins/org.eclipse.swtbot.swt.finder_2.8.0.201906121535.jar'
131+
target=swtBotSwtFile
132+
}
133+
134+
135+
110136
class Download extends DefaultTask {
111137
@Input
112138
String sourceUrl
@@ -220,6 +246,11 @@ preparePrereqsIvy.dependsOn importAnt
220246
compile.dependsOn preparePrereqsIvy
221247
compile.dependsOn downloadEclipseSDK
222248
compile.dependsOn downloadEclipseTargetPlatform
249+
compile.dependsOn downloadSWTBotEclipseFinderJar
250+
compile.dependsOn downloadSWTBotJunitJar
251+
compile.dependsOn downloadSWTBotSwtJar
252+
253+
223254

224255
//// build version from the artifacts to avoid version mismatch
225256
import static groovy.io.FileType.FILES
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
bin.includes = feature.xml,\
2+
category.xml,\
3+
feature.properties, \
4+
license.html
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!--
2+
Copyright (c) 2019 IBM Corporation and others.
3+
All rights reserved. This program and the accompanying materials
4+
are made available under the terms of the Eclipse Public License v2.0
5+
which accompanies this distribution, and is available at
6+
http://www.eclipse.org/legal/epl-v20.html
7+
8+
Contributors:
9+
IBM Corporation - initial API and implementation
10+
-->
11+
12+
<project name="org.eclipse.codewind.openapi.feature.test" default="build">
13+
<property name="image.write.dir" value="update_testplugins/features"/>
14+
<import file="../ant_build/public_imports/internal_imports/feature_build.xml"/>
15+
</project>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<site>
3+
<feature url="features/org.eclipse.codewind.openapi.feature.test_0.7.0.qualifier.jar" id="org.eclipse.codewind.openapi.feature.test" version="0.5.0.qualifier">
4+
<category name="org.eclipse.codewind.openapi.category.test"/>
5+
</feature>
6+
<category-def name="org.eclipse.codewind.openapi.category.test" label="OpenAPI Tools Test"/>
7+
</site>

0 commit comments

Comments
 (0)