Merge ihse-testmakefiles-branch
authorihse
Wed, 06 Dec 2017 14:17:44 +0100
branchihse-testmakefiles-branch
changeset 55967 e2c47e2db0a5
parent 55966 07d921cdd7a6 (diff)
parent 48079 eaa406097d93 (current diff)
Merge
make/Help.gmk
make/RunTestsPrebuilt.gmk
make/RunTestsPrebuiltSpec.gmk
make/autoconf/boot-jdk.m4
make/autoconf/generated-configure.sh
make/conf/jib-profiles.js
test/jdk/jdk/internal/misc/JavaLangAccess/NewUnsafeString.java
--- a/make/autoconf/generated-configure.sh	Wed Dec 06 13:47:35 2017 +0100
+++ b/make/autoconf/generated-configure.sh	Wed Dec 06 14:17:44 2017 +0100
@@ -5159,7 +5159,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1512479382
+DATE_WHEN_GENERATED=1512566251
 
 ###############################################################################
 #
--- a/make/conf/jib-profiles.js	Wed Dec 06 13:47:35 2017 +0100
+++ b/make/conf/jib-profiles.js	Wed Dec 06 14:17:44 2017 +0100
@@ -704,7 +704,8 @@
                 "JT_JAVA": common.boot_jdk_home,
                 "PRODUCT_HOME": input.get(testedProfile + ".jdk", "home_path"),
                 "TEST_IMAGE_DIR": input.get(testedProfile + ".test", "home_path"),
-                "TEST_OUTPUT_DIR": input.src_top_dir
+                "TEST_OUTPUT_DIR": input.src_top_dir,
+                "USE_RUN_TEST": "true"
             },
             labels: "test"
         }
--- a/test/Makefile	Wed Dec 06 13:47:35 2017 +0100
+++ b/test/Makefile	Wed Dec 06 14:17:44 2017 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 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
@@ -27,6 +27,14 @@
 # Makefile to run tests from multiple sibling directories
 #
 
+# Locate this Makefile
+ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))),)
+  makefile_path := $(CURDIR)/$(strip $(lastword $(MAKEFILE_LIST)))
+else
+  makefile_path := $(lastword $(MAKEFILE_LIST))
+endif
+TOPDIR ?= $(strip $(patsubst %/test/, %, $(dir $(makefile_path))))
+
 # Macro to run a test target in a subdir
 define SUBDIR_TEST # subdirectory target
 if [ -d $1 ] ; then \
@@ -107,10 +115,28 @@
       $(patsubst ../%, %, $(TESTDIRS_NORM))))
 endif
 
-jtreg_tests:
+ifneq ($(USE_RUN_TEST), )
+  MKDIR=mkdir
+  MV=mv
+  HEAD=head
+  # Make it possible to override variables passed on the command line
+  unexport MAKEFLAGS
+
+  jtreg_tests:
+	cd $(TOPDIR) && \
+	    $(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \
+	    run-test-prebuilt OUTPUTDIR=$(TEST_OUTPUT_DIR) BOOT_JDK=$(JT_JAVA) \
+	    JT_HOME=$(JT_HOME) JDK_IMAGE_DIR=$(PRODUCT_HOME) \
+	    TEST_IMAGE_DIR=$(TEST_IMAGE_DIR) TEST="$(patsubst ../%,%,$(TESTDIRS))/$(TEST_SELECTION)" || true
+	$(MKDIR) -p $(TEST_OUTPUT_DIR)/jtreg
+	$(MV) $(TEST_OUTPUT_DIR)/test-results/`$(HEAD) -n 1 $(TEST_OUTPUT_DIR)/test-support/test-last-ids.txt` $(TEST_OUTPUT_DIR)/jtreg/JTreport
+	$(MV) $(TEST_OUTPUT_DIR)/test-support/`$(HEAD) -n 1 $(TEST_OUTPUT_DIR)/test-support/test-last-ids.txt` $(TEST_OUTPUT_DIR)/jtreg/JTwork
+	$(MV) $(TEST_OUTPUT_DIR)/jtreg/JTreport/exitcode.txt $(TEST_OUTPUT_DIR)/jtreg/exitcode.txt
+else
+  jtreg_tests:
 	$(MAKE) --no-print-directory TESTDIRS=$(TESTDIRS_TESTS) \
 	    $(COMPONENT)_jtreg_tests
-
+endif
 ################################################################
 
 # Phony targets (e.g. these are not filenames)