--- old/make/RunTests.gmk 2019-01-25 08:07:02.167826934 -0800 +++ new/make/RunTests.gmk 2019-01-25 08:07:01.911826935 -0800 @@ -119,10 +119,8 @@ JCOV_REPORT := $(JCOV_OUTPUT_DIR)/report JCOV_MEM_OPTIONS := -Xms64m -Xmx4g - ifneq ($(JCOV_IMAGE_DIR), ) - # Replace our normal test JDK with the JCov image, if present. - JDK_UNDER_TEST := $(JCOV_IMAGE_DIR) - endif + # Replace our normal test JDK with the JCov image, if present. + JDK_UNDER_TEST := $(JCOV_IMAGE_DIR) JCOV_ENVIRONMENT := JAVA_TOOL_OPTIONS="$(JCOV_MEM_OPTIONS)" \ _JAVA_OPTIONS="$(JCOV_MEM_OPTIONS)" --- old/make/RunTestsPrebuilt.gmk 2019-01-25 08:07:02.735826932 -0800 +++ new/make/RunTestsPrebuilt.gmk 2019-01-25 08:07:02.479826933 -0800 @@ -95,12 +95,12 @@ # $1: The output file name # $2..$N: The lines to output to the file define CreateNewSpec - $(if $(strip $(31)), \ + $(if $(strip $(33)), \ $(error Internal makefile error: \ Too many arguments to macro, please update CreateNewSpec in RunTestsPrebuilt.gmk) \ ) \ $(shell $(RM) $1) \ - $(foreach i, $(call sequence, 2, 30), \ + $(foreach i, $(call sequence, 2, 32), \ $(if $(strip $($i)), \ $(call AppendFile, $(strip $($i)), $1) \ ) \ @@ -275,6 +275,14 @@ LD := ld endif +ifneq ($(wildcard $(JDK_IMAGE_DIR)/template.xml), ) + TEST_OPTS_JCOV := true + JCOV_IMAGE_DIR := $(JDK_IMAGE_DIR) +else + TEST_OPTS_JCOV := false + JCOV_IMAGE_DIR := +endif + ################################################################################ # Generate the ephemeral spec file ################################################################################ @@ -295,6 +303,7 @@ BOOT_JDK := $(BOOT_JDK), \ JT_HOME := $(JT_HOME), \ JDK_IMAGE_DIR := $(JDK_IMAGE_DIR), \ + JCOV_IMAGE_DIR := $(JCOV_IMAGE_DIR), \ TEST_IMAGE_DIR := $(TEST_IMAGE_DIR), \ SYMBOLS_IMAGE_DIR := $(SYMBOLS_IMAGE_DIR), \ MAKE := $(MAKE), \ @@ -315,6 +324,7 @@ LIBRARY_PREFIX := $(LIBRARY_PREFIX), \ SHARED_LIBRARY_SUFFIX := $(SHARED_LIBRARY_SUFFIX), \ include $(TOPDIR)/make/RunTestsPrebuiltSpec.gmk, \ + TEST_OPTS_JCOV := $(TEST_OPTS_JCOV), \ $(CUSTOM_NEW_SPEC_LINE), \ ) --- old/make/conf/jib-profiles.js 2019-01-25 08:07:03.299826930 -0800 +++ new/make/conf/jib-profiles.js 2019-01-25 08:07:03.043826931 -0800 @@ -760,20 +760,27 @@ if (testedProfile == null) { testedProfile = input.build_os + "-" + input.build_cpu; } + var testedProfileJDK = testedProfile + ".jdk"; + var testedProfileTest = "" + if (testedProfile.endsWith("-jcov")) { + testedProfileTest = testedProfile.substring(0, testedProfile.length - "-jcov".length) + ".test"; + } else { + testedProfileTest = testedProfile + ".test"; + } var testOnlyProfilesPrebuilt = { "run-test-prebuilt": { target_os: input.build_os, target_cpu: input.build_cpu, dependencies: [ - "jtreg", "gnumake", "boot_jdk", "devkit", "jib", testedProfile + ".jdk", - testedProfile + ".test" + "jtreg", "gnumake", "boot_jdk", "devkit", "jib", "jcov", testedProfileJDK, + testedProfileTest ], src: "src.conf", make_args: [ "run-test-prebuilt", "LOG_CMDLINES=true", "JTREG_VERBOSE=fail,error,time" ], environment: { "BOOT_JDK": common.boot_jdk_home, - "JDK_IMAGE_DIR": input.get(testedProfile + ".jdk", "home_path"), - "TEST_IMAGE_DIR": input.get(testedProfile + ".test", "home_path") + "JDK_IMAGE_DIR": input.get(testedProfileJDK, "home_path"), + "TEST_IMAGE_DIR": input.get(testedProfileTest, "home_path") }, labels: "test" } @@ -939,6 +946,7 @@ version: "3.0", build_number: "b07", file: "bundles/jcov-3_0.zip", + environment_name: "JCOV_HOME", }, gnumake: {