519 var maketestName = name + "-testmake"; |
519 var maketestName = name + "-testmake"; |
520 profiles[maketestName] = concatObjects(profiles[name], testmakeBase); |
520 profiles[maketestName] = concatObjects(profiles[name], testmakeBase); |
521 profiles[maketestName].default_make_targets = [ "test-make" ]; |
521 profiles[maketestName].default_make_targets = [ "test-make" ]; |
522 }); |
522 }); |
523 |
523 |
|
524 // Generate -gcov profiles |
|
525 [ "linux-x64", "macosx-x64" ].forEach(function (name) { |
|
526 var gcovName = name + "-gcov"; |
|
527 profiles[gcovName] = clone(profiles[name]); |
|
528 profiles[gcovName].default_make_targets = ["product-bundles", "test-bundles"]; |
|
529 profiles[gcovName].configure_args = concat(profiles[gcovName].configure_args, |
|
530 ["--enable-native-coverage", "--disable-warnings-as-errors"]); |
|
531 }); |
|
532 |
524 // Profiles for building the zero jvm variant. These are used for verification. |
533 // Profiles for building the zero jvm variant. These are used for verification. |
525 var zeroProfiles = { |
534 var zeroProfiles = { |
526 "linux-x64-zero": { |
535 "linux-x64-zero": { |
527 target_os: "linux", |
536 target_os: "linux", |
528 target_cpu: "x64", |
537 target_cpu: "x64", |
770 exploded: "images/jdk-jcov" |
779 exploded: "images/jdk-jcov" |
771 } |
780 } |
772 }; |
781 }; |
773 }); |
782 }); |
774 |
783 |
|
784 // Artifacts of gcov (native-code-coverage) profiles |
|
785 [ "linux-x64", "macosx-x64" ].forEach(function (name) { |
|
786 var o = artifactData[name] |
|
787 var pf = o.platform |
|
788 var jdk_subdir = (o.jdk_subdir != null ? o.jdk_subdir : "jdk-" + data.version); |
|
789 var jdk_suffix = (o.jdk_suffix != null ? o.jdk_suffix : "tar.gz"); |
|
790 var gcovName = name + "-gcov"; |
|
791 profiles[gcovName].artifacts = { |
|
792 jdk: { |
|
793 local: "bundles/\\(jdk.*bin." + jdk_suffix + "\\)", |
|
794 remote: [ |
|
795 "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-gcov." + jdk_suffix, |
|
796 ], |
|
797 subdir: jdk_subdir, |
|
798 exploded: "images/jdk", |
|
799 }, |
|
800 test: { |
|
801 local: "bundles/\\(jdk.*bin-tests.tar.gz\\)", |
|
802 remote: [ |
|
803 "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-gcov-tests.tar.gz", |
|
804 ], |
|
805 exploded: "images/test" |
|
806 }, |
|
807 jdk_symbols: { |
|
808 local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)", |
|
809 remote: [ |
|
810 "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-gcov-symbols.tar.gz", |
|
811 ], |
|
812 subdir: jdk_subdir, |
|
813 exploded: "images/jdk" |
|
814 }, |
|
815 }; |
|
816 }); |
|
817 |
775 // Profiles used to run tests. |
818 // Profiles used to run tests. |
776 var testOnlyProfiles = { |
819 var testOnlyProfiles = { |
777 "run-test": { |
820 "run-test": { |
778 target_os: input.build_os, |
821 target_os: input.build_os, |
779 target_cpu: input.build_cpu, |
822 target_cpu: input.build_cpu, |
796 if (testedProfile.endsWith("-jcov")) { |
839 if (testedProfile.endsWith("-jcov")) { |
797 testedProfileTest = testedProfile.substring(0, testedProfile.length - "-jcov".length) + ".test"; |
840 testedProfileTest = testedProfile.substring(0, testedProfile.length - "-jcov".length) + ".test"; |
798 } else { |
841 } else { |
799 testedProfileTest = testedProfile + ".test"; |
842 testedProfileTest = testedProfile + ".test"; |
800 } |
843 } |
|
844 var testOnlyMake = [ "run-test-prebuilt", "LOG_CMDLINES=true", "JTREG_VERBOSE=fail,error,time" ]; |
|
845 if (testedProfile.endsWith("-gcov")) { |
|
846 testOnlyMake = concat(testOnlyMake, "GCOV_ENABLED=true") |
|
847 } |
801 var testOnlyProfilesPrebuilt = { |
848 var testOnlyProfilesPrebuilt = { |
802 "run-test-prebuilt": { |
849 "run-test-prebuilt": { |
803 target_os: input.build_os, |
850 target_os: input.build_os, |
804 target_cpu: input.build_cpu, |
851 target_cpu: input.build_cpu, |
805 dependencies: [ |
852 dependencies: [ |
806 "jtreg", "gnumake", "boot_jdk", "devkit", "jib", "jcov", testedProfileJDK, |
853 "jtreg", "gnumake", "boot_jdk", "devkit", "jib", "jcov", testedProfileJDK, |
807 testedProfileTest |
854 testedProfileTest |
808 ], |
855 ], |
809 src: "src.conf", |
856 src: "src.conf", |
810 make_args: [ "run-test-prebuilt", "LOG_CMDLINES=true", "JTREG_VERBOSE=fail,error,time" ], |
857 make_args: testOnlyMake, |
811 environment: { |
858 environment: { |
812 "BOOT_JDK": common.boot_jdk_home, |
859 "BOOT_JDK": common.boot_jdk_home, |
813 "JDK_IMAGE_DIR": input.get(testedProfileJDK, "home_path"), |
860 "JDK_IMAGE_DIR": input.get(testedProfileJDK, "home_path"), |
814 "TEST_IMAGE_DIR": input.get(testedProfileTest, "home_path") |
861 "TEST_IMAGE_DIR": input.get(testedProfileTest, "home_path") |
815 }, |
862 }, |