Skip to content

Commit ee43b37

Browse files
author
duke
committed
Backport 5e021cb
1 parent 7f189a5 commit ee43b37

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

make/RunTests.gmk

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -748,8 +748,6 @@ define SetupRunJtregTestBody
748748
# we may end up with a lot of JVM's
749749
$1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $(AWK) 'BEGIN { print 25 / $$($1_JTREG_JOBS); }')
750750

751-
JTREG_TIMEOUT_FACTOR ?= 4
752-
753751
JTREG_VERBOSE ?= fail,error,summary
754752
JTREG_RETAIN ?= fail,error
755753
JTREG_TEST_THREAD_FACTORY ?=
@@ -837,6 +835,24 @@ define SetupRunJtregTestBody
837835
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$($1_JTREG_PROBLEM_LIST))
838836
endif
839837

838+
JTREG_ALL_OPTIONS := $$(JTREG_JAVA_OPTIONS) $$(JTREG_VM_OPTIONS)
839+
840+
JTREG_AUTO_PROBLEM_LISTS :=
841+
JTREG_AUTO_TIMEOUT_FACTOR := 4
842+
843+
ifneq ($$(findstring -Xcomp, $$(JTREG_ALL_OPTIONS)), )
844+
JTREG_AUTO_PROBLEM_LISTS += ProblemList-Xcomp.txt
845+
JTREG_AUTO_TIMEOUT_FACTOR := 10
846+
endif
847+
848+
ifneq ($$(findstring -XX:+UseZGC, $$(JTREG_ALL_OPTIONS)), )
849+
ifneq ($$(findstring -XX:-ZGenerational, $$(JTREG_ALL_OPTIONS)), )
850+
JTREG_AUTO_PROBLEM_LISTS += ProblemList-zgc.txt
851+
else
852+
JTREG_AUTO_PROBLEM_LISTS += ProblemList-generational-zgc.txt
853+
endif
854+
endif
855+
840856
ifneq ($$(JTREG_EXTRA_PROBLEM_LISTS), )
841857
# Accept both absolute paths as well as relative to the current test root.
842858
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
@@ -868,6 +884,18 @@ define SetupRunJtregTestBody
868884

869885
$$(eval $$(call SetupRunJtregTestCustom, $1))
870886

887+
# SetupRunJtregTestCustom might also adjust JTREG_AUTO_ variables
888+
# so set the final results after setting values from custom setup
889+
ifneq ($$(JTREG_AUTO_PROBLEM_LISTS), )
890+
# Accept both absolute paths as well as relative to the current test root.
891+
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
892+
$$(JTREG_AUTO_PROBLEM_LISTS) \
893+
$$(addprefix $$($1_TEST_ROOT)/, $$(JTREG_AUTO_PROBLEM_LISTS)) \
894+
))
895+
endif
896+
897+
JTREG_TIMEOUT_FACTOR ?= $$(JTREG_AUTO_TIMEOUT_FACTOR)
898+
871899
clean-outputdirs-$1:
872900
$$(RM) -r $$($1_TEST_SUPPORT_DIR)
873901
$$(RM) -r $$($1_TEST_RESULTS_DIR)

0 commit comments

Comments
 (0)