changeset 2472:41c24ce779f3

Merge
author lana
date Fri, 20 Jan 2017 18:26:19 +0000
parents 8d22611ffb65 15d2dce47c04
children 5991cc73ea0b
files
diffstat 5 files changed, 47 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/make/InitSupport.gmk	Thu Jan 19 22:31:06 2017 +0000
+++ b/make/InitSupport.gmk	Fri Jan 20 18:26:19 2017 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, 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
@@ -460,27 +460,28 @@
   endef
 
   define PrintFailureReports
-	$(if $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*), \
-	  $(PRINTF) "=== Output from failing command(s) repeated here ===\n" $(NEWLINE) \
-	  $(foreach logfile, $(sort $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*)), \
+	$(if $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log), \
+	  $(PRINTF) "\n=== Output from failing command(s) repeated here ===\n" $(NEWLINE) \
+	  $(foreach logfile, $(sort $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log)), \
 	      $(PRINTF) "* For target $(notdir $(basename $(logfile))):\n" $(NEWLINE) \
 	      ($(GREP) -v -e "^Note: including file:" <  $(logfile) || true) | $(HEAD) -n 12 $(NEWLINE) \
 	      if test `$(WC) -l < $(logfile)` -gt 12; then \
 	        $(ECHO) "   ... (rest of output omitted)" ; \
 	      fi $(NEWLINE) \
 	  ) \
+	  $(PRINTF) "\n* All command lines available in $(MAKESUPPORT_OUTPUTDIR)/failure-logs.\n" $(NEWLINE) \
 	  $(PRINTF) "=== End of repeated output ===\n" \
 	)
   endef
 
   define PrintBuildLogFailures
 	if $(GREP) -q "recipe for target .* failed" $(BUILD_LOG) 2> /dev/null; then  \
-	  $(PRINTF) "=== Make failure sequence repeated here ===\n" ; \
+	  $(PRINTF) "\n=== Make failed targets repeated here ===\n" ; \
 	  $(GREP) "recipe for target .* failed" $(BUILD_LOG) ; \
 	  $(PRINTF) "=== End of repeated output ===\n" ; \
-	  $(PRINTF) "Hint: Try searching the build log for the name of the first failed target.\n" ; \
+	  $(PRINTF) "\nHint: Try searching the build log for the name of the first failed target.\n" ; \
 	else \
-	  $(PRINTF) "No indication of failed target found.\n" ; \
+	  $(PRINTF) "\nNo indication of failed target found.\n" ; \
 	  $(PRINTF) "Hint: Try searching the build log for '] Error'.\n" ; \
 	fi
   endef
--- a/make/Javadoc.gmk	Thu Jan 19 22:31:06 2017 +0000
+++ b/make/Javadoc.gmk	Fri Jan 20 18:26:19 2017 +0000
@@ -683,22 +683,6 @@
 TARGETS += $(jdknet)
 
 ################################################################################
-
-# TODO: Need to decide when the plugin API is ready to publish as experimental API.
-# This target is temporarily added for internal use for now.
-$(eval $(call SetupJavadocGeneration, jlinkplugins, \
-    MODULES := jdk.jlink, \
-    PACKAGES := jdk.tools.jlink.plugin, \
-    API_ROOT := jdk, \
-    DEST_DIR := jlink, \
-    TITLE := JLink Plugin API - EXPERIMENTAL, \
-    FIRST_COPYRIGHT_YEAR := 2015, \
-    DISABLED_DOCLINT := html missing syntax, \
-))
-
-TARGETS += $(jlinkplugins)
-
-################################################################################
 # Copy JDWP html file
 
 JDWP_HTML := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html
--- a/make/Main.gmk	Thu Jan 19 22:31:06 2017 +0000
+++ b/make/Main.gmk	Fri Jan 20 18:26:19 2017 +0000
@@ -247,7 +247,7 @@
 define DeclareHotspotGensrcRecipe
   hotspot-$1-gensrc:
 	$$(call LogInfo, Building JVM variant '$1' with features '$(JVM_FEATURES_$1)')
-	+($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) -f gensrc/GenerateSources.gmk \
+	+($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f gensrc/GenerateSources.gmk \
 	    JVM_VARIANT=$1)
 endef
 
@@ -255,14 +255,14 @@
 
 define DeclareHotspotLibsRecipe
   hotspot-$1-libs:
-	+($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) -f lib/CompileLibraries.gmk \
+	+($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f lib/CompileLibraries.gmk \
 	    JVM_VARIANT=$1)
 endef
 
 $(foreach v, $(JVM_VARIANTS), $(eval $(call DeclareHotspotLibsRecipe,$v)))
 
 hotspot-jsig:
-	+($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) -f lib/CompileLibjsig.gmk)
+	+($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f lib/CompileLibjsig.gmk)
 
 hotspot-ide-project:
 	+($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ide/CreateVSProject.gmk)
@@ -285,7 +285,7 @@
 # Jigsaw specific data and analysis targets.
 
 generate-summary:
-	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) -f GenerateModuleSummary.gmk)
+	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f GenerateModuleSummary.gmk)
 
 ALL_TARGETS += generate-summary
 
@@ -318,7 +318,7 @@
 bootcycle-images:
         ifneq ($(COMPILE_TYPE), cross)
 	  $(call LogWarn, Boot cycle build step 2: Building a new JDK image using previously built image)
-	  +$(MAKE) -f $(SRC_ROOT)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \
+	  +$(MAKE) $(MAKE_ARGS) -f $(SRC_ROOT)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \
 	      JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
         else
 	  $(call LogWarn, Boot cycle build disabled when cross compiling)
--- a/make/common/MakeBase.gmk	Thu Jan 19 22:31:06 2017 +0000
+++ b/make/common/MakeBase.gmk	Fri Jan 20 18:26:19 2017 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, 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
@@ -862,6 +862,7 @@
   ( $(strip $2) > >($(TEE) $(strip $1).log) 2> >($(TEE) $(strip $1).log >&2) || \
       ( exitcode=$(DOLLAR)? && \
       $(CP) $(strip $1).log $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst /,_,$(patsubst $(BUILD_OUTPUT)/%,%,$(strip $1))).log && \
+      $(CP) $(strip $1).cmdline $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst /,_,$(patsubst $(BUILD_OUTPUT)/%,%,$(strip $1))).cmdline && \
       exit $(DOLLAR)exitcode ) )
 
 ################################################################################
--- a/test/lib/jdk/test/lib/process/OutputAnalyzer.java	Thu Jan 19 22:31:06 2017 +0000
+++ b/test/lib/jdk/test/lib/process/OutputAnalyzer.java	Fri Jan 20 18:26:19 2017 +0000
@@ -183,6 +183,23 @@
   }
 
   /**
+   * Verify that the stdout and stderr contents of output buffer does not contain the string
+   *
+   * @throws RuntimeException If the string was found
+   */
+  public OutputAnalyzer shouldBeEmpty() {
+    if (!stdout.isEmpty()) {
+        reportDiagnosticSummary();
+        throw new RuntimeException("stdout was not empty");
+    }
+    if (!stderr.isEmpty()) {
+        reportDiagnosticSummary();
+        throw new RuntimeException("stderr was not empty");
+    }
+    return this;
+  }
+
+  /**
    * Verify that the stdout contents of output buffer does not contain the string
    *
    * @param expectedString String that the buffer should not contain
@@ -365,6 +382,21 @@
       return this;
   }
 
+  /**
+   * Verify the exit value of the process
+   *
+   * @param notExpectedExitValue Unexpected exit value from process
+   * @throws RuntimeException If the exit value from the process did match the expected value
+   */
+  public OutputAnalyzer shouldNotHaveExitValue(int notExpectedExitValue) {
+      if (getExitValue() == notExpectedExitValue) {
+          reportDiagnosticSummary();
+          throw new RuntimeException("Unexpected to get exit value of ["
+                  + notExpectedExitValue + "]\n");
+      }
+      return this;
+  }
+
 
   /**
    * Report summary that will help to diagnose the problem