--- a/make/RunTests.gmk Wed Nov 29 12:39:59 2017 -0800
+++ b/make/RunTests.gmk Wed Nov 29 22:23:21 2017 +0100
@@ -75,6 +75,18 @@
JTREG_TOPDIR := $(CUSTOM_ROOT)
endif
+JTREG_FAILURE_HANDLER_DIR := $(TEST_IMAGE_DIR)/failure_handler
+JTREG_FAILURE_HANDLER := $(JTREG_FAILURE_HANDLER_DIR)/jtregFailureHandler.jar
+
+ifneq ($(wildcard $(JTREG_FAILURE_HANDLER)), )
+ JTREG_FAILURE_HANDLER_OPTIONS := \
+ -timeoutHandlerDir:$(JTREG_FAILURE_HANDLER) \
+ -observerDir:$(JTREG_FAILURE_HANDLER) \
+ -timeoutHandler:jdk.test.failurehandler.jtreg.GatherProcessInfoTimeoutHandler \
+ -observer:jdk.test.failurehandler.jtreg.GatherDiagnosticInfoObserver \
+ -timeoutHandlerTimeout:0
+endif
+
################################################################################
# Parse control variables
################################################################################
@@ -472,6 +484,10 @@
$1_JTREG_BASIC_OPTIONS += -cpa:$$(JIB_JAR)
endif
+ ifneq ($$(JTREG_FAILURE_HANDLER_OPTIONS), )
+ $1_JTREG_LAUNCHER_OPTIONS += -Djava.library.path="$(JTREG_FAILURE_HANDLER_DIR)"
+ endif
+
clean-workdir-$1:
$$(RM) -r $$($1_TEST_SUPPORT_DIR)
@@ -488,6 +504,7 @@
-reportDir:$$($1_TEST_RESULTS_DIR) \
-workDir:$$($1_TEST_SUPPORT_DIR) \
$$(JTREG_OPTIONS) \
+ $$(JTREG_FAILURE_HANDLER_OPTIONS) \
$$($1_TEST_NAME) || true )
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/text/stats.txt