2015-02-27 10:56:34 +00:00
|
|
|
#
|
2016-02-09 20:54:16 +00:00
|
|
|
# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
2015-02-27 10:56:34 +00:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# This code is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License version 2 only, as
|
|
|
|
# published by the Free Software Foundation. Oracle designates this
|
|
|
|
# particular file as subject to the "Classpath" exception as provided
|
|
|
|
# by Oracle in the LICENSE file that accompanied this code.
|
|
|
|
#
|
|
|
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
# version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
# accompanied this code).
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License version
|
|
|
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
|
|
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
# or visit www.oracle.com if you need additional information or have any
|
|
|
|
# questions.
|
|
|
|
#
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# This file builds the native component of the JTReg tests for Hotspot.
|
|
|
|
# It also covers the test-image part, where the built files are copied to the
|
|
|
|
# test image.
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
default: all
|
|
|
|
|
|
|
|
include $(SPEC)
|
|
|
|
include MakeBase.gmk
|
|
|
|
include TestFilesCompilation.gmk
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Targets for building the native tests themselves.
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
# Add more directories here when needed.
|
|
|
|
BUILD_HOTSPOT_JTREG_NATIVE_SRC := \
|
|
|
|
$(HOTSPOT_TOPDIR)/test/native_sanity \
|
2015-05-14 17:12:51 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/test/runtime/jni/8025979 \
|
2015-05-14 17:09:35 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/test/runtime/jni/8033445 \
|
2016-09-13 07:04:44 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/test/runtime/jni/checked \
|
2016-10-04 01:48:21 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/test/runtime/jni/PrivateInterfaceMethods \
|
2015-06-02 08:41:18 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/test/runtime/jni/ToStringInInterfaceTest \
|
8142968: Module System implementation
Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282
Co-authored-by: Alex Buckley <alex.buckley@oracle.com>
Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Harold Seigel <harold.seigel@oracle.com>
Co-authored-by: Lois Foltan <lois.foltan@oracle.com>
Co-authored-by: Calvin Cheung <calvin.cheung@oracle.com>
Co-authored-by: Christian Tornqvist <christian.tornqvist@oracle.com>
Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com>
Co-authored-by: George Triantafillou <george.triantafillou@oracle.com>
Co-authored-by: Igor Ignatyev <igor.ignatyev@oracle.com>
Co-authored-by: Ioi Lam <ioi.lam@oracle.com>
Co-authored-by: James Laskey <james.laskey@oracle.com>
Co-authored-by: Jean-Francois Denise <jean-francois.denise@oracle.com>
Co-authored-by: Jiangli Zhou <jiangli.zhou@oracle.com>
Co-authored-by: Markus Gronlund <markus.gronlund@oracle.com>
Co-authored-by: Serguei Spitsyn <serguei.spitsyn@oracle.com>
Co-authored-by: Staffan Larsen <staffan.larsen@oracle.com>
Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com>
Reviewed-by: acorn, ccheung, coleenp, ctornqvi, dholmes, dsimms, gtriantafill, iklam, jiangli, mgronlun, mseledtsov, cjplummer, sspitsyn, stefank, twisti, hseigel, lfoltan, alanb, mchung, dfazunen
2016-03-17 19:04:01 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/test/runtime/modules/getModuleJNI \
|
2015-11-09 12:19:59 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/test/runtime/SameObject \
|
2016-02-09 20:54:16 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/test/runtime/BoolReturn \
|
2015-12-07 14:42:47 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/test/compiler/floatingpoint/ \
|
2015-12-16 15:38:02 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/test/compiler/calls \
|
2016-07-10 02:20:38 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/test/serviceability/jvmti/GetNamedModule \
|
2016-05-03 14:23:23 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/test/testlibrary/jvmti \
|
2016-07-12 20:42:46 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/test/compiler/jvmci/jdk.vm.ci.code.test \
|
2016-07-22 13:55:55 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/test/serviceability/jvmti/GetModulesInfo \
|
2016-09-21 13:46:13 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/test/serviceability/jvmti/ModuleAwareAgents/ClassFileLoadHook \
|
|
|
|
$(HOTSPOT_TOPDIR)/test/serviceability/jvmti/ModuleAwareAgents/ClassLoadPrepare \
|
|
|
|
$(HOTSPOT_TOPDIR)/test/serviceability/jvmti/ModuleAwareAgents/ThreadStart \
|
2015-02-27 10:56:34 +00:00
|
|
|
#
|
|
|
|
|
2015-11-18 17:32:52 +00:00
|
|
|
# Add conditional directories here when needed.
|
|
|
|
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
|
|
|
|
BUILD_HOTSPOT_JTREG_NATIVE_SRC += \
|
2015-11-20 14:44:16 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/test/runtime/libadimalloc.solaris.sparc \
|
|
|
|
$(HOTSPOT_TOPDIR)/test/runtime/ThreadSignalMask
|
2015-11-18 17:32:52 +00:00
|
|
|
endif
|
|
|
|
|
2016-07-15 17:25:16 +00:00
|
|
|
ifeq ($(OPENJDK_TARGET_OS), linux)
|
|
|
|
BUILD_HOTSPOT_JTREG_NATIVE_SRC += \
|
2016-07-15 17:31:50 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/test/runtime/execstack \
|
2016-07-15 17:46:08 +00:00
|
|
|
$(HOTSPOT_TOPDIR)/test/runtime/jsig \
|
|
|
|
$(HOTSPOT_TOPDIR)/test/runtime/StackGuardPages
|
2016-07-15 17:25:16 +00:00
|
|
|
endif
|
|
|
|
|
2015-11-18 17:32:52 +00:00
|
|
|
ifeq ($(TOOLCHAIN_TYPE), solstudio)
|
2016-08-19 14:02:21 +00:00
|
|
|
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liboverflow := -lc
|
|
|
|
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libSimpleClassFileLoadHook := -lc
|
|
|
|
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libGetNamedModuleTest := -lc
|
2016-09-21 13:46:13 +00:00
|
|
|
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMAAClassFileLoadHook := -lc
|
|
|
|
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMAAClassLoadPrepare := -lc
|
|
|
|
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMAAThreadStart := -lc
|
2015-11-18 17:32:52 +00:00
|
|
|
endif
|
|
|
|
|
2016-07-15 17:25:16 +00:00
|
|
|
ifeq ($(OPENJDK_TARGET_OS), linux)
|
|
|
|
BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rw := -z noexecstack
|
|
|
|
BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rwx := -z execstack
|
2016-08-19 14:02:21 +00:00
|
|
|
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeinvoke := -ljvm -lpthread
|
2016-07-15 17:46:08 +00:00
|
|
|
BUILD_TEST_invoke_exeinvoke.c_OPTIMIZATION := NONE
|
2016-07-15 17:25:16 +00:00
|
|
|
endif
|
|
|
|
|
2015-02-27 10:56:34 +00:00
|
|
|
BUILD_HOTSPOT_JTREG_OUTPUT_DIR := $(BUILD_OUTPUT)/support/test/hotspot/jtreg/native
|
|
|
|
|
|
|
|
BUILD_HOTSPOT_JTREG_IMAGE_DIR := $(TEST_IMAGE_DIR)/hotspot/jtreg
|
|
|
|
|
|
|
|
$(eval $(call SetupTestFilesCompilation, BUILD_HOTSPOT_JTREG_LIBRARIES, \
|
|
|
|
TYPE := LIBRARY, \
|
|
|
|
SOURCE_DIRS := $(BUILD_HOTSPOT_JTREG_NATIVE_SRC), \
|
|
|
|
OUTPUT_DIR := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call SetupTestFilesCompilation, BUILD_HOTSPOT_JTREG_EXECUTABLES, \
|
|
|
|
TYPE := PROGRAM, \
|
|
|
|
SOURCE_DIRS := $(BUILD_HOTSPOT_JTREG_NATIVE_SRC), \
|
|
|
|
OUTPUT_DIR := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
|
|
|
|
))
|
|
|
|
|
|
|
|
build-test-hotspot-jtreg-native: $(BUILD_HOTSPOT_JTREG_LIBRARIES) $(BUILD_HOTSPOT_JTREG_EXECUTABLES)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Targets for building test-image.
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
# Copy to hotspot jtreg test image
|
|
|
|
$(eval $(call SetupCopyFiles,COPY_HOTSPOT_JTREG_NATIVE, \
|
|
|
|
SRC := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
|
|
|
|
DEST := $(TEST_IMAGE_DIR)/hotspot/jtreg/native, \
|
|
|
|
FILES := $(BUILD_HOTSPOT_JTREG_LIBRARIES) $(BUILD_HOTSPOT_JTREG_EXECUTABLES), \
|
|
|
|
FLATTEN := true))
|
|
|
|
|
|
|
|
test-image-hotspot-jtreg-native: $(COPY_HOTSPOT_JTREG_NATIVE)
|
|
|
|
|
|
|
|
all: build-test-hotspot-jtreg-native
|
|
|
|
test-image: test-image-hotspot-jtreg-native
|
|
|
|
|
|
|
|
.PHONY: default all build-test-hotspot-jtreg-native test-image-hotspot-jtreg-native test-image
|