make/test/JtregGraalUnit.gmk
author chegar
Thu, 17 Oct 2019 20:54:25 +0100
branchdatagramsocketimpl-branch
changeset 58679 9c3209ff7550
parent 58678 9cf78a70fa4f
parent 58214 8c44ac2a908e
permissions -rw-r--r--
datagramsocketimpl-branch: merge with default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50908
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
     1
#
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
     2
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
     4
#
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    10
#
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    15
# accompanied this code).
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    16
#
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    20
#
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    23
# questions.
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    24
#
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    25
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    26
################################################################################
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    27
# This file builds Graal component of the JTReg tests for Hotspot.
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    28
# It also covers the test-image part, where the built files are copied to the
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    29
# test image.
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    30
################################################################################
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    31
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    32
default: all
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    33
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    34
include $(SPEC)
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    35
include MakeBase.gmk
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    36
include SetupJavaCompilers.gmk
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    37
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    38
TARGETS_BUILD :=
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    39
TARGETS_IMAGE :=
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    40
TARGETS_EXTRA_LIB :=
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    41
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    42
ifeq ($(INCLUDE_GRAAL), true)
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    43
  ifneq ($(GRAALUNIT_LIB), )
54076
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    44
50908
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    45
    SRC_DIR := $(TOPDIR)/src/jdk.internal.vm.compiler/share/classes
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    46
    TEST_DIR := $(TOPDIR)/test/hotspot/jtreg/compiler/graalunit
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    47
    COMPILE_OUTPUTDIR := $(SUPPORT_OUTPUTDIR)/test/graalunit
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    48
    LIB_OUTPUTDIR := $(TEST_IMAGE_DIR)/hotspot/jtreg/graal
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    49
54076
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    50
    # This evaluation is expensive and should only be done if this target was
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    51
    # explicitly called.
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    52
    ifneq ($(filter build-test-hotspot-jtreg-graal, $(MAKECMDGOALS)), )
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    53
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    54
      TEST_COMPILE_CP := \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    55
          $(JDK_OUTPUTDIR)/modules/jdk.internal.vm.compiler \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    56
          $(JDK_OUTPUTDIR)/modules/jdk.internal.vm.ci \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    57
          $(LIB_OUTPUTDIR)/junit-4.12.jar \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    58
          $(LIB_OUTPUTDIR)/asm-5.0.4.jar \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    59
          $(LIB_OUTPUTDIR)/asm-tree-5.0.4.jar \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    60
          $(LIB_OUTPUTDIR)/java-allocation-instrumenter.jar \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    61
          $(LIB_OUTPUTDIR)/hamcrest-core-1.3.jar
51367
d9439d4b15e2 8205078: [Graal] org.graalvm.compiler.core.test.VerifyDebugUsageTest fails with "Expected exception: VerificationError"
epavlova
parents: 50911
diff changeset
    62
54076
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    63
      TEST_JAVAC_FLAGS := \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    64
          -Xlint:none \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    65
          -processorpath $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier.jar \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    66
          --add-exports jdk.unsupported/sun.misc=ALL-UNNAMED \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    67
          --add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
58034
318cd16cc202 8230680: latest Graal unittests depend on jdk.internal.module
dlong
parents: 54601
diff changeset
    68
          --add-exports java.base/jdk.internal.module=ALL-UNNAMED \
51367
d9439d4b15e2 8205078: [Graal] org.graalvm.compiler.core.test.VerifyDebugUsageTest fails with "Expected exception: VerificationError"
epavlova
parents: 50911
diff changeset
    69
54076
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    70
      ### Copy 3rd party libs
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    71
      $(eval $(call SetupCopyFiles, COPY_GRAALUNIT_LIBS, \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    72
          FILES := $(wildcard $(GRAALUNIT_LIB)/*.jar), \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    73
          DEST := $(LIB_OUTPUTDIR), \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    74
      ))
50908
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    75
54076
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    76
      TARGETS_EXTRA_LIB += $(COPY_GRAALUNIT_LIBS)
50908
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    77
54076
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    78
      ### Compile graalunit tests
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    79
      $(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_TESTS, \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    80
          SETUP := GENERATE_USINGJDKBYTECODE, \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    81
          SRC := \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    82
              $(SRC_DIR)/jdk.internal.vm.compiler.collections.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    83
              $(SRC_DIR)/org.graalvm.compiler.api.directives.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    84
              $(SRC_DIR)/org.graalvm.compiler.api.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    85
              $(SRC_DIR)/org.graalvm.compiler.asm.aarch64.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    86
              $(SRC_DIR)/org.graalvm.compiler.asm.amd64.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    87
              $(SRC_DIR)/org.graalvm.compiler.asm.sparc.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    88
              $(SRC_DIR)/org.graalvm.compiler.asm.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    89
              $(SRC_DIR)/org.graalvm.compiler.core.aarch64.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    90
              $(SRC_DIR)/org.graalvm.compiler.core.amd64.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    91
              $(SRC_DIR)/org.graalvm.compiler.core.jdk9.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    92
              $(SRC_DIR)/org.graalvm.compiler.core.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    93
              $(SRC_DIR)/org.graalvm.compiler.debug.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    94
              $(SRC_DIR)/org.graalvm.compiler.graph.test/src \
54601
c40b2a190173 8221598: Update Graal
jwilhelm
parents: 54084
diff changeset
    95
              $(SRC_DIR)/org.graalvm.compiler.hotspot.aarch64.test/src \
54076
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    96
              $(SRC_DIR)/org.graalvm.compiler.hotspot.amd64.test/src \
54084
84f10bbf993f 8218074: Update Graal
jwilhelm
parents: 54076
diff changeset
    97
              $(SRC_DIR)/org.graalvm.compiler.hotspot.jdk9.test/src \
54076
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    98
              $(SRC_DIR)/org.graalvm.compiler.hotspot.lir.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
    99
              $(SRC_DIR)/org.graalvm.compiler.hotspot.sparc.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   100
              $(SRC_DIR)/org.graalvm.compiler.hotspot.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   101
              $(SRC_DIR)/org.graalvm.compiler.jtt/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   102
              $(SRC_DIR)/org.graalvm.compiler.lir.jtt/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   103
              $(SRC_DIR)/org.graalvm.compiler.lir.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   104
              $(SRC_DIR)/org.graalvm.compiler.loop.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   105
              $(SRC_DIR)/org.graalvm.compiler.nodes.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   106
              $(SRC_DIR)/org.graalvm.compiler.options.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   107
              $(SRC_DIR)/org.graalvm.compiler.phases.common.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   108
              $(SRC_DIR)/org.graalvm.compiler.replacements.jdk12.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   109
              $(SRC_DIR)/org.graalvm.compiler.replacements.jdk9.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   110
              $(SRC_DIR)/org.graalvm.compiler.replacements.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   111
              $(SRC_DIR)/org.graalvm.compiler.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   112
              $(SRC_DIR)/org.graalvm.util.test/src \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   113
              , \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   114
          EXCLUDE_FILES := org/graalvm/compiler/core/test/VerifyDebugUsageTest.java, \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   115
          BIN := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   116
          CLASSPATH := $(TEST_COMPILE_CP), \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   117
          ADD_JAVAC_FLAGS := $(TEST_JAVAC_FLAGS), \
58214
8c44ac2a908e 8231145: [Graal] org.graalvm.compiler.debug.test.DebugContextTest fails because DebugContextTest.testLogging.input is not available
epavlova
parents: 58034
diff changeset
   118
          COPY := .input, \
54076
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   119
      ))
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   120
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   121
      TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS)
50908
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   122
54076
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   123
      ### Compile graalunit tests which require -XDstringConcat=inline
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   124
      $(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_TESTS_SET2, \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   125
          SETUP := GENERATE_USINGJDKBYTECODE, \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   126
          DEPENDS := $(BUILD_VM_COMPILER_TESTS), \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   127
          SRC := $(SRC_DIR)/org.graalvm.compiler.core.test/src, \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   128
          INCLUDE_FILES := org/graalvm/compiler/core/test/VerifyDebugUsageTest.java, \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   129
          BIN := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   130
          CLASSPATH := \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   131
              $(TEST_COMPILE_CP) \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   132
              $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   133
              , \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   134
          ADD_JAVAC_FLAGS := \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   135
              $(TEST_JAVAC_FLAGS) \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   136
              -XDstringConcat=inline \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   137
              , \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   138
      ))
50908
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   139
54076
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   140
      TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS_SET2)
51367
d9439d4b15e2 8205078: [Graal] org.graalvm.compiler.core.test.VerifyDebugUsageTest fails with "Expected exception: VerificationError"
epavlova
parents: 50911
diff changeset
   141
54076
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   142
      ### Generate jdk.vm.compiler.tests.jar
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   143
      $(eval $(call SetupJarArchive, BUILD_VM_COMPILER_TESTS_JAR, \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   144
          DEPENDENCIES := $(BUILD_VM_COMPILER_TESTS) $(BUILD_VM_COMPILER_TESTS_SET2), \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   145
          SRCS := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
58214
8c44ac2a908e 8231145: [Graal] org.graalvm.compiler.debug.test.DebugContextTest fails because DebugContextTest.testLogging.input is not available
epavlova
parents: 58034
diff changeset
   146
          SUFFIXES:=.class .input, \
54076
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   147
          JAR := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests.jar, \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   148
      ))
51367
d9439d4b15e2 8205078: [Graal] org.graalvm.compiler.core.test.VerifyDebugUsageTest fails with "Expected exception: VerificationError"
epavlova
parents: 50911
diff changeset
   149
54076
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   150
      TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS_JAR)
50908
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   151
54076
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   152
      ### Compile and build mxtool
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   153
      $(eval $(call SetupJavaCompilation, BUILD_MXTOOL, \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   154
          SETUP := GENERATE_USINGJDKBYTECODE, \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   155
          SRC := $(TEST_DIR)/com.oracle.mxtool.junit, \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   156
          BIN := $(COMPILE_OUTPUTDIR)/com.oracle.mxtool.junit, \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   157
          JAR := $(COMPILE_OUTPUTDIR)/com.oracle.mxtool.junit.jar, \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   158
          CLASSPATH := $(LIB_OUTPUTDIR)/junit-4.12.jar, \
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   159
      ))
50908
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   160
54076
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   161
      TARGETS_BUILD += $(BUILD_MXTOOL)
50908
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   162
54076
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   163
      $(TARGETS_BUILD): $(TARGETS_EXTRA_LIB)
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   164
4b4745d185eb 8220383: Incremental build is broken and inefficient
erikj
parents: 52910
diff changeset
   165
    endif # build-test-hotspot-jtreg-graal
50908
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   166
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   167
    ################################################################################
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   168
    # Targets for building test-image.
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   169
    ################################################################################
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   170
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   171
    # Copy to hotspot jtreg test image
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   172
    $(eval $(call SetupCopyFiles, COPY_HOTSPOT_JTREG_GRAAL, \
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   173
        SRC := $(COMPILE_OUTPUTDIR), \
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   174
        DEST := $(LIB_OUTPUTDIR), \
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   175
        FILES := jdk.vm.compiler.tests.jar com.oracle.mxtool.junit.jar, \
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   176
    ))
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   177
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   178
    TARGETS_IMAGE += $(COPY_HOTSPOT_JTREG_GRAAL)
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   179
  else
50911
c1e56891d768 8206088: 8205207 broke builds
iignatyev
parents: 50908
diff changeset
   180
    $(info Skip building of Graal unit tests because 3rd party libraries directory is not specified)
50908
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   181
  endif
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   182
endif
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   183
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   184
build-test-hotspot-jtreg-graal: $(TARGETS_BUILD)
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   185
test-image-hotspot-jtreg-graal: $(TARGETS_IMAGE)
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   186
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   187
all: build-test-hotspot-jtreg-graal
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   188
test-image: test-image-hotspot-jtreg-graal
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   189
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
   190
.PHONY: default all build-test-hotspot-jtreg-graal test-image-hotspot-jtreg-graal test-image