8146132: Excessive output from make test-image

Reviewed-by: ihse
This commit is contained in:
Erik Joelsson 2023-01-23 20:51:13 +00:00
parent dcf1523bf2
commit 0ea2dd1f77
2 changed files with 26 additions and 4 deletions

View File

@ -547,6 +547,7 @@ endef
# STRIPFLAGS Optionally change the flags given to the strip command
# PRECOMPILED_HEADER Header file to use as precompiled header
# PRECOMPILED_HEADER_EXCLUDE List of source files that should not use PCH
# BUILD_INFO_LOG_MACRO Overrides log level of the build info log message, default LogWarn
#
# After being called, some variables are exported from this macro, all prefixed
# with parameter 1 followed by a '_':
@ -931,12 +932,18 @@ define SetupNativeCompilationBody
# Setup rule for printing progress info when compiling source files.
# This is a rough heuristic and may not always print accurate information.
$$($1_BUILD_INFO): $$($1_SRCS) $$($1_COMPILE_VARDEPS_FILE)
# The $1_BUILD_INFO and $1_BUILD_INFO_DEPS variables are used in
# TestFilesCompilation.gmk.
$$(call SetIfEmpty, $1_BUILD_INFO_LOG_MACRO, LogWarn)
$1_BUILD_INFO_DEPS := $$($1_SRCS) $$($1_COMPILE_VARDEPS_FILE)
$$($1_BUILD_INFO): $$($1_BUILD_INFO_DEPS)
ifeq ($$(wildcard $$($1_TARGET)), )
$$(call LogWarn, Creating $$(subst $$(OUTPUTDIR)/,,$$($1_TARGET)) from $$(words \
$$(call $$($1_BUILD_INFO_LOG_MACRO), \
Creating $$(subst $$(OUTPUTDIR)/,,$$($1_TARGET)) from $$(words \
$$(filter-out %.vardeps, $$?)) file(s))
else
$$(call LogWarn, $$(strip Updating $$(subst $$(OUTPUTDIR)/,,$$($1_TARGET)) \
$$(call $$($1_BUILD_INFO_LOG_MACRO), \
$$(strip Updating $$(subst $$(OUTPUTDIR)/,,$$($1_TARGET)) \
$$(if $$(filter-out %.vardeps, $$?), \
due to $$(words $$(filter-out %.vardeps, $$?)) file(s), \
$$(if $$(filter %.vardeps, $$?), due to makefile changes))))

View File

@ -64,6 +64,7 @@ define SetupTestFilesCompilationBody
$1_BASE_CXXFLAGS := $(CXXFLAGS_JDKLIB)
$1_LDFLAGS := $(LDFLAGS_JDKLIB) $$(call SET_SHARED_LIBRARY_ORIGIN)
$1_COMPILATION_TYPE := LIBRARY
$1_LOG_TYPE := library
else ifeq ($$($1_TYPE), PROGRAM)
$1_PREFIX = exe
$1_OUTPUT_SUBDIR := bin
@ -71,6 +72,7 @@ define SetupTestFilesCompilationBody
$1_BASE_CXXFLAGS := $(CXXFLAGS_JDKEXE)
$1_LDFLAGS := $(LDFLAGS_JDKEXE) $(LDFLAGS_TESTEXE)
$1_COMPILATION_TYPE := EXECUTABLE
$1_LOG_TYPE := executable
else
$$(error Unknown type: $$($1_TYPE))
endif
@ -82,6 +84,8 @@ define SetupTestFilesCompilationBody
$1_EXCLUDE_PATTERN := $$(addprefix %/, $$($1_EXCLUDE))
$1_FILTERED_FILE_LIST := $$(filter-out $$($1_EXCLUDE_PATTERN), $$($1_FILE_LIST))
$1_BUILD_INFO := $$($1_OUTPUT_DIR)/_$1-build-info.marker
# Setup a compilation for each and every one of them
$$(foreach file, $$($1_FILTERED_FILE_LIST),\
$$(eval name := $$(strip $$(basename $$(notdir $$(file))))) \
@ -103,10 +107,21 @@ define SetupTestFilesCompilationBody
OPTIMIZATION := $$(if $$($1_OPTIMIZATION_$$(name)),$$($1_OPTIMIZATION_$$(name)),LOW), \
COPY_DEBUG_SYMBOLS := false, \
STRIP_SYMBOLS := $$(if $$($1_STRIP_SYMBOLS_$$(name)),$$($1_STRIP_SYMBOLS_$$(name)),false), \
BUILD_INFO_LOG_MACRO := LogInfo, \
)) \
$$(eval $1 += $$(BUILD_TEST_$$(name)) ) \
$$(eval $1 += $$(BUILD_TEST_$$(name)) ) \
$$(eval $1_BUILD_INFO_DEPS += $$(BUILD_TEST_$$(name)_BUILD_INFO_DEPS)) \
$$(eval $$(BUILD_TEST_$$(name)_BUILD_INFO): | $$($1_BUILD_INFO)) \
)
# Setup rule for printing a summary of all the tests being compiled. On Warn
# log level, this replaces the individual build info logging done by
# SetupNativeCompilation.
$$($1_BUILD_INFO): $$($1_BUILD_INFO_DEPS)
$$(call LogWarn, $$(strip Creating $$(words $$(filter-out %.vardeps, $$?)) \
test $$($1_LOG_TYPE) file(s) for $1))
$(TOUCH) $$@
endef
endif # _TEST_FILES_COMPILATION_GMK