|
17 | 17 | name="Publish Build" |
18 | 18 | default="generateIndex"> |
19 | 19 |
|
20 | | - <target name="generateIndex" |
| 20 | + <target name="generateIndex" |
21 | 21 | depends="initResultsVariables"> |
22 | 22 |
|
23 | | - <property |
| 23 | + <property |
24 | 24 | name="class" |
25 | 25 | value="org.eclipse.releng.generators.TestResultsGenerator" /> |
26 | | - <taskdef |
27 | | - name="indexResults" |
28 | | - classname="${class}" /> |
29 | | - |
30 | | - <echo message=" = = properties in publish.xml == " /> |
31 | | - <echo message=" job: ${job}" /> |
32 | | - <echo message=" isBuildTested: ${isBuildTested}" /> |
33 | | - <echo message=" buildType: ${buildType}" /> |
34 | | - <echo message=" dropTokenList: ${dropTokenList}" /> |
35 | | - <echo message=" indexFileName: ${indexFileName}" /> |
36 | | - <echo message=" xmlDirectoryName: ${xmlDirectoryName}" /> |
37 | | - <echo message=" dropDirectoryName: ${buildDirectory}" /> |
38 | | - <echo message=" dropTemplateFileName: ${dropTemplateFileName}" /> |
39 | | - <echo message=" testResultsHtmlFileName: ${testResultsHtmlFileName}" /> |
40 | | - <echo message=" hrefTestResultsTargetPath: ${hrefTestResultsTargetPath}" /> |
41 | | - <echo message=" hrefCompileLogsTargetPath: ${hrefCompileLogsTargetPath}" /> |
42 | | - <echo message=" compileLogsDirectoryName: ${compileLogsDirectoryName}" /> |
43 | | - <echo message=" testManifestFileName: ${manifestFile}" /> |
44 | | - <echo message=" testsConfigExpected: ${testsConfigExpected}" /> |
45 | | - <echo message=" expectedConfigFilename: ${expectedConfigFilename}" /> |
46 | | - <echo message=" foundConfigFilename: ${foundConfigFilename}" /> |
47 | | - <echo message=" doMissingListValue: ${doMissingListValue}" /> |
48 | | - <indexResults |
| 26 | + <taskdef name="indexResults" classname="${class}" /> |
| 27 | + |
| 28 | + <echo message=" = = properties in publish.xml == " /> |
| 29 | + <echo message=" job: ${job}" /> |
| 30 | + <echo message=" isBuildTested: ${isBuildTested}" /> |
| 31 | + <echo message=" buildType: ${buildType}" /> |
| 32 | + <echo message=" dropTokenList: ${dropTokenList}" /> |
| 33 | + <echo message=" indexFileName: ${indexFileName}" /> |
| 34 | + <echo message=" xmlDirectoryName: ${xmlDirectoryName}" /> |
| 35 | + <echo message=" dropDirectoryName: ${buildDirectory}" /> |
| 36 | + <echo message=" dropTemplateFileName: ${dropTemplateFileName}" /> |
| 37 | + <echo message=" testResultsHtmlFileName: ${testResultsHtmlFileName}" /> |
| 38 | + <echo message=" hrefTestResultsTargetPath: ${hrefTestResultsTargetPath}" /> |
| 39 | + <echo message=" hrefCompileLogsTargetPath: ${hrefCompileLogsTargetPath}" /> |
| 40 | + <echo message=" compileLogsDirectoryName: ${compileLogsDirectoryName}" /> |
| 41 | + <echo message=" testManifestFileName: ${manifestFile}" /> |
| 42 | + <echo message=" testsConfigExpected: ${testsConfigExpected}" /> |
| 43 | + <echo message=" expectedConfigFilename: ${expectedConfigFilename}" /> |
| 44 | + <echo message=" foundConfigFilename: ${foundConfigFilename}" /> |
| 45 | + <echo message=" doMissingListValue: ${doMissingListValue}" /> |
| 46 | + <indexResults |
49 | 47 | isBuildTested="${isBuildTested}" |
50 | 48 | buildType="${buildType}" |
51 | 49 | dropTokenList="${dropTokenList}" |
|
62 | 60 | expectedConfigFilename="${expectedConfigFilename}" |
63 | 61 | foundConfigFilename="${foundConfigFilename}" |
64 | 62 | doMissingList="${doMissingListValue}" /> |
65 | | - </target> |
| 63 | + </target> |
| 64 | + |
| 65 | + <target name="initResultsVariables" depends="init"> |
| 66 | + <fail unless="job" /> |
66 | 67 |
|
67 | | - <target name="initResultsVariables" |
68 | | - depends="init"> |
69 | | - <fail unless="job" /> |
| 68 | + <property name="isBuildTested" value="true" /> |
70 | 69 |
|
71 | | - <property |
72 | | - name="isBuildTested" |
73 | | - value="true" /> |
| 70 | + <loadresource property="buildType"> |
| 71 | + <string value="${buildID}"/> |
| 72 | + <filterchain> |
| 73 | + <tokenfilter> |
| 74 | + <replaceregex pattern="^([IMXYNPSRU])(\d{8})-(\d{4})$" replace="\1"/> |
| 75 | + </tokenfilter> |
| 76 | + </filterchain> |
| 77 | + </loadresource> |
74 | 78 |
|
75 | | - <loadresource property="buildType"> |
76 | | - <string value="${buildID}"/> |
77 | | - <filterchain> |
78 | | - <tokenfilter> |
79 | | - <replaceregex pattern="^([IMXYNPSRU])(\d{8})-(\d{4})$" replace="\1"/> |
80 | | - </tokenfilter> |
81 | | - </filterchain> |
82 | | - </loadresource> |
| 79 | + <property name="dropTokenList" value="%repository%,%sdk%,%tests%,%runtime%,%jdtc%,%swt%" /> |
83 | 80 |
|
84 | | - <property |
85 | | - name="dropTokenList" |
86 | | - value="%repository%,%sdk%,%tests%,%runtime%,%jdtc%,%swt%" /> |
| 81 | + <condition property="indexFileName" value="testResults.php"> |
| 82 | + <contains string="${job}" substring="-unit-" /> |
| 83 | + </condition> |
| 84 | + <!-- else standard default for download page --> |
| 85 | + <property name="indexFileName" value="index.php" /> |
87 | 86 |
|
88 | | - <condition |
89 | | - property="indexFileName" |
90 | | - value="performance/performance.php"> |
91 | | - <contains |
92 | | - string="${job}" |
93 | | - substring="-perf-" /> |
94 | | - </condition> |
95 | | - <condition |
96 | | - property="indexFileName" |
97 | | - value="testResults.php"> |
98 | | - <contains |
99 | | - string="${job}" |
100 | | - substring="-unit-" /> |
101 | | - </condition> |
102 | | - <!-- else standard default for download page --> |
103 | | - <property |
104 | | - name="indexFileName" |
105 | | - value="index.php" /> |
| 87 | + <!-- xml results directory --> |
| 88 | + <property name="xmlDirectoryName" value="${buildDirectory}/testresults/xml" /> |
106 | 89 |
|
107 | | - <!-- xml results directory --> |
108 | | - <condition |
109 | | - property="xmlDirectoryName" |
110 | | - value="${buildDirectory}/performance/xml"> |
111 | | - <contains |
112 | | - string="${job}" |
113 | | - substring="-perf-" /> |
114 | | - </condition> |
115 | | - <!-- else standard default for unit tests --> |
116 | | - <property |
117 | | - name="xmlDirectoryName" |
118 | | - value="${buildDirectory}/testresults/xml" /> |
| 90 | + <condition property="dropTemplateFileName" value="${EBuilderDir}/eclipse/publishingFiles/staticDropFiles/testResults.php"> |
| 91 | + <contains string="${job}" substring="-unit-" /> |
| 92 | + </condition> |
| 93 | + <!-- else standard default for download index.php page --> |
| 94 | + <property name="dropTemplateFileName" value="${EBuilderDir}/eclipse/publishingFiles/templateFiles/index.template.php" /> |
119 | 95 |
|
120 | | - <condition |
121 | | - property="dropTemplateFileName" |
122 | | - value="${EBuilderDir}/eclipse/publishingFiles/templateFiles/performance.php"> |
123 | | - <contains |
124 | | - string="${job}" |
125 | | - substring="-perf-" /> |
126 | | - </condition> |
127 | | - <condition |
128 | | - property="dropTemplateFileName" |
129 | | - value="${EBuilderDir}/eclipse/publishingFiles/staticDropFiles/testResults.php"> |
130 | | - <contains |
131 | | - string="${job}" |
132 | | - substring="-unit-" /> |
133 | | - </condition> |
134 | | - <!-- else standard default for download index.php page --> |
135 | | - <property |
136 | | - name="dropTemplateFileName" |
137 | | - value="${EBuilderDir}/eclipse/publishingFiles/templateFiles/index.template.php" /> |
| 96 | + <property name="testResultsHtmlFileName" value="testResultsTables.html" /> |
138 | 97 |
|
139 | | - <condition |
140 | | - property="testResultsHtmlFileName" |
141 | | - value="performanceResultsTable.html"> |
142 | | - <contains |
143 | | - string="${job}" |
144 | | - substring="-perf-" /> |
145 | | - </condition> |
146 | | - <property |
147 | | - name="testResultsHtmlFileName" |
148 | | - value="testResultsTables.html" /> |
| 98 | + <property name="hrefTestResultsTargetPath" value="testresults" /> |
149 | 99 |
|
150 | | - <condition |
151 | | - property="hrefTestResultsTargetPath" |
152 | | - value="."> |
153 | | - <contains |
154 | | - string="${job}" |
155 | | - substring="-perf-" /> |
156 | | - </condition> |
157 | | - <property |
158 | | - name="hrefTestResultsTargetPath" |
159 | | - value="testresults" /> |
| 100 | + <property name="hrefCompileLogsTargetPath" value="compilelogs/plugins/" /> |
| 101 | + <property name="compileLogsDirectoryName" value="${buildDirectory}/${hrefCompileLogsTargetPath}" /> |
160 | 102 |
|
161 | | - <property |
162 | | - name="hrefCompileLogsTargetPath" |
163 | | - value="compilelogs/plugins/" /> |
164 | | - <property |
165 | | - name="compileLogsDirectoryName" |
166 | | - value="${buildDirectory}/${hrefCompileLogsTargetPath}" /> |
167 | | - |
168 | | - <condition |
169 | | - property="manifestFile" |
170 | | - value="${EBuilderDir}/eclipse/publishingFiles/performanceTestManifest.xml" |
171 | | - else="${EBuilderDir}/eclipse/publishingFiles/testManifest.xml"> |
172 | | - <contains |
173 | | - string="${job}" |
174 | | - substring="-perf-" /> |
175 | | - </condition> |
| 103 | + <property name="manifestFile" value="${EBuilderDir}/eclipse/publishingFiles/testManifest.xml" /> |
176 | 104 |
|
177 | | - <condition |
178 | | - property="testsConfigExpected" |
179 | | - value="ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-perf-lin64_linux.gtk.x86_64_11,ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-perf-lin64-baseline_linux.gtk.x86_64_11"> |
180 | | - <contains |
181 | | - string="${job}" |
182 | | - substring="-perf-" /> |
183 | | - </condition> |
184 | | - <!-- else normal unit tests configs --> |
185 | | - <property name="testsConfigExpected" value="${env.TEST_CONFIGURATIONS_EXPECTED}"/> |
| 105 | + <!-- normal unit tests configs --> |
| 106 | + <property name="testsConfigExpected" value="${env.TEST_CONFIGURATIONS_EXPECTED}" /> |
186 | 107 |
|
187 | | - <condition |
188 | | - property="expectedConfigFilename" |
189 | | - value="perfTestConfigs.php" |
190 | | - else="testConfigs.php"> |
191 | | - <contains |
192 | | - string="${job}" |
193 | | - substring="-perf-" /> |
194 | | - </condition> |
| 108 | + <property name="expectedConfigFilename" value="testConfigs.php" /> |
195 | 109 |
|
196 | | - <condition |
197 | | - property="foundConfigFilename" |
198 | | - value="perfTestConfigsFound.php" |
199 | | - else="testConfigsFound.php"> |
200 | | - <contains |
201 | | - string="${job}" |
202 | | - substring="-perf-" /> |
203 | | - </condition> |
| 110 | + <property name="foundConfigFilename" value="testConfigsFound.php" /> |
204 | 111 |
|
205 | | - <!-- we should be able to do this now, and refine list in manifest. --> |
206 | | - <property |
207 | | - name="doMissingListValue" |
208 | | - value="true" /> |
| 112 | + <!-- we should be able to do this now, and refine list in manifest. --> |
| 113 | + <property name="doMissingListValue" value="true" /> |
209 | 114 |
|
210 | | - </target> |
| 115 | + </target> |
211 | 116 |
|
212 | | - <target name="init"> |
213 | | - <fail unless="buildID" /> |
214 | | - <fail unless="eclipseStream" /> |
215 | | - <fail unless="postingDirectory" /> |
| 117 | + <target name="init"> |
| 118 | + <fail unless="buildID" /> |
| 119 | + <fail unless="eclipseStream" /> |
| 120 | + <fail unless="postingDirectory" /> |
216 | 121 |
|
217 | | - <property |
218 | | - name="buildDirectory" |
219 | | - value="${postingDirectory}/${buildID}" /> |
| 122 | + <property name="buildDirectory" value="${postingDirectory}/${buildID}" /> |
220 | 123 |
|
221 | | - <condition property="streamOK"> |
222 | | - <matches |
223 | | - pattern="\d+\.\d+\.\d+" |
224 | | - string="${eclipseStream}" /> |
225 | | - </condition> |
226 | | - <fail |
227 | | - message="eclipseStream variable had unexpected format. Should be digit.digit.digit, but was ${eclipseStream}" |
228 | | - unless="streamOK" /> |
| 124 | + <condition property="streamOK"> |
| 125 | + <matches pattern="\d+\.\d+\.\d+" string="${eclipseStream}" /> |
| 126 | + </condition> |
| 127 | + <fail message="eclipseStream variable had unexpected format. Should be digit.digit.digit, but was ${eclipseStream}" unless="streamOK" /> |
229 | 128 |
|
230 | | - <loadresource property="eclipseStreamMajor"> |
231 | | - <string value="${eclipseStream}"/> |
232 | | - <filterchain> |
233 | | - <tokenfilter> |
234 | | - <replaceregex pattern="^(\d+)\.(\d+)(\.(\d+))" replace="\1"/> |
235 | | - </tokenfilter> |
236 | | - </filterchain> |
237 | | - </loadresource> |
238 | | - <echo message="eclipseStreamMajor: ${eclipseStreamMajor}"/> |
| 129 | + <loadresource property="eclipseStreamMajor"> |
| 130 | + <string value="${eclipseStream}"/> |
| 131 | + <filterchain> |
| 132 | + <tokenfilter> |
| 133 | + <replaceregex pattern="^(\d+)\.(\d+)(\.(\d+))" replace="\1"/> |
| 134 | + </tokenfilter> |
| 135 | + </filterchain> |
| 136 | + </loadresource> |
| 137 | + <echo message="eclipseStreamMajor: ${eclipseStreamMajor}"/> |
239 | 138 |
|
240 | | - <loadresource property="eclipseStreamMinor"> |
241 | | - <string value="${eclipseStream}"/> |
242 | | - <filterchain> |
243 | | - <tokenfilter> |
244 | | - <replaceregex pattern="^(\d+)\.(\d+)(\.(\d+))" replace="\2"/> |
245 | | - </tokenfilter> |
246 | | - </filterchain> |
247 | | - </loadresource> |
248 | | - <echo message="eclipseStreamMinor: ${eclipseStreamMinor}"/> |
| 139 | + <loadresource property="eclipseStreamMinor"> |
| 140 | + <string value="${eclipseStream}"/> |
| 141 | + <filterchain> |
| 142 | + <tokenfilter> |
| 143 | + <replaceregex pattern="^(\d+)\.(\d+)(\.(\d+))" replace="\2"/> |
| 144 | + </tokenfilter> |
| 145 | + </filterchain> |
| 146 | + </loadresource> |
| 147 | + <echo message="eclipseStreamMinor: ${eclipseStreamMinor}"/> |
249 | 148 |
|
250 | | - <loadresource property="eclipseStreamService"> |
251 | | - <string value="${eclipseStream}"/> |
252 | | - <filterchain> |
253 | | - <tokenfilter> |
254 | | - <replaceregex pattern="^(\d+)\.(\d+)(\.(\d+))" replace="\3"/> |
255 | | - </tokenfilter> |
256 | | - </filterchain> |
257 | | - </loadresource> |
258 | | - <echo message="eclipseStreamService: ${eclipseStreamService}"/> |
| 149 | + <loadresource property="eclipseStreamService"> |
| 150 | + <string value="${eclipseStream}"/> |
| 151 | + <filterchain> |
| 152 | + <tokenfilter> |
| 153 | + <replaceregex pattern="^(\d+)\.(\d+)(\.(\d+))" replace="\3"/> |
| 154 | + </tokenfilter> |
| 155 | + </filterchain> |
| 156 | + </loadresource> |
| 157 | + <echo message="eclipseStreamService: ${eclipseStreamService}"/> |
259 | 158 |
|
260 | | - <property environment="env"/> |
| 159 | + <property environment="env"/> |
261 | 160 |
|
262 | | - </target> |
| 161 | + </target> |
263 | 162 |
|
264 | 163 | </project> |
0 commit comments