author | erikj |
Tue, 29 Jan 2019 10:09:13 -0800 | |
changeset 53556 | f3546d51ce9c |
parent 53526 | 688ce88f89cd |
child 53569 | 8830bb9587c2 |
permissions | -rw-r--r-- |
34491 | 1 |
/* |
53423 | 2 |
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. |
34491 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. Oracle designates this |
|
8 |
* particular file as subject to the "Classpath" exception as provided |
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
|
10 |
* |
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
24 |
*/ |
|
25 |
||
26 |
/* |
|
34496 | 27 |
* This file defines build profiles for the JIB tool and others. |
34491 | 28 |
* |
29 |
* A build profile defines a set of configuration options and external |
|
30 |
* dependencies that we for some reason or other care about specifically. |
|
31 |
* Typically, build profiles are defined for the build configurations we |
|
32 |
* build regularly. |
|
33 |
* |
|
34 |
* Contract against this file from the tools that use it, is to provide |
|
35 |
* a function on the form: |
|
36 |
* |
|
34496 | 37 |
* getJibProfiles(input) |
34491 | 38 |
* |
39 |
* which returns an object graph describing the profiles and their |
|
40 |
* dependencies. The name of the function is based on the name of this |
|
41 |
* file, minus the extension and the '-', camel cased and prefixed with |
|
42 |
* 'get'. |
|
43 |
* |
|
44 |
* |
|
45 |
* The parameter 'input' is an object that optionally contains some data. |
|
46 |
* Optionally because a tool may read the configuration for different purposes. |
|
47 |
* To initially get a list of available profiles, the active profile may not |
|
48 |
* yet be known for instance. |
|
49 |
* |
|
50 |
* Data that may be set on the input object: |
|
51 |
* |
|
52 |
* input.profile = <name of active profile> |
|
53 |
* |
|
54 |
* If the active profile is set, the following data from it must also |
|
55 |
* be provided: |
|
56 |
* |
|
57 |
* input.profile |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
58 |
* input.build_id |
34491 | 59 |
* input.target_os |
60 |
* input.target_cpu |
|
61 |
* input.build_os |
|
62 |
* input.build_cpu |
|
63 |
* input.target_platform |
|
64 |
* input.build_platform |
|
65 |
* // The build_osenv_* variables describe the unix layer on Windows systems, |
|
66 |
* // i.e. Cygwin, which may also be 32 or 64 bit. |
|
67 |
* input.build_osenv |
|
68 |
* input.build_osenv_cpu |
|
69 |
* input.build_osenv_platform |
|
70 |
* |
|
71 |
* For more complex nested attributes, there is a method "get": |
|
72 |
* |
|
73 |
* input.get("<dependency>", "<attribute>") |
|
74 |
* |
|
75 |
* Valid attributes are: |
|
76 |
* install_path |
|
77 |
* download_path |
|
78 |
* download_dir |
|
79 |
* |
|
80 |
* |
|
81 |
* The output data generated by this configuration file has the following |
|
82 |
* format: |
|
83 |
* |
|
84 |
* data: { |
|
85 |
* // Identifies the version of this format to the tool reading it |
|
86 |
* format_version: "1.0", |
|
87 |
* |
|
34496 | 88 |
* // Name of base outputdir. JIB assumes the actual output dir is formed |
34491 | 89 |
* // by adding the configuration name: <output_basedir>/<config-name> |
90 |
* output_basedir: "build", |
|
91 |
* // Configure argument to use to specify configuration name |
|
92 |
* configuration_configure_arg: |
|
93 |
* // Make argument to use to specify configuration name |
|
94 |
* configuration_make_arg: |
|
95 |
* |
|
96 |
* profiles: { |
|
97 |
* <profile-name>: { |
|
98 |
* // Name of os the profile is built to run on |
|
99 |
* target_os; <string> |
|
100 |
* // Name of cpu the profile is built to run on |
|
101 |
* target_cpu; <string> |
|
102 |
* // Combination of target_os and target_cpu for convenience |
|
103 |
* target_platform; <string> |
|
104 |
* // Name of os the profile is built on |
|
105 |
* build_os; <string> |
|
106 |
* // Name of cpu the profile is built on |
|
107 |
* build_cpu; <string> |
|
108 |
* // Combination of build_os and build_cpu for convenience |
|
109 |
* build_platform; <string> |
|
110 |
* |
|
111 |
* // List of dependencies needed to build this profile |
|
112 |
* dependencies: <Array of strings> |
|
113 |
* |
|
114 |
* // List of configure args to use for this profile |
|
115 |
* configure_args: <Array of strings> |
|
116 |
* |
|
117 |
* // List of free form labels describing aspects of this profile |
|
118 |
* labels: <Array of strings> |
|
119 |
* } |
|
120 |
* } |
|
121 |
* |
|
122 |
* // Dependencies use a Maven like deployment structure |
|
123 |
* dependencies: { |
|
124 |
* <dependency-name>: { |
|
125 |
* // Organization part of path defining this dependency |
|
126 |
* organization: <string> |
|
127 |
* // File extension for this dependency |
|
128 |
* ext: <string> |
|
129 |
* // Module part of path for defining this dependency, |
|
130 |
* // defaults to <dependency-name> |
|
131 |
* module: <string> |
|
132 |
* // Revision part of path for defining this dependency |
|
133 |
* revision: <string> |
|
134 |
* |
|
135 |
* // List of configure args to add when using this dependency, |
|
136 |
* // defaults to |
|
137 |
* // "--with-<dependency-name>=input.get("<dependency-name", "install_path")" |
|
138 |
* configure_args: <array of strings> |
|
139 |
* |
|
140 |
* // Name of environment variable to set when using this dependency |
|
141 |
* // when running make |
|
142 |
* environment_name: <string> |
|
143 |
* // Value of environment variable to set when using this dependency |
|
144 |
* // when running make |
|
145 |
* environment_value: <string> |
|
146 |
* |
|
147 |
* // Value to add to the PATH variable when using this dependency, |
|
148 |
* // applies to both make and configure |
|
149 |
* environment_path: <string> |
|
150 |
* } |
|
151 |
* |
|
152 |
* <dependency-name>: { |
|
153 |
* // For certain dependencies where a legacy distribution mechanism is |
|
154 |
* // already in place, the "javare" server layout is also supported |
|
155 |
* // Indicate that an alternate server source and layout should be used |
|
156 |
* server: "javare" |
|
157 |
* |
|
158 |
* // For "javare", a combination of module, revision, |
|
159 |
* // build number (optional), files and checksum file is possible for |
|
160 |
* // artifacts following the standard layout. |
|
161 |
* module: <string> |
|
162 |
* revision: <string> |
|
163 |
* build_number: <string> |
|
164 |
* checksum_file: <string> |
|
165 |
* file: <string> |
|
166 |
* |
|
167 |
* // For other files, use checksum path and path instead |
|
168 |
* checksum_path: <string> |
|
169 |
* path: <string> |
|
170 |
* } |
|
171 |
* } |
|
172 |
* } |
|
173 |
*/ |
|
174 |
||
175 |
/** |
|
176 |
* Main entry to generate the profile configuration |
|
177 |
* |
|
178 |
* @param input External data to use for generating the configuration |
|
179 |
* @returns {{}} Profile configuration |
|
180 |
*/ |
|
34496 | 181 |
var getJibProfiles = function (input) { |
34491 | 182 |
|
183 |
var data = {}; |
|
184 |
||
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
185 |
// Identifies the version of this format to the tool reading it. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
186 |
// 1.1 signifies that the publish, publish-src and get-src features are usable. |
50239 | 187 |
// 1.2 signifies that artifact uploads should fail on missing artifacts by default. |
188 |
data.format_version = "1.2"; |
|
34491 | 189 |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
190 |
// Organization, product and version are used when uploading/publishing build results |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
191 |
data.organization = ""; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
192 |
data.product = "jdk"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
193 |
data.version = getVersion(); |
34491 | 194 |
|
34496 | 195 |
// The base directory for the build output. JIB will assume that the |
34491 | 196 |
// actual build directory will be <output_basedir>/<configuration> |
197 |
data.output_basedir = "build"; |
|
198 |
// The configure argument to use to specify the name of the configuration |
|
199 |
data.configuration_configure_arg = "--with-conf-name="; |
|
200 |
// The make argument to use to specify the name of the configuration |
|
201 |
data.configuration_make_arg = "CONF_NAME="; |
|
202 |
||
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
203 |
// Exclude list to use when Jib creates a source bundle |
52415
bc4246eb76c4
8213227: Update jib src excludes to filter webrev and Jreg directories
erikj
parents:
52393
diff
changeset
|
204 |
data.src_bundle_excludes = [ |
bc4246eb76c4
8213227: Update jib src excludes to filter webrev and Jreg directories
erikj
parents:
52393
diff
changeset
|
205 |
"build", "{,**/}webrev*", "{,**/}.hg", "{,**/}JTwork", "{,**/}JTreport", |
bc4246eb76c4
8213227: Update jib src excludes to filter webrev and Jreg directories
erikj
parents:
52393
diff
changeset
|
206 |
"{,**/}.git" |
bc4246eb76c4
8213227: Update jib src excludes to filter webrev and Jreg directories
erikj
parents:
52393
diff
changeset
|
207 |
]; |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
208 |
// Include list to use when creating a minimal jib source bundle which |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
209 |
// contains just the jib configuration files. |
52415
bc4246eb76c4
8213227: Update jib src excludes to filter webrev and Jreg directories
erikj
parents:
52393
diff
changeset
|
210 |
data.conf_bundle_includes = [ |
bc4246eb76c4
8213227: Update jib src excludes to filter webrev and Jreg directories
erikj
parents:
52393
diff
changeset
|
211 |
"make/autoconf/version-numbers", |
bc4246eb76c4
8213227: Update jib src excludes to filter webrev and Jreg directories
erikj
parents:
52393
diff
changeset
|
212 |
]; |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
213 |
|
34491 | 214 |
// Define some common values |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
215 |
var common = getJibProfilesCommon(input, data); |
34491 | 216 |
// Generate the profiles part of the configuration |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
217 |
data.profiles = getJibProfilesProfiles(input, common, data); |
34491 | 218 |
// Generate the dependencies part of the configuration |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
219 |
data.dependencies = getJibProfilesDependencies(input, common, data); |
34491 | 220 |
|
221 |
return data; |
|
222 |
}; |
|
223 |
||
224 |
/** |
|
225 |
* Generates some common values |
|
226 |
* |
|
227 |
* @param input External data to use for generating the configuration |
|
228 |
* @returns Common values |
|
229 |
*/ |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
230 |
var getJibProfilesCommon = function (input, data) { |
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
231 |
var common = {}; |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
232 |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
233 |
common.organization = "jpg.infra.builddeps"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
234 |
common.build_id = getBuildId(input); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
235 |
common.build_number = input.build_number != null ? input.build_number : "0"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
236 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
237 |
// List of the main profile names used for iteration |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
238 |
common.main_profile_names = [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
239 |
"linux-x64", "linux-x86", "macosx-x64", "solaris-x64", |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
240 |
"solaris-sparcv9", "windows-x64", "windows-x86", |
52351 | 241 |
"linux-aarch64", "linux-arm32" |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
242 |
]; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
243 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
244 |
// These are the base setttings for all the main build profiles. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
245 |
common.main_profile_base = { |
52774
56ca125c973b
8214309: Enhance makefiles to allow generating JCov instrumented build
shurailine
parents:
52714
diff
changeset
|
246 |
dependencies: ["boot_jdk", "gnumake", "jtreg", "jib", "autoconf", "jmh", "jcov"], |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
247 |
default_make_targets: ["product-bundles", "test-bundles"], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
248 |
configure_args: concat(["--enable-jtreg-failure-handler"], |
51207
fc24da4898f1
8207243: Fix translation filtering to also support zh_HK and zh_TW
erikj
parents:
51013
diff
changeset
|
249 |
"--with-exclude-translations=de,es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I,zh_TW,zh_HK", |
51215 | 250 |
"--disable-manpages", |
52930 | 251 |
"--with-jvm-features=-shenandoahgc", |
50590
5fa19bad622d
8204973: Add build support for filtering translations
erikj
parents:
50543
diff
changeset
|
252 |
versionArgs(input, common)) |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
253 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
254 |
// Extra settings for debug profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
255 |
common.debug_suffix = "-debug"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
256 |
common.debug_profile_base = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
257 |
configure_args: ["--enable-debug"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
258 |
labels: "debug" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
259 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
260 |
// Extra settings for slowdebug profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
261 |
common.slowdebug_suffix = "-slowdebug"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
262 |
common.slowdebug_profile_base = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
263 |
configure_args: ["--with-debug-level=slowdebug"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
264 |
labels: "slowdebug" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
265 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
266 |
// Extra settings for openjdk only profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
267 |
common.open_suffix = "-open"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
268 |
common.open_profile_base = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
269 |
configure_args: ["--enable-openjdk-only"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
270 |
labels: "open" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
271 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
272 |
|
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
273 |
common.configure_args_64bit = ["--with-target-bits=64"]; |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
274 |
common.configure_args_32bit = ["--with-target-bits=32"]; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
275 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
276 |
/** |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
277 |
* Define common artifacts template for all main profiles |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
278 |
* @param o - Object containing data for artifacts |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
279 |
*/ |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
280 |
common.main_profile_artifacts = function (o) { |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
281 |
var jdk_subdir = (o.jdk_subdir != null ? o.jdk_subdir : "jdk-" + data.version); |
50511 | 282 |
var jdk_suffix = (o.jdk_suffix != null ? o.jdk_suffix : "tar.gz"); |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
283 |
var pf = o.platform |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
284 |
return { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
285 |
artifacts: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
286 |
jdk: { |
50511 | 287 |
local: "bundles/\\(jdk.*bin." + jdk_suffix + "\\)", |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
288 |
remote: [ |
50511 | 289 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin." + jdk_suffix, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
290 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
291 |
], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
292 |
subdir: jdk_subdir, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
293 |
exploded: "images/jdk" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
294 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
295 |
test: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
296 |
local: "bundles/\\(jdk.*bin-tests.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
297 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
298 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-tests.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
299 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
300 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
301 |
exploded: "images/test" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
302 |
}, |
47440
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
303 |
test_demos: { |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
304 |
local: "bundles/\\(jdk.*bin-tests-demos.tar.gz\\)", |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
305 |
remote: [ |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
306 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-tests-demos.tar.gz", |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
307 |
"bundles/" + pf + "/\\1" |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
308 |
], |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
309 |
exploded: "images/test" |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47433
diff
changeset
|
310 |
}, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
311 |
jdk_symbols: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
312 |
local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
313 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
314 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-symbols.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
315 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
316 |
], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
317 |
subdir: jdk_subdir, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
318 |
exploded: "images/jdk" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
319 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
320 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
321 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
322 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
323 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
324 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
325 |
/** |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
326 |
* Define common artifacts template for all debug profiles |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
327 |
* @param o - Object containing data for artifacts |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
328 |
*/ |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
329 |
common.debug_profile_artifacts = function (o) { |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
330 |
var jdk_subdir = "jdk-" + data.version + "/fastdebug"; |
50511 | 331 |
var jdk_suffix = (o.jdk_suffix != null ? o.jdk_suffix : "tar.gz"); |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
332 |
var pf = o.platform |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
333 |
return { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
334 |
artifacts: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
335 |
jdk: { |
50511 | 336 |
local: "bundles/\\(jdk.*bin-debug." + jdk_suffix + "\\)", |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
337 |
remote: [ |
50511 | 338 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-debug." + jdk_suffix, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
339 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
340 |
], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
341 |
subdir: jdk_subdir, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
342 |
exploded: "images/jdk" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
343 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
344 |
test: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
345 |
local: "bundles/\\(jdk.*bin-tests-debug.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
346 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
347 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-tests-debug.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
348 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
349 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
350 |
exploded: "images/test" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
351 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
352 |
jdk_symbols: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
353 |
local: "bundles/\\(jdk.*bin-debug-symbols.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
354 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
355 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-debug-symbols.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
356 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
357 |
], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
358 |
subdir: jdk_subdir, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
359 |
exploded: "images/jdk" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
360 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
361 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
362 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
363 |
}; |
34491 | 364 |
|
52509 | 365 |
common.boot_jdk_version = "11"; |
47365 | 366 |
common.boot_jdk_home = input.get("boot_jdk", "home_path") + "/jdk-" |
367 |
+ common.boot_jdk_version |
|
41047
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
368 |
+ (input.build_os == "macosx" ? ".jdk/Contents/Home" : ""); |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
369 |
|
34491 | 370 |
return common; |
371 |
}; |
|
372 |
||
373 |
/** |
|
374 |
* Generates the profiles part of the configuration. |
|
375 |
* |
|
376 |
* @param input External data to use for generating the configuration |
|
377 |
* @param common The common values |
|
378 |
* @returns {{}} Profiles part of the configuration |
|
379 |
*/ |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
380 |
var getJibProfilesProfiles = function (input, common, data) { |
34491 | 381 |
// Main SE profiles |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
382 |
var profiles = { |
34491 | 383 |
|
384 |
"linux-x64": { |
|
385 |
target_os: "linux", |
|
386 |
target_cpu: "x64", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
387 |
dependencies: ["devkit", "graphviz", "pandoc", "graalunit_lib"], |
44727 | 388 |
configure_args: concat(common.configure_args_64bit, |
53240 | 389 |
"--enable-full-docs", "--with-zlib=system", |
390 |
(isWsl(input) ? [ "--host=x86_64-unknown-linux-gnu", |
|
391 |
"--build=x86_64-unknown-linux-gnu" ] : [])), |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
392 |
default_make_targets: ["docs-bundles"], |
34491 | 393 |
}, |
394 |
||
395 |
"linux-x86": { |
|
396 |
target_os: "linux", |
|
397 |
target_cpu: "x86", |
|
398 |
build_cpu: "x64", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
399 |
dependencies: ["devkit"], |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
400 |
configure_args: concat(common.configure_args_32bit, |
39190
a6b5b18fd06c
8154209: Remove client VM from default JIB profile on windows-x86 and linux-x86
lmesnik
parents:
37972
diff
changeset
|
401 |
"--with-jvm-variants=minimal,server", "--with-zlib=system"), |
34491 | 402 |
}, |
403 |
||
404 |
"macosx-x64": { |
|
405 |
target_os: "macosx", |
|
406 |
target_cpu: "x64", |
|
52714
2e52aa822c57
8178317: Create man pages using pandoc from markdown sources
ihse
parents:
52595
diff
changeset
|
407 |
dependencies: ["devkit", "pandoc", "graalunit_lib"], |
45875 | 408 |
configure_args: concat(common.configure_args_64bit, "--with-zlib=system", |
49523 | 409 |
"--with-macosx-version-max=10.9.0"), |
34491 | 410 |
}, |
411 |
||
412 |
"solaris-x64": { |
|
413 |
target_os: "solaris", |
|
414 |
target_cpu: "x64", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
415 |
dependencies: ["devkit", "cups"], |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
416 |
configure_args: concat(common.configure_args_64bit, |
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
417 |
"--with-zlib=system", "--enable-dtrace"), |
34491 | 418 |
}, |
419 |
||
420 |
"solaris-sparcv9": { |
|
421 |
target_os: "solaris", |
|
422 |
target_cpu: "sparcv9", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
423 |
dependencies: ["devkit", "cups"], |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
424 |
configure_args: concat(common.configure_args_64bit, |
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
425 |
"--with-zlib=system", "--enable-dtrace"), |
34491 | 426 |
}, |
427 |
||
428 |
"windows-x64": { |
|
429 |
target_os: "windows", |
|
430 |
target_cpu: "x64", |
|
52917 | 431 |
dependencies: ["devkit", "pandoc", "graalunit_lib"], |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
432 |
configure_args: concat(common.configure_args_64bit), |
34491 | 433 |
}, |
434 |
||
435 |
"windows-x86": { |
|
436 |
target_os: "windows", |
|
437 |
target_cpu: "x86", |
|
438 |
build_cpu: "x64", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
439 |
dependencies: ["devkit"], |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
440 |
configure_args: concat(common.configure_args_32bit), |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
441 |
}, |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
442 |
|
49204
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
443 |
"linux-aarch64": { |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
444 |
target_os: "linux", |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
445 |
target_cpu: "aarch64", |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
446 |
build_cpu: "x64", |
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
447 |
dependencies: ["devkit", "build_devkit", "cups"], |
49204
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
448 |
configure_args: [ |
49525
4d98473ed33e
8200727: linux-aarch64 profile should use bundled freetype
ihse
parents:
49523
diff
changeset
|
449 |
"--openjdk-target=aarch64-linux-gnu", "--with-freetype=bundled", |
52351 | 450 |
"--disable-warnings-as-errors" |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
451 |
], |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
452 |
}, |
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
453 |
|
50472 | 454 |
"linux-arm32": { |
455 |
target_os: "linux", |
|
456 |
target_cpu: "arm", |
|
457 |
build_cpu: "x64", |
|
51013
6e760728afaa
8206433: Several jib profiles missing autoconf dependency
erikj
parents:
50908
diff
changeset
|
458 |
dependencies: ["devkit", "build_devkit", "cups"], |
50472 | 459 |
configure_args: [ |
460 |
"--openjdk-target=arm-linux-gnueabihf", "--with-freetype=bundled", |
|
461 |
"--with-abi-profile=arm-vfp-hflt", "--disable-warnings-as-errors" |
|
462 |
], |
|
463 |
}, |
|
34491 | 464 |
}; |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
465 |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
466 |
// Add the base settings to all the main profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
467 |
common.main_profile_names.forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
468 |
profiles[name] = concatObjects(common.main_profile_base, profiles[name]); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
469 |
}); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
470 |
|
34491 | 471 |
// Generate debug versions of all the main profiles |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
472 |
common.main_profile_names.forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
473 |
var debugName = name + common.debug_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
474 |
profiles[debugName] = concatObjects(profiles[name], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
475 |
common.debug_profile_base); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
476 |
}); |
36532 | 477 |
// Generate slowdebug versions of all the main profiles |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
478 |
common.main_profile_names.forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
479 |
var debugName = name + common.slowdebug_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
480 |
profiles[debugName] = concatObjects(profiles[name], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
481 |
common.slowdebug_profile_base); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
482 |
}); |
49243 | 483 |
// Generate testmake profiles for the main profile of each build host |
484 |
// platform. This profile only runs the makefile tests. |
|
485 |
// Ant is needed to run the idea project generator test. |
|
486 |
var testmakeBase = { |
|
487 |
dependencies: [ "ant" ], |
|
488 |
environment: { |
|
489 |
"ANT_HOME": input.get("ant", "install_path") + "/apache-ant-1.7.1" |
|
490 |
} |
|
491 |
}; |
|
492 |
[ "linux-x64", "macosx-x64", "solaris-sparcv9", "solaris-x64", "windows-x64"] |
|
493 |
.forEach(function (name) { |
|
494 |
var maketestName = name + "-testmake"; |
|
495 |
profiles[maketestName] = concatObjects(profiles[name], testmakeBase); |
|
52368
ecef74be8e25
8213237: Remove test-compile-commands from jib-profiles.js
ihse
parents:
52357
diff
changeset
|
496 |
profiles[maketestName].default_make_targets = [ "test-make" ]; |
49243 | 497 |
}); |
34491 | 498 |
|
51994 | 499 |
// Profiles for building the zero jvm variant. These are used for verification. |
42425 | 500 |
var zeroProfiles = { |
501 |
"linux-x64-zero": { |
|
502 |
target_os: "linux", |
|
503 |
target_cpu: "x64", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
504 |
dependencies: ["devkit"], |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
505 |
configure_args: concat(common.configure_args_64bit, [ |
42425 | 506 |
"--with-zlib=system", |
507 |
"--with-jvm-variants=zero", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
508 |
"--enable-libffi-bundling" |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
509 |
]) |
42425 | 510 |
}, |
511 |
||
512 |
"linux-x86-zero": { |
|
513 |
target_os: "linux", |
|
514 |
target_cpu: "x86", |
|
515 |
build_cpu: "x64", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
516 |
dependencies: ["devkit"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
517 |
configure_args: concat(common.configure_args_32bit, [ |
42425 | 518 |
"--with-zlib=system", |
519 |
"--with-jvm-variants=zero", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
520 |
"--enable-libffi-bundling" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
521 |
]) |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
522 |
} |
42425 | 523 |
} |
524 |
profiles = concatObjects(profiles, zeroProfiles); |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
525 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
526 |
// Add the base settings to the zero profiles and generate debug profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
527 |
Object.keys(zeroProfiles).forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
528 |
var debugName = name + common.debug_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
529 |
profiles[name] = concatObjects(common.main_profile_base, profiles[name]); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
530 |
profiles[debugName] = concatObjects(profiles[name], common.debug_profile_base); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
531 |
}); |
42425 | 532 |
|
52443
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
533 |
// Define a profile with precompiled headers disabled. This is just used for |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
534 |
// verfication of this build configuration. |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
535 |
var noPchProfiles = { |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
536 |
"linux-x64-debug-nopch": { |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
537 |
target_os: "linux", |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
538 |
target_cpu: "x64", |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
539 |
dependencies: ["devkit"], |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
540 |
configure_args: concat(common.configure_args_64bit, |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
541 |
"--with-zlib=system", "--disable-precompiled-headers"), |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
542 |
}, |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
543 |
}; |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
544 |
profiles = concatObjects(profiles, noPchProfiles); |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
545 |
// Add base settings to noPch profiles |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
546 |
Object.keys(noPchProfiles).forEach(function (name) { |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
547 |
profiles[name] = concatObjects(common.main_profile_base, profiles[name]); |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
548 |
profiles[name] = concatObjects(common.debug_profile_base, profiles[name]); |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
549 |
// Override default make target with hotspot as that's the only part of |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
550 |
// the build using precompiled headers. |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
551 |
profiles[name].default_make_targets = ["hotspot"]; |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
552 |
}); |
bec2391579f8
8213428: Add a no precompiled header Linux build to builds-tier1 and jdk-submit
erikj
parents:
52415
diff
changeset
|
553 |
|
50543 | 554 |
// Bootcycle profiles runs the build with itself as the boot jdk. This can |
555 |
// be done in two ways. Either using the builtin bootcycle target in the |
|
556 |
// build system. Or by supplying the main jdk build as bootjdk to configure. |
|
557 |
[ "linux-x64", "macosx-x64", "solaris-sparcv9", "windows-x64"] |
|
558 |
.forEach(function (name) { |
|
559 |
var bootcycleName = name + "-bootcycle"; |
|
560 |
var bootcyclePrebuiltName = name + "-bootcycle-prebuilt"; |
|
561 |
// The base bootcycle profile just changes the default target |
|
562 |
// compared to the base profile |
|
563 |
profiles[bootcycleName] = clone(profiles[name]); |
|
564 |
profiles[bootcycleName].default_make_targets = [ "bootcycle-images" ]; |
|
565 |
// The prebuilt bootcycle variant modifies the boot jdk argument |
|
566 |
var bootcyclePrebuiltBase = { |
|
567 |
dependencies: [ name + ".jdk" ], |
|
568 |
configure_args: "--with-boot-jdk=" + input.get(name + ".jdk", "home_path"), |
|
569 |
} |
|
570 |
profiles[bootcyclePrebuiltName] = concatObjects(profiles[name], |
|
571 |
bootcyclePrebuiltBase); |
|
572 |
var bootJdkIndex = profiles[bootcyclePrebuiltName].dependencies.indexOf("boot_jdk"); |
|
573 |
delete profiles[bootcyclePrebuiltName].dependencies[bootJdkIndex]; |
|
574 |
profiles[bootcyclePrebuiltName].default_make_targets = [ "product-images" ]; |
|
575 |
}); |
|
576 |
||
53423 | 577 |
// JCov profiles build JCov-instrumented JDK image based on images provided through dependencies. |
578 |
[ "linux-x64", "macosx-x64", "solaris-sparcv9", "windows-x64"] |
|
579 |
.forEach(function (name) { |
|
580 |
var jcovName = name + "-jcov"; |
|
581 |
profiles[jcovName] = clone(common.main_profile_base); |
|
582 |
profiles[jcovName].target_os = profiles[name].target_os |
|
583 |
profiles[jcovName].target_cpu = profiles[name].target_cpu |
|
584 |
profiles[jcovName].default_make_targets = [ "jcov-bundles" ]; |
|
585 |
profiles[jcovName].dependencies = concat(profiles[jcovName].dependencies, |
|
586 |
[ name + ".jdk", "devkit" ]); |
|
587 |
profiles[jcovName].configure_args = concat(profiles[jcovName].configure_args, |
|
588 |
["--with-jcov-input-jdk=" + input.get(name + ".jdk", "home_path")]); |
|
589 |
}); |
|
590 |
||
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
591 |
// |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
592 |
// Define artifacts for profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
593 |
// |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
594 |
// Macosx bundles are named osx |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
595 |
// tar.gz. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
596 |
var artifactData = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
597 |
"linux-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
598 |
platform: "linux-x64", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
599 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
600 |
"linux-x86": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
601 |
platform: "linux-x86", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
602 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
603 |
"macosx-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
604 |
platform: "osx-x64", |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
605 |
jdk_subdir: "jdk-" + data.version + ".jdk/Contents/Home", |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
606 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
607 |
"solaris-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
608 |
platform: "solaris-x64", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
609 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
610 |
"solaris-sparcv9": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
611 |
platform: "solaris-sparcv9", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
612 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
613 |
"windows-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
614 |
platform: "windows-x64", |
50511 | 615 |
jdk_suffix: "zip", |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
616 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
617 |
"windows-x86": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
618 |
platform: "windows-x86", |
50511 | 619 |
jdk_suffix: "zip", |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
620 |
}, |
49204
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
621 |
"linux-aarch64": { |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
622 |
platform: "linux-aarch64", |
564802b01ded
8199451: Create linux-aarch64 cross-compilation devkit, and fix cross-compilation
ihse
parents:
49147
diff
changeset
|
623 |
}, |
50472 | 624 |
"linux-arm32": { |
625 |
platform: "linux-arm32", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
626 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
627 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
628 |
// Generate common artifacts for all main profiles |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
629 |
Object.keys(artifactData).forEach(function (name) { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
630 |
profiles[name] = concatObjects(profiles[name], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
631 |
common.main_profile_artifacts(artifactData[name])); |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
632 |
}); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
633 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
634 |
// Generate common artifacts for all debug profiles |
44625
cf100f579077
8177822: Move closed jib configuration for arm platforms to open
erikj
parents:
44513
diff
changeset
|
635 |
Object.keys(artifactData).forEach(function (name) { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
636 |
var debugName = name + common.debug_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
637 |
profiles[debugName] = concatObjects(profiles[debugName], |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
638 |
common.debug_profile_artifacts(artifactData[name])); |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
639 |
}); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
640 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
641 |
profilesArtifacts = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
642 |
"linux-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
643 |
artifacts: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
644 |
doc_api_spec: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
645 |
local: "bundles/\\(jdk.*doc-api-spec.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
646 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
647 |
"bundles/common/jdk-" + data.version + "_doc-api-spec.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
648 |
"bundles/linux-x64/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
649 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
650 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
651 |
} |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
652 |
} |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
653 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
654 |
profiles = concatObjects(profiles, profilesArtifacts); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
655 |
|
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
656 |
// Generate open only profiles for all the main and debug profiles. |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
657 |
// Rewrite artifact remote paths by adding "openjdk/GPL". |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
658 |
common.main_profile_names.forEach(function (name) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
659 |
var openName = name + common.open_suffix; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
660 |
profiles[openName] = concatObjects(profiles[name], |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
661 |
common.open_profile_base); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
662 |
for (artifactName in profiles[openName].artifacts) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
663 |
var artifact = profiles[openName].artifacts[artifactName]; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
664 |
artifact.remote = replaceAll( |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
665 |
"bundles\/", "bundles/openjdk/GPL/", |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
666 |
(artifact.remote != null ? artifact.remote : artifact.local)); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
667 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
668 |
var debugName = name + common.debug_suffix; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
669 |
var openDebugName = name + common.open_suffix + common.debug_suffix; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
670 |
profiles[openDebugName] = concatObjects(profiles[debugName], |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
671 |
common.open_profile_base); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
672 |
for (artifactName in profiles[openDebugName].artifacts) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
673 |
var artifact = profiles[openDebugName].artifacts[artifactName]; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
674 |
artifact.remote = replaceAll( |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
675 |
"bundles\/", "bundles/openjdk/GPL/", |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
676 |
(artifact.remote != null ? artifact.remote : artifact.local)); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
677 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
678 |
}); |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
679 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
680 |
// Define the reference implementation profiles. These are basically the same |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
681 |
// as the open profiles, but upload artifacts to a different location. |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
682 |
common.main_profile_names.forEach(function (name) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
683 |
var riName = name + "-ri"; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
684 |
var riDebugName = riName + common.debug_suffix; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
685 |
var openName = name + common.open_suffix; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
686 |
var openDebugName = openName + common.debug_suffix; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
687 |
profiles[riName] = clone(profiles[openName]); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
688 |
profiles[riDebugName] = clone(profiles[openDebugName]); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
689 |
// Rewrite all remote dirs to "bundles/openjdk/BCL/..." |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
690 |
for (artifactName in profiles[riName].artifacts) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
691 |
var artifact = profiles[riName].artifacts[artifactName]; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
692 |
artifact.remote = replaceAll( |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
693 |
"\/GPL\/", "/BCL/", |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
694 |
(artifact.remote != null ? artifact.remote : artifact.local)); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
695 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
696 |
}); |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
697 |
|
48212
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
698 |
// For open profiles, the non-debug jdk bundles, need an "open" prefix on the |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
699 |
// remote bundle names, forming the word "openjdk". See JDK-8188789. |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
700 |
common.main_profile_names.forEach(function (name) { |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
701 |
var openName = name + common.open_suffix; |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
702 |
profiles[openName].artifacts["jdk"].remote = replaceAll( |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
703 |
"\/jdk-", "/openjdk-", |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
704 |
replaceAll("\/\\1", "/open\\1", |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
705 |
profiles[openName].artifacts["jdk"].remote)); |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
706 |
}); |
6a8ab8d1fb8b
8188789: Update JDK 9.0.1 and Future OpenJDK bundle names
erikj
parents:
48079
diff
changeset
|
707 |
|
50807
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
708 |
// Generate cmp-baseline profiles for each main profile and their |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
709 |
// corresponding debug profile. This profile does a compare build run with no |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
710 |
// changes to verify that the compare script has a clean baseline |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
711 |
common.main_profile_names.forEach(function (name) { |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
712 |
[ "", common.open_suffix ].forEach(function (suffix) { |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
713 |
var cmpBaselineName = name + suffix + "-cmp-baseline"; |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
714 |
profiles[cmpBaselineName] = clone(profiles[name + suffix]); |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
715 |
// Only compare the images target. This should pressumably be expanded |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
716 |
// to include more build targets when possible. |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
717 |
profiles[cmpBaselineName].default_make_targets = [ "images" ]; |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
718 |
profiles[cmpBaselineName].make_args = [ "COMPARE_BUILD=CONF=" ]; |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
719 |
// Do not inherit artifact definitions from base profile |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
720 |
delete profiles[cmpBaselineName].artifacts; |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
721 |
}); |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
722 |
}); |
57d1175e2c7b
8205625: linux-aarch64-cmp-baseline fails builds-tier5
erikj
parents:
50702
diff
changeset
|
723 |
|
53423 | 724 |
// Artifacts of JCov profiles |
725 |
[ "linux-x64", "macosx-x64", "solaris-sparcv9", "windows-x64"] |
|
726 |
.forEach(function (name) { |
|
727 |
var o = artifactData[name] |
|
728 |
var jdk_subdir = (o.jdk_subdir != null ? o.jdk_subdir : "jdk-" + data.version); |
|
729 |
var jdk_suffix = (o.jdk_suffix != null ? o.jdk_suffix : "tar.gz"); |
|
730 |
var pf = o.platform |
|
731 |
var jcovName = name + "-jcov"; |
|
732 |
profiles[jcovName].artifacts = { |
|
733 |
jdk: { |
|
734 |
local: "bundles/\\(jdk-jcov.*bin." + jdk_suffix + "\\)", |
|
735 |
remote: [ |
|
736 |
"bundles/" + pf + "/jdk-jcov-" + data.version + "_" + pf + "_bin." + jdk_suffix |
|
737 |
], |
|
738 |
subdir: jdk_subdir, |
|
739 |
exploded: "images/jdk-jcov" |
|
740 |
} |
|
741 |
}; |
|
742 |
}); |
|
743 |
||
51994 | 744 |
// Profiles used to run tests. |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
745 |
var testOnlyProfiles = { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
746 |
"run-test": { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
747 |
target_os: input.build_os, |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
748 |
target_cpu: input.build_cpu, |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
749 |
dependencies: [ "jtreg", "gnumake", "boot_jdk", "devkit", "jib" ], |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
750 |
labels: "test", |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
751 |
environment: { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
752 |
"JT_JAVA": common.boot_jdk_home |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
753 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
754 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
755 |
}; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
756 |
profiles = concatObjects(profiles, testOnlyProfiles); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
757 |
|
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
758 |
// Profiles used to run tests using Jib for internal dependencies. |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
759 |
var testedProfile = input.testedProfile; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
760 |
if (testedProfile == null) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
761 |
testedProfile = input.build_os + "-" + input.build_cpu; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
762 |
} |
53526
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53423
diff
changeset
|
763 |
var testedProfileJDK = testedProfile + ".jdk"; |
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53423
diff
changeset
|
764 |
var testedProfileTest = "" |
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53423
diff
changeset
|
765 |
if (testedProfile.endsWith("-jcov")) { |
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53423
diff
changeset
|
766 |
testedProfileTest = testedProfile.substring(0, testedProfile.length - "-jcov".length) + ".test"; |
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53423
diff
changeset
|
767 |
} else { |
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53423
diff
changeset
|
768 |
testedProfileTest = testedProfile + ".test"; |
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53423
diff
changeset
|
769 |
} |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
770 |
var testOnlyProfilesPrebuilt = { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
771 |
"run-test-prebuilt": { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
772 |
target_os: input.build_os, |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
773 |
target_cpu: input.build_cpu, |
52393
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52368
diff
changeset
|
774 |
dependencies: [ |
53526
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53423
diff
changeset
|
775 |
"jtreg", "gnumake", "boot_jdk", "devkit", "jib", "jcov", testedProfileJDK, |
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53423
diff
changeset
|
776 |
testedProfileTest |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
777 |
], |
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
778 |
src: "src.conf", |
52343
b66b51c4e405
8213184: Revert change in jib-profiles.js from run-test-prebuilt to test-prebuilt
ihse
parents:
52342
diff
changeset
|
779 |
make_args: [ "run-test-prebuilt", "LOG_CMDLINES=true", "JTREG_VERBOSE=fail,error,time" ], |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
780 |
environment: { |
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
781 |
"BOOT_JDK": common.boot_jdk_home, |
53526
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53423
diff
changeset
|
782 |
"JDK_IMAGE_DIR": input.get(testedProfileJDK, "home_path"), |
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53423
diff
changeset
|
783 |
"TEST_IMAGE_DIR": input.get(testedProfileTest, "home_path") |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
784 |
}, |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
785 |
labels: "test" |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
786 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
787 |
}; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
788 |
|
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
789 |
// If actually running the run-test-prebuilt profile, verify that the input |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
790 |
// variable is valid and if so, add the appropriate target_* values from |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
791 |
// the tested profile. |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
792 |
if (input.profile == "run-test-prebuilt") { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
793 |
if (profiles[testedProfile] == null) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
794 |
error("testedProfile is not defined: " + testedProfile); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
795 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
796 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
797 |
if (profiles[testedProfile] != null) { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
798 |
testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_os"] |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
799 |
= profiles[testedProfile]["target_os"]; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
800 |
testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_cpu"] |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
801 |
= profiles[testedProfile]["target_cpu"]; |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
802 |
} |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
803 |
profiles = concatObjects(profiles, testOnlyProfilesPrebuilt); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
804 |
|
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
805 |
// On macosx add the devkit bin dir to the path in all the run-test profiles. |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
806 |
// This gives us a guaranteed working version of lldb for the jtreg failure handler. |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
807 |
if (input.build_os == "macosx") { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
808 |
macosxRunTestExtra = { |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
809 |
environment_path: input.get("devkit", "install_path") |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
810 |
+ "/Xcode.app/Contents/Developer/usr/bin" |
49147
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
811 |
}; |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
812 |
profiles["run-test"] = concatObjects(profiles["run-test"], macosxRunTestExtra); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
813 |
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"], macosxRunTestExtra); |
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
814 |
} |
49147
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
815 |
// On windows we want the debug symbols available at test time |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
816 |
if (input.build_os == "windows") { |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
817 |
windowsRunTestPrebuiltExtra = { |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
818 |
dependencies: [ testedProfile + ".jdk_symbols" ], |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
819 |
environment: { |
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
820 |
"SYMBOLS_IMAGE_DIR": input.get(testedProfile + ".jdk_symbols", "home_path"), |
49147
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
821 |
} |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
822 |
}; |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
823 |
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"], |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
824 |
windowsRunTestPrebuiltExtra); |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48924
diff
changeset
|
825 |
} |
47721
d2b306a70bf1
8190735: Define all base artifacts for all open/open-debug profiles
erikj
parents:
47701
diff
changeset
|
826 |
|
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
827 |
// The profile run-test-prebuilt defines src.conf as the src bundle. When |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
828 |
// running in Mach 5, this reduces the time it takes to populate the |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
829 |
// considerably. But with just src.conf, we cannot actually run any tests, |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
830 |
// so if running from a workspace with just src.conf in it, we need to also |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
831 |
// get src.full as a dependency, and define the work_dir (where make gets |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
832 |
// run) to be in the src.full install path. By running in the install path, |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
833 |
// the same cached installation of the full src can be reused for multiple |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
834 |
// test tasks. Care must however be taken not to polute that work dir by |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
835 |
// setting the appropriate make variables to control output directories. |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
836 |
// |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
837 |
// Use the existance of the top level README as indication of if this is |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
838 |
// the full source or just src.conf. |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
839 |
if (!new java.io.File(__DIR__, "../../README").exists()) { |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
840 |
var runTestPrebuiltSrcFullExtra = { |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
841 |
dependencies: "src.full", |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
842 |
work_dir: input.get("src.full", "install_path"), |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
843 |
} |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
844 |
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"], |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
845 |
runTestPrebuiltSrcFullExtra); |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
846 |
} |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
52022
diff
changeset
|
847 |
|
34491 | 848 |
// Generate the missing platform attributes |
849 |
profiles = generatePlatformAttributes(profiles); |
|
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
850 |
profiles = generateDefaultMakeTargetsConfigureArg(common, profiles); |
34491 | 851 |
return profiles; |
852 |
}; |
|
853 |
||
854 |
/** |
|
855 |
* Generate the dependencies part of the configuration |
|
856 |
* |
|
857 |
* @param input External data to use for generating the configuration |
|
858 |
* @param common The common values |
|
859 |
* @returns {{}} Dependencies part of configuration |
|
860 |
*/ |
|
34496 | 861 |
var getJibProfilesDependencies = function (input, common) { |
34491 | 862 |
|
863 |
var devkit_platform_revisions = { |
|
53556 | 864 |
linux_x64: "gcc7.3.0-OEL6.4+1.2", |
50702
2c9e2ec54a11
8205424: Change to Xcode 9.4 for building on Macosx at Oracle
erikj
parents:
50590
diff
changeset
|
865 |
macosx_x64: "Xcode9.4-MacOSX10.13+1.0", |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
34496
diff
changeset
|
866 |
solaris_x64: "SS12u4-Solaris11u1+1.0", |
51899
11fd6c8188d9
8211130: Change to Oracle Developer Studio 12.6 for building on Solaris at Oracle
erikj
parents:
51856
diff
changeset
|
867 |
solaris_sparcv9: "SS12u6-Solaris11u3+1.0", |
50273
737a17045ffe
8203795: Change default compiler on Windows to VS2017
erikj
parents:
50239
diff
changeset
|
868 |
windows_x64: "VS2017-15.5.5+1.0", |
53556 | 869 |
linux_aarch64: "gcc7.3.0-Fedora27+1.2", |
870 |
linux_arm: "gcc7.3.0-Fedora27+1.2" |
|
34491 | 871 |
}; |
872 |
||
873 |
var devkit_platform = (input.target_cpu == "x86" |
|
874 |
? input.target_os + "_x64" |
|
875 |
: input.target_platform); |
|
876 |
||
47364 | 877 |
var boot_jdk_platform = (input.build_os == "macosx" ? "osx" : input.build_os) |
878 |
+ "-" + input.build_cpu; |
|
53240 | 879 |
var boot_jdk_ext = (input.build_os == "windows" ? ".zip" : ".tar.gz") |
880 |
// If running in WSL and building for Windows, it will look like Linux, |
|
881 |
// but we need a Windows boot JDK. |
|
882 |
if (isWsl(input) && input.target_os == "windows") { |
|
883 |
boot_jdk_platform = "windows-" + input.build_cpu; |
|
884 |
boot_jdk_ext = ".zip"; |
|
885 |
} |
|
47364 | 886 |
|
48079
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
887 |
var makeBinDir = (input.build_os == "windows" |
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
888 |
? input.get("gnumake", "install_path") + "/cygwin/bin" |
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
889 |
: input.get("gnumake", "install_path") + "/bin"); |
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
890 |
|
34491 | 891 |
var dependencies = { |
892 |
||
893 |
boot_jdk: { |
|
47364 | 894 |
server: "jpg", |
895 |
product: "jdk", |
|
47365 | 896 |
version: common.boot_jdk_version, |
52509 | 897 |
build_number: "28", |
47365 | 898 |
file: "bundles/" + boot_jdk_platform + "/jdk-" + common.boot_jdk_version + "_" |
53240 | 899 |
+ boot_jdk_platform + "_bin" + boot_jdk_ext, |
41047
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
900 |
configure_args: "--with-boot-jdk=" + common.boot_jdk_home, |
43288
58b8748ef90d
8173476: Provide lldb from devkit when running tests on macosx
erikj
parents:
43049
diff
changeset
|
901 |
environment_path: common.boot_jdk_home + "/bin" |
34491 | 902 |
}, |
903 |
||
904 |
devkit: { |
|
905 |
organization: common.organization, |
|
906 |
ext: "tar.gz", |
|
907 |
module: "devkit-" + devkit_platform, |
|
52393
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52368
diff
changeset
|
908 |
revision: devkit_platform_revisions[devkit_platform], |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52368
diff
changeset
|
909 |
environment: { |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52368
diff
changeset
|
910 |
"DEVKIT_HOME": input.get("devkit", "home_path"), |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52368
diff
changeset
|
911 |
} |
34491 | 912 |
}, |
913 |
||
914 |
build_devkit: { |
|
915 |
organization: common.organization, |
|
916 |
ext: "tar.gz", |
|
917 |
module: "devkit-" + input.build_platform, |
|
918 |
revision: devkit_platform_revisions[input.build_platform] |
|
919 |
}, |
|
920 |
||
921 |
cups: { |
|
922 |
organization: common.organization, |
|
923 |
ext: "tar.gz", |
|
924 |
revision: "1.0118+1.0" |
|
925 |
}, |
|
926 |
||
927 |
jtreg: { |
|
928 |
server: "javare", |
|
36506 | 929 |
revision: "4.2", |
51280 | 930 |
build_number: "b13", |
34491 | 931 |
checksum_file: "MD5_VALUES", |
36506 | 932 |
file: "jtreg_bin-4.2.zip", |
41047
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
933 |
environment_name: "JT_HOME", |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
934 |
environment_path: input.get("jtreg", "install_path") + "/jtreg/bin" |
34491 | 935 |
}, |
936 |
||
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52588
diff
changeset
|
937 |
jmh: { |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52588
diff
changeset
|
938 |
organization: common.organization, |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52588
diff
changeset
|
939 |
ext: "tar.gz", |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52588
diff
changeset
|
940 |
revision: "1.21+1.0" |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52588
diff
changeset
|
941 |
}, |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52588
diff
changeset
|
942 |
|
52774
56ca125c973b
8214309: Enhance makefiles to allow generating JCov instrumented build
shurailine
parents:
52714
diff
changeset
|
943 |
jcov: { |
56ca125c973b
8214309: Enhance makefiles to allow generating JCov instrumented build
shurailine
parents:
52714
diff
changeset
|
944 |
server: "jpg", |
56ca125c973b
8214309: Enhance makefiles to allow generating JCov instrumented build
shurailine
parents:
52714
diff
changeset
|
945 |
product: "jcov", |
56ca125c973b
8214309: Enhance makefiles to allow generating JCov instrumented build
shurailine
parents:
52714
diff
changeset
|
946 |
version: "3.0", |
56ca125c973b
8214309: Enhance makefiles to allow generating JCov instrumented build
shurailine
parents:
52714
diff
changeset
|
947 |
build_number: "b07", |
56ca125c973b
8214309: Enhance makefiles to allow generating JCov instrumented build
shurailine
parents:
52714
diff
changeset
|
948 |
file: "bundles/jcov-3_0.zip", |
53526
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53423
diff
changeset
|
949 |
environment_name: "JCOV_HOME", |
52774
56ca125c973b
8214309: Enhance makefiles to allow generating JCov instrumented build
shurailine
parents:
52714
diff
changeset
|
950 |
}, |
56ca125c973b
8214309: Enhance makefiles to allow generating JCov instrumented build
shurailine
parents:
52714
diff
changeset
|
951 |
|
34491 | 952 |
gnumake: { |
953 |
organization: common.organization, |
|
954 |
ext: "tar.gz", |
|
955 |
revision: "4.0+1.0", |
|
956 |
||
957 |
module: (input.build_os == "windows" |
|
958 |
? "gnumake-" + input.build_osenv_platform |
|
959 |
: "gnumake-" + input.build_platform), |
|
960 |
||
48079
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
961 |
configure_args: "MAKE=" + makeBinDir + "/make", |
34491 | 962 |
|
48079
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
963 |
environment: { |
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
964 |
"MAKE": makeBinDir + "/make" |
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
965 |
}, |
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
966 |
|
eaa406097d93
8193060: Set MAKE env variable in jib profile for gnumake
ihse
parents:
48035
diff
changeset
|
967 |
environment_path: makeBinDir |
34491 | 968 |
}, |
969 |
||
48743
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
970 |
autoconf: { |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
971 |
organization: common.organization, |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
972 |
ext: "tar.gz", |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
973 |
revision: "2.69+1.0.1", |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
974 |
module: (input.build_os == "windows" |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
975 |
? "autoconf-" + input.build_osenv_platform |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
976 |
: "autoconf-" + input.build_platform), |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
977 |
configure_args: "", |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
978 |
environment_path: input.get("autoconf", "install_path") |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
979 |
}, |
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
980 |
|
44727 | 981 |
graphviz: { |
982 |
organization: common.organization, |
|
983 |
ext: "tar.gz", |
|
984 |
revision: "2.38.0-1+1.1", |
|
985 |
module: "graphviz-" + input.target_platform, |
|
45107 | 986 |
configure_args: "DOT=" + input.get("graphviz", "install_path") + "/dot", |
987 |
environment_path: input.get("graphviz", "install_path") |
|
44727 | 988 |
}, |
44734 | 989 |
|
990 |
pandoc: { |
|
991 |
organization: common.organization, |
|
992 |
ext: "tar.gz", |
|
52714
2e52aa822c57
8178317: Create man pages using pandoc from markdown sources
ihse
parents:
52595
diff
changeset
|
993 |
revision: "2.3.1+1.0", |
53240 | 994 |
module: "pandoc-" + input.build_platform, |
45107 | 995 |
configure_args: "PANDOC=" + input.get("pandoc", "install_path") + "/pandoc/pandoc", |
996 |
environment_path: input.get("pandoc", "install_path") + "/pandoc" |
|
44734 | 997 |
}, |
48743
ba52fa7bbf14
8195689: Remove generated-configure.sh and instead use autoconf
ihse
parents:
48357
diff
changeset
|
998 |
|
46196
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
999 |
// This adds java jib as a dependency for the test artifacts resolver |
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
1000 |
jib: { |
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
1001 |
organization: "com.oracle.java.jib", |
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
1002 |
ext: "zip", |
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
1003 |
classifier: "distribution", |
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
1004 |
revision: "3.0-SNAPSHOT", |
51856
11b9d3a6f31c
8211037: Load jib jars dynamically from JibArtifactManager
erikj
parents:
51466
diff
changeset
|
1005 |
environment_name: "JIB_HOME", |
46196
822ca950ddaa
8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents:
46193
diff
changeset
|
1006 |
environment_value: input.get("jib", "install_path") |
51856
11b9d3a6f31c
8211037: Load jib jars dynamically from JibArtifactManager
erikj
parents:
51466
diff
changeset
|
1007 |
+ "/jib-3.0-SNAPSHOT-distribution" |
49243 | 1008 |
}, |
1009 |
||
1010 |
ant: { |
|
1011 |
organization: common.organization, |
|
1012 |
ext: "zip", |
|
1013 |
revision: "1.7.1+1.0", |
|
1014 |
configure_args: "", |
|
1015 |
}, |
|
1016 |
||
50908 | 1017 |
graalunit_lib: { |
1018 |
organization: common.organization, |
|
1019 |
ext: "zip", |
|
1020 |
revision: "619_Apr_12_2018", |
|
1021 |
module: "graalunit-lib", |
|
1022 |
configure_args: "--with-graalunit-lib=" + input.get("graalunit_lib", "install_path"), |
|
1023 |
environment_name: "GRAALUNIT_LIB" |
|
1024 |
}, |
|
34491 | 1025 |
}; |
1026 |
||
1027 |
return dependencies; |
|
1028 |
}; |
|
1029 |
||
1030 |
/** |
|
1031 |
* Generate the missing platform attributes for profiles |
|
1032 |
* |
|
1033 |
* @param profiles Profiles map to generate attributes on |
|
1034 |
* @returns {{}} New profiles map with platform attributes fully filled in |
|
1035 |
*/ |
|
1036 |
var generatePlatformAttributes = function (profiles) { |
|
1037 |
var ret = concatObjects(profiles, {}); |
|
1038 |
for (var profile in profiles) { |
|
1039 |
if (ret[profile].build_os == null) { |
|
1040 |
ret[profile].build_os = ret[profile].target_os; |
|
1041 |
} |
|
1042 |
if (ret[profile].build_cpu == null) { |
|
1043 |
ret[profile].build_cpu = ret[profile].target_cpu; |
|
1044 |
} |
|
1045 |
ret[profile].target_platform = ret[profile].target_os + "_" + ret[profile].target_cpu; |
|
1046 |
ret[profile].build_platform = ret[profile].build_os + "_" + ret[profile].build_cpu; |
|
1047 |
} |
|
1048 |
return ret; |
|
1049 |
}; |
|
1050 |
||
1051 |
/** |
|
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1052 |
* The default_make_targets attribute on a profile is not a real Jib attribute. |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1053 |
* This function rewrites that attribute into the corresponding configure arg. |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1054 |
* Calling this function multiple times on the same profiles object is safe. |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1055 |
* |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1056 |
* @param common Common values |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1057 |
* @param profiles Profiles map to rewrite profiles for |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1058 |
* @returns {{}} New map of profiles with the make targets converted |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1059 |
*/ |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1060 |
var generateDefaultMakeTargetsConfigureArg = function (common, profiles) { |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1061 |
var ret = concatObjects(profiles, {}); |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1062 |
for (var profile in ret) { |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1063 |
if (ret[profile]["default_make_targets"] != null) { |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1064 |
var targetsString = concat(ret[profile].default_make_targets).join(" "); |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1065 |
// Iterate over all configure args and see if --with-default-make-target |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1066 |
// is already there and change it, otherwise add it. |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1067 |
var found = false; |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1068 |
for (var i in ret[profile].configure_args) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1069 |
var arg = ret[profile].configure_args[i]; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1070 |
if (arg != null && arg.startsWith("--with-default-make-target=")) { |
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1071 |
found = true; |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1072 |
ret[profile].configure_args[i] |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1073 |
= "--with-default-make-target=" + targetsString; |
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1074 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1075 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1076 |
if (!found) { |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1077 |
ret[profile].configure_args = concat( |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1078 |
ret[profile].configure_args, |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1079 |
"--with-default-make-target=" + targetsString); |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1080 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1081 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1082 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1083 |
return ret; |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1084 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1085 |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1086 |
var getBuildId = function (input) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1087 |
if (input.build_id != null) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1088 |
return input.build_id; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1089 |
} else { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1090 |
var topdir = new java.io.File(__DIR__, "../..").getCanonicalFile().getName(); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1091 |
var userName = java.lang.System.getProperty("user.name"); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1092 |
return userName + "." + topdir; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1093 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1094 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1095 |
|
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
1096 |
/** |
34491 | 1097 |
* Deep clones an object tree. |
1098 |
* |
|
1099 |
* @param o Object to clone |
|
1100 |
* @returns {{}} Clone of o |
|
1101 |
*/ |
|
1102 |
var clone = function (o) { |
|
1103 |
return JSON.parse(JSON.stringify(o)); |
|
1104 |
}; |
|
1105 |
||
1106 |
/** |
|
1107 |
* Concatenates all arguments into a new array |
|
1108 |
* |
|
1109 |
* @returns {Array.<T>} New array containing all arguments |
|
1110 |
*/ |
|
1111 |
var concat = function () { |
|
1112 |
return Array.prototype.concat.apply([], arguments); |
|
1113 |
}; |
|
1114 |
||
1115 |
/** |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1116 |
* Takes a String or Array of Strings and does a replace operation on each |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1117 |
* of them. |
34491 | 1118 |
* |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1119 |
* @param pattern Pattern to look for |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1120 |
* @param replacement Replacement text to insert |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1121 |
* @param a String or Array of Strings to replace |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1122 |
* @returns {Array} Either a new array or a new string depending on the input |
34491 | 1123 |
*/ |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1124 |
var replaceAll = function (pattern, replacement, a) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1125 |
// If a is an array |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1126 |
if (Array === a.constructor) { |
34491 | 1127 |
var newA = []; |
1128 |
for (var i in a) { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1129 |
newA.push(a[i].replace(pattern, replacement)); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1130 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1131 |
return newA; |
34491 | 1132 |
} else { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1133 |
return a.replace(pattern, replacement); |
34491 | 1134 |
} |
1135 |
}; |
|
1136 |
||
1137 |
/** |
|
1138 |
* Deep concatenation of two objects. For each node encountered, merge |
|
1139 |
* the contents with the corresponding node in the other object tree, |
|
1140 |
* treating all strings as array elements. |
|
1141 |
* |
|
1142 |
* @param o1 Object to concatenate |
|
1143 |
* @param o2 Object to concatenate |
|
1144 |
* @returns {{}} New object tree containing the concatenation of o1 and o2 |
|
1145 |
*/ |
|
1146 |
var concatObjects = function (o1, o2) { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1147 |
if (o1 == null) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1148 |
return clone(o2); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1149 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1150 |
if (o2 == null) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1151 |
return clone(o1); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1152 |
} |
34491 | 1153 |
var ret = {}; |
1154 |
for (var a in o1) { |
|
1155 |
if (o2[a] == null) { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1156 |
ret[a] = clone(o1[a]); |
34491 | 1157 |
} |
1158 |
} |
|
1159 |
for (var a in o2) { |
|
1160 |
if (o1[a] == null) { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1161 |
ret[a] = clone(o2[a]); |
34491 | 1162 |
} else { |
1163 |
if (typeof o1[a] == 'string') { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1164 |
ret[a] = clone([o1[a]].concat(o2[a])); |
34491 | 1165 |
} else if (Array.isArray(o1[a])) { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1166 |
ret[a] = clone(o1[a].concat(o2[a])); |
34491 | 1167 |
} else if (typeof o1[a] == 'object') { |
1168 |
ret[a] = concatObjects(o1[a], o2[a]); |
|
1169 |
} |
|
1170 |
} |
|
1171 |
} |
|
1172 |
return ret; |
|
1173 |
}; |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1174 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1175 |
/** |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1176 |
* Constructs the numeric version string from reading the |
47928
fb62d4519338
8191715: Update documentation pointing to "common" directory
ihse
parents:
47825
diff
changeset
|
1177 |
* make/autoconf/version-numbers file and removing all trailing ".0". |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1178 |
* |
48327 | 1179 |
* @param feature Override feature version |
1180 |
* @param interim Override interim version |
|
1181 |
* @param update Override update version |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1182 |
* @param patch Override patch version |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1183 |
* @returns {String} The numeric version string |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1184 |
*/ |
48327 | 1185 |
var getVersion = function (feature, interim, update, patch) { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1186 |
var version_numbers = getVersionNumbers(); |
48327 | 1187 |
var version = (feature != null ? feature : version_numbers.get("DEFAULT_VERSION_FEATURE")) |
1188 |
+ "." + (interim != null ? interim : version_numbers.get("DEFAULT_VERSION_INTERIM")) |
|
1189 |
+ "." + (update != null ? update : version_numbers.get("DEFAULT_VERSION_UPDATE")) |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1190 |
+ "." + (patch != null ? patch : version_numbers.get("DEFAULT_VERSION_PATCH")); |
43600 | 1191 |
while (version.match(".*\\.0$")) { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1192 |
version = version.substring(0, version.length - 2); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1193 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1194 |
return version; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1195 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1196 |
|
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1197 |
/** |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1198 |
* Constructs the common version configure args based on build type and |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1199 |
* other version inputs |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1200 |
*/ |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1201 |
var versionArgs = function(input, common) { |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1202 |
var args = ["--with-version-build=" + common.build_number]; |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1203 |
if (input.build_type == "promoted") { |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1204 |
args = concat(args, |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1205 |
// This needs to be changed when we start building release candidates |
48773 | 1206 |
// with-version-pre must be set to ea for 'ea' and empty for fcs build |
51466
d222f503b7fe
8209760: merge error: restore ea in make/conf/jib-profiles.js
tbell
parents:
51464
diff
changeset
|
1207 |
"--with-version-pre=ea", |
45048
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1208 |
"--without-version-opt"); |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1209 |
} else { |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1210 |
args = concat(args, "--with-version-opt=" + common.build_id); |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1211 |
} |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1212 |
return args; |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1213 |
} |
665cd82e98dc
8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents:
44894
diff
changeset
|
1214 |
|
47928
fb62d4519338
8191715: Update documentation pointing to "common" directory
ihse
parents:
47825
diff
changeset
|
1215 |
// Properties representation of the make/autoconf/version-numbers file. Lazily |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1216 |
// initiated by the function below. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1217 |
var version_numbers; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1218 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1219 |
/** |
47928
fb62d4519338
8191715: Update documentation pointing to "common" directory
ihse
parents:
47825
diff
changeset
|
1220 |
* Read the make/autoconf/version-numbers file into a Properties object. |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1221 |
* |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1222 |
* @returns {java.utilProperties} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1223 |
*/ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1224 |
var getVersionNumbers = function () { |
47928
fb62d4519338
8191715: Update documentation pointing to "common" directory
ihse
parents:
47825
diff
changeset
|
1225 |
// Read version information from make/autoconf/version-numbers |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1226 |
if (version_numbers == null) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1227 |
version_numbers = new java.util.Properties(); |
47217 | 1228 |
var stream = new java.io.FileInputStream(__DIR__ + "/../autoconf/version-numbers"); |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1229 |
version_numbers.load(stream); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1230 |
stream.close(); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1231 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1232 |
return version_numbers; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1233 |
} |
53240 | 1234 |
|
1235 |
/** |
|
1236 |
* Returns true if running in Windows Subsystem for Linux. Jib does not yet |
|
1237 |
* detect wsl as osenv, so fall back on linux with version containing Microsoft. |
|
1238 |
*/ |
|
1239 |
var isWsl = function (input) { |
|
1240 |
return ( input.build_osenv == "wsl" |
|
1241 |
|| (input.build_os == "linux" |
|
1242 |
&& java.lang.System.getProperty("os.version").contains("Microsoft"))); |
|
1243 |
} |