< prev index next >

common/conf/jib-profiles.js

Print this page




 207 
 208 /**
 209  * Generates some common values
 210  *
 211  * @param input External data to use for generating the configuration
 212  * @returns Common values
 213  */
 214 var getJibProfilesCommon = function (input) {
 215     var common = {};
 216 
 217     common.dependencies = ["boot_jdk", "gnumake", "jtreg"],
 218     common.default_make_targets = ["product-bundles", "test-bundles"],
 219     common.default_make_targets_debug = common.default_make_targets;
 220     common.default_make_targets_slowdebug = common.default_make_targets;
 221     common.configure_args = ["--enable-jtreg-failure-handler"],
 222     common.configure_args_32bit = ["--with-target-bits=32"],
 223     common.configure_args_debug = ["--enable-debug"],
 224     common.configure_args_slowdebug = ["--with-debug-level=slowdebug"],
 225     common.organization = "jpg.infra.builddeps"
 226 

















 227     return common;
 228 };
 229 
 230 /**
 231  * Generates the profiles part of the configuration.
 232  *
 233  * @param input External data to use for generating the configuration
 234  * @param common The common values
 235  * @returns {{}} Profiles part of the configuration
 236  */
 237 var getJibProfilesProfiles = function (input, common) {
 238     var profiles = {};
 239 
 240     // Main SE profiles
 241     var mainProfiles = {
 242 
 243         "linux-x64": {
 244             target_os: "linux",
 245             target_cpu: "x64",
 246             dependencies: concat(common.dependencies, "devkit"),


 316             default_make_targets: "profiles"
 317         },
 318 
 319         "linux-x86-open": {
 320             default_make_targets: "profiles",
 321             configure_args: "--with-jvm-variants=client,server"
 322         }
 323     };
 324     var openOnlyProfiles = concatObjects(openOnlyProfiles, openOnlyProfilesExtra);
 325 
 326     profiles = concatObjects(profiles, openOnlyProfiles);
 327     // Generate debug profiles for the open jprt profiles
 328     profiles = concatObjects(profiles, generateDebugProfiles(common, openOnlyProfiles));
 329 
 330     // Profiles used to run tests. Used in JPRT.
 331     var testOnlyProfiles = {
 332 
 333         "run-test": {
 334             target_os: input.build_os,
 335             target_cpu: input.build_cpu,
 336             dependencies: [ "jtreg", "gnumake" ],
 337             labels: "test"



 338         }
 339     };
 340     profiles = concatObjects(profiles, testOnlyProfiles);
 341 
 342     // Generate the missing platform attributes
 343     profiles = generatePlatformAttributes(profiles);
 344     profiles = generateDefaultMakeTargetsConfigureArg(common, profiles);
 345     return profiles;
 346 };
 347 
 348 /**
 349  * Generate the dependencies part of the configuration
 350  *
 351  * @param input External data to use for generating the configuration
 352  * @param common The common values
 353  * @returns {{}} Dependencies part of configuration
 354  */
 355 var getJibProfilesDependencies = function (input, common) {
 356 
 357     var boot_jdk_platform = input.build_os + "-"
 358         + (input.build_cpu == "x86" ? "i586" : input.build_cpu);
 359 
 360     var boot_jdk_revision = "8";
 361     var boot_jdk_subdirpart = "1.8.0";
 362     // JDK 8 does not work on sparc M7 cpus, need a newer update when building
 363     // on such hardware.
 364     if (input.build_cpu == "sparcv9") {
 365        var cpu_brand = $EXEC("bash -c \"kstat -m cpu_info | grep brand | head -n1 | awk '{ print \$2 }'\"");
 366        if (cpu_brand.trim() == 'SPARC-M7') {
 367            boot_jdk_revision = "8u20";
 368            boot_jdk_subdirpart = "1.8.0_20";
 369        }
 370     }
 371 
 372     var devkit_platform_revisions = {
 373         linux_x64: "gcc4.9.2-OEL6.4+1.0",
 374         macosx_x64: "Xcode6.3-MacOSX10.9+1.0",
 375         solaris_x64: "SS12u4-Solaris11u1+1.0",
 376         solaris_sparcv9: "SS12u4-Solaris11u1+1.0",
 377         windows_x64: "VS2013SP4+1.0"
 378     };
 379 
 380     var devkit_platform = (input.target_cpu == "x86"
 381         ? input.target_os + "_x64"
 382         : input.target_platform);
 383 
 384     var dependencies = {
 385 
 386         boot_jdk: {
 387             server: "javare",
 388             module: "jdk",
 389             revision: boot_jdk_revision,
 390             checksum_file: boot_jdk_platform + "/MD5_VALUES",
 391             file: boot_jdk_platform + "/jdk-" + boot_jdk_revision + "-" + boot_jdk_platform + ".tar.gz",
 392             configure_args: (input.build_os == "macosx"
 393                 ? "--with-boot-jdk=" + input.get("boot_jdk", "install_path") + "/jdk" + boot_jdk_subdirpart + ".jdk/Contents/Home"
 394                 : "--with-boot-jdk=" + input.get("boot_jdk", "install_path") + "/jdk" + boot_jdk_subdirpart)
 395         },
 396 
 397         devkit: {
 398             organization: common.organization,
 399             ext: "tar.gz",
 400             module: "devkit-" + devkit_platform,
 401             revision: devkit_platform_revisions[devkit_platform]
 402         },
 403 
 404         build_devkit: {
 405             organization: common.organization,
 406             ext: "tar.gz",
 407             module: "devkit-" + input.build_platform,
 408             revision: devkit_platform_revisions[input.build_platform]
 409         },
 410 
 411         cups: {
 412             organization: common.organization,
 413             ext: "tar.gz",
 414             revision: "1.0118+1.0"
 415         },
 416 
 417         jtreg: {
 418             server: "javare",
 419             revision: "4.2",
 420             build_number: "b03",
 421             checksum_file: "MD5_VALUES",
 422             file: "jtreg_bin-4.2.zip",
 423             environment_name: "JT_HOME"

 424         },
 425 
 426         gnumake: {
 427             organization: common.organization,
 428             ext: "tar.gz",
 429             revision: "4.0+1.0",
 430 
 431             module: (input.build_os == "windows"
 432                 ? "gnumake-" + input.build_osenv_platform
 433                 : "gnumake-" + input.build_platform),
 434 
 435             configure_args: (input.build_os == "windows"
 436                 ? "MAKE=" + input.get("gnumake", "install_path") + "/cygwin/bin/make"
 437                 : "MAKE=" + input.get("gnumake", "install_path") + "/bin/make"),
 438 
 439             environment_path: (input.build_os == "windows"
 440                 ? input.get("gnumake", "install_path") + "/cygwin/bin"
 441                 : input.get("gnumake", "install_path") + "/bin")
 442         },
 443 




 207 
 208 /**
 209  * Generates some common values
 210  *
 211  * @param input External data to use for generating the configuration
 212  * @returns Common values
 213  */
 214 var getJibProfilesCommon = function (input) {
 215     var common = {};
 216 
 217     common.dependencies = ["boot_jdk", "gnumake", "jtreg"],
 218     common.default_make_targets = ["product-bundles", "test-bundles"],
 219     common.default_make_targets_debug = common.default_make_targets;
 220     common.default_make_targets_slowdebug = common.default_make_targets;
 221     common.configure_args = ["--enable-jtreg-failure-handler"],
 222     common.configure_args_32bit = ["--with-target-bits=32"],
 223     common.configure_args_debug = ["--enable-debug"],
 224     common.configure_args_slowdebug = ["--with-debug-level=slowdebug"],
 225     common.organization = "jpg.infra.builddeps"
 226 
 227     var boot_jdk_revision = "8";
 228     var boot_jdk_subdirpart = "1.8.0";
 229     // JDK 8 does not work on sparc M7 cpus, need a newer update when building
 230     // on such hardware.
 231     if (input.build_cpu == "sparcv9") {
 232        var cpu_brand = $EXEC("bash -c \"kstat -m cpu_info | grep brand | head -n1 | awk '{ print \$2 }'\"");
 233        if (cpu_brand.trim() == 'SPARC-M7') {
 234            boot_jdk_revision = "8u20";
 235            boot_jdk_subdirpart = "1.8.0_20";
 236        }
 237     }
 238     common.boot_jdk_revision = boot_jdk_revision;
 239     common.boot_jdk_subdirpart = boot_jdk_subdirpart;
 240     common.boot_jdk_home = input.get("boot_jdk", "home_path") + "/jdk"
 241         + common.boot_jdk_subdirpart
 242         + (input.build_os == "macosx" ? ".jdk/Contents/Home" : "");
 243 
 244     return common;
 245 };
 246 
 247 /**
 248  * Generates the profiles part of the configuration.
 249  *
 250  * @param input External data to use for generating the configuration
 251  * @param common The common values
 252  * @returns {{}} Profiles part of the configuration
 253  */
 254 var getJibProfilesProfiles = function (input, common) {
 255     var profiles = {};
 256 
 257     // Main SE profiles
 258     var mainProfiles = {
 259 
 260         "linux-x64": {
 261             target_os: "linux",
 262             target_cpu: "x64",
 263             dependencies: concat(common.dependencies, "devkit"),


 333             default_make_targets: "profiles"
 334         },
 335 
 336         "linux-x86-open": {
 337             default_make_targets: "profiles",
 338             configure_args: "--with-jvm-variants=client,server"
 339         }
 340     };
 341     var openOnlyProfiles = concatObjects(openOnlyProfiles, openOnlyProfilesExtra);
 342 
 343     profiles = concatObjects(profiles, openOnlyProfiles);
 344     // Generate debug profiles for the open jprt profiles
 345     profiles = concatObjects(profiles, generateDebugProfiles(common, openOnlyProfiles));
 346 
 347     // Profiles used to run tests. Used in JPRT.
 348     var testOnlyProfiles = {
 349 
 350         "run-test": {
 351             target_os: input.build_os,
 352             target_cpu: input.build_cpu,
 353             dependencies: [ "jtreg", "gnumake", "boot_jdk" ],
 354             labels: "test",
 355             environment: {
 356                 "JT_JAVA": common.boot_jdk_home
 357             }
 358         }
 359     };
 360     profiles = concatObjects(profiles, testOnlyProfiles);
 361 
 362     // Generate the missing platform attributes
 363     profiles = generatePlatformAttributes(profiles);
 364     profiles = generateDefaultMakeTargetsConfigureArg(common, profiles);
 365     return profiles;
 366 };
 367 
 368 /**
 369  * Generate the dependencies part of the configuration
 370  *
 371  * @param input External data to use for generating the configuration
 372  * @param common The common values
 373  * @returns {{}} Dependencies part of configuration
 374  */
 375 var getJibProfilesDependencies = function (input, common) {
 376 
 377     var boot_jdk_platform = input.build_os + "-"
 378         + (input.build_cpu == "x86" ? "i586" : input.build_cpu);
 379 












 380     var devkit_platform_revisions = {
 381         linux_x64: "gcc4.9.2-OEL6.4+1.0",
 382         macosx_x64: "Xcode6.3-MacOSX10.9+1.0",
 383         solaris_x64: "SS12u4-Solaris11u1+1.0",
 384         solaris_sparcv9: "SS12u4-Solaris11u1+1.0",
 385         windows_x64: "VS2013SP4+1.0"
 386     };
 387 
 388     var devkit_platform = (input.target_cpu == "x86"
 389         ? input.target_os + "_x64"
 390         : input.target_platform);
 391 
 392     var dependencies = {
 393 
 394         boot_jdk: {
 395             server: "javare",
 396             module: "jdk",
 397             revision: common.boot_jdk_revision,
 398             checksum_file: boot_jdk_platform + "/MD5_VALUES",
 399             file: boot_jdk_platform + "/jdk-" + common.boot_jdk_revision
 400                 + "-" + boot_jdk_platform + ".tar.gz",
 401             configure_args: "--with-boot-jdk=" + common.boot_jdk_home,
 402             environment_path: common.boot_jdk_home
 403         },
 404 
 405         devkit: {
 406             organization: common.organization,
 407             ext: "tar.gz",
 408             module: "devkit-" + devkit_platform,
 409             revision: devkit_platform_revisions[devkit_platform]
 410         },
 411 
 412         build_devkit: {
 413             organization: common.organization,
 414             ext: "tar.gz",
 415             module: "devkit-" + input.build_platform,
 416             revision: devkit_platform_revisions[input.build_platform]
 417         },
 418 
 419         cups: {
 420             organization: common.organization,
 421             ext: "tar.gz",
 422             revision: "1.0118+1.0"
 423         },
 424 
 425         jtreg: {
 426             server: "javare",
 427             revision: "4.2",
 428             build_number: "b03",
 429             checksum_file: "MD5_VALUES",
 430             file: "jtreg_bin-4.2.zip",
 431             environment_name: "JT_HOME",
 432             environment_path: input.get("jtreg", "install_path") + "/jtreg/bin"
 433         },
 434 
 435         gnumake: {
 436             organization: common.organization,
 437             ext: "tar.gz",
 438             revision: "4.0+1.0",
 439 
 440             module: (input.build_os == "windows"
 441                 ? "gnumake-" + input.build_osenv_platform
 442                 : "gnumake-" + input.build_platform),
 443 
 444             configure_args: (input.build_os == "windows"
 445                 ? "MAKE=" + input.get("gnumake", "install_path") + "/cygwin/bin/make"
 446                 : "MAKE=" + input.get("gnumake", "install_path") + "/bin/make"),
 447 
 448             environment_path: (input.build_os == "windows"
 449                 ? input.get("gnumake", "install_path") + "/cygwin/bin"
 450                 : input.get("gnumake", "install_path") + "/bin")
 451         },
 452 


< prev index next >