Skip to content

Commit 488b5f3

Browse files
author
duke
committed
Backport 5e021cbcc7a6cb30a27380950e115ff12846239c
1 parent bb60a42 commit 488b5f3

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
@@ -743,8 +743,6 @@ define SetupRunJtregTestBody
743743
# we may end up with a lot of JVM's
744744
$1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $(AWK) 'BEGIN { print 25 / $$($1_JTREG_JOBS); }')
745745

746-
JTREG_TIMEOUT_FACTOR ?= 4
747-
748746
JTREG_VERBOSE ?= fail,error,summary
749747
JTREG_RETAIN ?= fail,error
750748
JTREG_TEST_THREAD_FACTORY ?=
@@ -832,6 +830,24 @@ define SetupRunJtregTestBody
832830
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$($1_JTREG_PROBLEM_LIST))
833831
endif
834832

833+
JTREG_ALL_OPTIONS := $$(JTREG_JAVA_OPTIONS) $$(JTREG_VM_OPTIONS)
834+
835+
JTREG_AUTO_PROBLEM_LISTS :=
836+
JTREG_AUTO_TIMEOUT_FACTOR := 4
837+
838+
ifneq ($$(findstring -Xcomp, $$(JTREG_ALL_OPTIONS)), )
839+
JTREG_AUTO_PROBLEM_LISTS += ProblemList-Xcomp.txt
840+
JTREG_AUTO_TIMEOUT_FACTOR := 10
841+
endif
842+
843+
ifneq ($$(findstring -XX:+UseZGC, $$(JTREG_ALL_OPTIONS)), )
844+
ifneq ($$(findstring -XX:-ZGenerational, $$(JTREG_ALL_OPTIONS)), )
845+
JTREG_AUTO_PROBLEM_LISTS += ProblemList-zgc.txt
846+
else
847+
JTREG_AUTO_PROBLEM_LISTS += ProblemList-generational-zgc.txt
848+
endif
849+
endif
850+
835851
ifneq ($$(JTREG_EXTRA_PROBLEM_LISTS), )
836852
# Accept both absolute paths as well as relative to the current test root.
837853
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
@@ -863,6 +879,18 @@ define SetupRunJtregTestBody
863879

864880
$$(eval $$(call SetupRunJtregTestCustom, $1))
865881

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

0 commit comments

Comments
 (0)