8241421: Cleanup handling of jtreg

Reviewed-by: erikj
This commit is contained in:
Magnus Ihse Bursie 2020-03-31 14:58:18 +02:00
parent 16df851efd
commit 75849a5ca0
4 changed files with 6 additions and 16 deletions

View File

@ -762,7 +762,6 @@ OBJCOPY:=@OBJCOPY@
SETFILE:=@SETFILE@ SETFILE:=@SETFILE@
XATTR:=@XATTR@ XATTR:=@XATTR@
JT_HOME:=@JT_HOME@ JT_HOME:=@JT_HOME@
JTREGEXE:=@JTREGEXE@
JIB_HOME:=@JIB_HOME@ JIB_HOME:=@JIB_HOME@
XCODEBUILD=@XCODEBUILD@ XCODEBUILD=@XCODEBUILD@
DTRACE := @DTRACE@ DTRACE := @DTRACE@

View File

@ -1092,15 +1092,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home]) AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home])
fi fi
JTREGEXE="$JT_HOME/bin/jtreg"
if test ! -x "$JTREGEXE"; then
AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable])
fi
AC_MSG_CHECKING([for jtreg test harness]) AC_MSG_CHECKING([for jtreg test harness])
AC_MSG_RESULT([$JT_HOME]) AC_MSG_RESULT([$JT_HOME])
else else
# Try to locate jtreg # Try to locate jtreg using the JT_HOME environment variable
if test "x$JT_HOME" != x; then if test "x$JT_HOME" != x; then
# JT_HOME set in environment, use it # JT_HOME set in environment, use it
if test ! -d "$JT_HOME"; then if test ! -d "$JT_HOME"; then
@ -1110,11 +1105,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
if test ! -e "$JT_HOME/lib/jtreg.jar"; then if test ! -e "$JT_HOME/lib/jtreg.jar"; then
AC_MSG_WARN([Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME]) AC_MSG_WARN([Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME])
JT_HOME= JT_HOME=
elif test ! -x "$JT_HOME/bin/jtreg"; then
AC_MSG_WARN([Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME])
JT_HOME=
else else
JTREGEXE="$JT_HOME/bin/jtreg"
AC_MSG_NOTICE([Located jtreg using JT_HOME from environment]) AC_MSG_NOTICE([Located jtreg using JT_HOME from environment])
fi fi
fi fi
@ -1130,7 +1121,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
if test ! -e "$JT_HOME/lib/jtreg.jar"; then if test ! -e "$JT_HOME/lib/jtreg.jar"; then
AC_MSG_WARN([Ignoring jtreg from path since a valid jtreg home cannot be found]) AC_MSG_WARN([Ignoring jtreg from path since a valid jtreg home cannot be found])
JT_HOME= JT_HOME=
JTREGEXE=
else else
AC_MSG_NOTICE([Located jtreg using jtreg executable in path]) AC_MSG_NOTICE([Located jtreg using jtreg executable in path])
fi fi
@ -1149,10 +1139,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
fi fi
fi fi
UTIL_FIXUP_EXECUTABLE(JTREGEXE)
UTIL_FIXUP_PATH(JT_HOME) UTIL_FIXUP_PATH(JT_HOME)
AC_SUBST(JT_HOME) AC_SUBST(JT_HOME)
AC_SUBST(JTREGEXE)
]) ])
# Setup the JIB dependency resolver # Setup the JIB dependency resolver

View File

@ -885,6 +885,7 @@ var getJibProfilesProfiles = function (input, common, data) {
make_args: testOnlyMake, make_args: testOnlyMake,
environment: { environment: {
"BOOT_JDK": common.boot_jdk_home, "BOOT_JDK": common.boot_jdk_home,
"JT_HOME": input.get("jtreg", "home_path"),
"JDK_IMAGE_DIR": input.get(testedProfileJdk, "home_path"), "JDK_IMAGE_DIR": input.get(testedProfileJdk, "home_path"),
"TEST_IMAGE_DIR": input.get(testedProfileTest, "home_path") "TEST_IMAGE_DIR": input.get(testedProfileTest, "home_path")
}, },
@ -1063,7 +1064,8 @@ var getJibProfilesDependencies = function (input, common) {
checksum_file: "MD5_VALUES", checksum_file: "MD5_VALUES",
file: "bundles/jtreg_bin-5.0.zip", file: "bundles/jtreg_bin-5.0.zip",
environment_name: "JT_HOME", environment_name: "JT_HOME",
environment_path: input.get("jtreg", "install_path") + "/jtreg/bin" environment_path: input.get("jtreg", "home_path") + "/bin",
configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"),
}, },
jmh: { jmh: {

View File

@ -107,7 +107,8 @@ endif
test: test:
$(RM) -r $(RUN_DIR) $(RM) -r $(RUN_DIR)
$(MKDIR) -p $(RUN_DIR) $(MKDIR) -p $(RUN_DIR)
$(CD) $(FH_BASEDIR)/test && JT_JAVA=$(BOOT_JDK) $(JTREGEXE) \ $(CD) $(FH_BASEDIR)/test && $(JAVA) -Dprogram=jtreg \
-jar $(JT_HOME)/lib/jtreg.jar \
-jdk:$(BOOT_JDK) \ -jdk:$(BOOT_JDK) \
$(JTREG_TEST_OPTS) \ $(JTREG_TEST_OPTS) \
-timeout:0.1 -va -retain:all \ -timeout:0.1 -va -retain:all \