From 6b803d7d668ce67d930c5ffde347919c615ae12c Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Tue, 10 Apr 2018 14:16:13 -0700 Subject: [PATCH 01/21] 8178867: tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java failed to clean up files Reviewed-by: alanb, jjg, psandoz --- .../JLinkMultiReleaseJarTest.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/test/jdk/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java b/test/jdk/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java index c3c75783976..aafec448206 100644 --- a/test/jdk/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java +++ b/test/jdk/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java @@ -52,7 +52,9 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import java.util.Set; import java.util.jar.JarFile; import java.util.spi.ToolProvider; @@ -134,14 +136,15 @@ public class JLinkMultiReleaseJarTest { } private void javac(Path source, Path destination, String srcpath) throws IOException { - String[] args = Stream.concat( - Stream.of("-d", destination.toString(), "--module-source-path", srcpath), - Files.walk(source) - .map(Path::toString) - .filter(s -> s.endsWith(".java")) - ).toArray(String[]::new); - int rc = JAVAC_TOOL.run(System.out, System.err, args); - Assert.assertEquals(rc, 0); + var args = Stream.of("-d", destination.toString(), "--module-source-path", srcpath); + try (Stream pathStream = Files.walk(source)) { + args = Stream.concat(args, + pathStream.map(Path::toString) + .filter(s -> s.endsWith(".java"))); + + int rc = JAVAC_TOOL.run(System.out, System.err, args.toArray(String[]::new)); + Assert.assertEquals(rc, 0); + } } @Test @@ -149,7 +152,7 @@ public class JLinkMultiReleaseJarTest { if (ignoreTest()) return; // use jlink to build image from multi-release jar - jlink("m1.jar", "myimage"); + jlink("m1.jar", "myimage"); // validate image Path jimage = userdir.resolve("myimage").resolve("lib").resolve("modules"); From 6d2a538736d6616161cbba64dd9cc9c1ac2ca7a3 Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie Date: Tue, 10 Apr 2018 23:32:54 +0200 Subject: [PATCH 02/21] 8201320: Allow PrintFailureReports to be turned off Reviewed-by: erikj --- make/Init.gmk | 11 +- make/InitSupport.gmk | 216 ++++++++++++++++++++++--------------- make/autoconf/basics.m4 | 18 ++++ make/autoconf/configure.ac | 1 + make/autoconf/spec.gmk.in | 1 + 5 files changed, 158 insertions(+), 89 deletions(-) diff --git a/make/Init.gmk b/make/Init.gmk index 5027dd68af9..6de559e2c60 100644 --- a/make/Init.gmk +++ b/make/Init.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -226,6 +226,15 @@ else # HAS_SPEC=true # Parse COMPARE_BUILD (for makefile development) $(eval $(call ParseCompareBuild)) + # If no LOG= was given on command line, but we have a non-standard default + # value, use that instead and re-parse log level. + ifeq ($(LOG), ) + ifneq ($(DEFAULT_LOG), ) + override LOG := $(DEFAULT_LOG) + $(eval $(call ParseLogLevel)) + endif + endif + ifeq ($(LOG_NOFILE), true) # Disable build log if LOG=[level,]nofile was given override BUILD_LOG_PIPE := diff --git a/make/InitSupport.gmk b/make/InitSupport.gmk index c63941f47ca..37bb7ebdd2f 100644 --- a/make/InitSupport.gmk +++ b/make/InitSupport.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -131,73 +131,6 @@ ifeq ($(HAS_SPEC),) endif endef - # Look for a given option in the LOG variable, and if found, set a variable - # and remove the option from the LOG variable - # $1: The option to look for - # $2: The option to set to "true" if the option is found - define ParseLogOption - ifneq ($$(findstring $1, $$(LOG)),) - $2 := true - # COMMA is defined in spec.gmk, but that is not included yet - COMMA := , - # First try to remove ",