make/RunTestsLegacy.gmk
author ihse
Mon, 27 Nov 2017 12:29:28 +0100
branchihse-testmakefiles-branch
changeset 55882 79c94bfb654e
parent 55881 dbf68259f80e
permissions -rw-r--r--
Use OUTPUTDIR instead of OUTPUT_ROOT.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
55881
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
     1
#
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
     2
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
     4
#
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    10
#
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    15
# accompanied this code).
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    16
#
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    20
#
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    23
# questions.
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    24
#
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    25
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    26
# In Cygwin, the MAKE variable gets prepended with the current directory if the
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    27
# make executable is called using a Windows mixed path (c:/cygwin/bin/make.exe).
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    28
ifneq ($(findstring :, $(MAKE)), )
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    29
  MAKE := $(patsubst $(CURDIR)%, %, $(patsubst $(CURDIR)/%, %, $(MAKE)))
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    30
endif
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    31
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    32
# Locate this Makefile
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    33
ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))),)
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    34
  makefile_path := $(CURDIR)/$(strip $(lastword $(MAKEFILE_LIST)))
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    35
else
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    36
  makefile_path := $(lastword $(MAKEFILE_LIST))
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    37
endif
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    38
topdir := $(strip $(patsubst %/make/, %, $(dir $(makefile_path))))
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    39
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    40
# Determine if we need a fake spec
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    41
available_specs := $(wildcard $(topdir)/build/*/*.gmk)
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    42
ifeq ($(words $(available_specs)), 1)
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    43
  # We found exactly one spec, assume we should use it
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    44
  spec := $(strip $(patsubst $(topdir)/%, %, $(available_specs)))
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    45
  $(info Using SPEC from configuration located at $(strip $(patsubst %/spec.gmk, %, $(spec))))
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    46
else
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    47
  ifeq ($(available_specs), )
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    48
    $(info No configurations found, using fake spec)
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    49
    spec := make/FakeSpecForLegacyTests.gmk
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    50
  else
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    51
    $(info Warning: Multiple configurations found, using fake spec instead!)
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    52
    $(info Please use top-level Makefile to properly select configuration)
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    53
    spec := make/FakeSpecForLegacyTests.gmk
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    54
  endif
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    55
endif
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    56
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    57
default: all
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    58
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    59
# Legacy control variables for jtreg/testing:
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    60
#  SLASH_JAVA
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    61
#  TEST_OUTPUT_DIR
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    62
#  ALT_OUTPUTDIR
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    63
#  PRODUCT_HOME
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    64
#  JAVA_ARGS
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    65
#  JPRT_PRODUCT_ARGS
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    66
#  JPRT_PRODUCT_VM_ARGS
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    67
#  TESTNATIVE_DIR
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    68
#  JPRT_ARCHIVE_BUNDLE
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    69
#  JT_HOME
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    70
#  TESTDIRS # When called from JPRT the TESTDIRS variable is set to the jtreg tests to run (=> sets this in TEST_SELECTION)
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    71
#  CONCURRENCY
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    72
#  EXTRA_JTREG_OPTIONS
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    73
#  JTREG_ASSERT_OPTION
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    74
#  JTREG_VERBOSE
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    75
#  JTREG_IGNORE_OPTION
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    76
#  JTREG_TIMEOUT_OPTION
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    77
#  JTREG_MEMORY_OPTION
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    78
#  JTREG_TESTVM_MEMORY_OPTION
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    79
#  JTREG_KEY_OPTION
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    80
#  TEST_SELECTION
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    81
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    82
################################################################################
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    83
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    84
# Langtools used to remove the prefix "langtools_" from their test names.
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    85
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    86
langtools_% :
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    87
	echo TESTS=$(addprefix langtools/test:, $(subst langtools_,,$@))
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    88
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    89
jdk_% core_%s svc_%:
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    90
	echo TESTS=$(addprefix jdk/test:, $@)
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    91
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    92
jaxp_%:
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    93
	echo TESTS=$(addprefix jaxp/test:, $@)
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    94
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    95
hotspot_%:
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    96
	echo TESTS=$(addprefix hotspot/test:, $@)
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    97
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    98
runtest:
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
    99
	@cd $(topdir) && $(MAKE) -r -R -j 1 -s -I make/common/ \
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   100
	    SPEC=$(spec) TOPDIR=$(topdir) \
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   101
	    -f make/RunTests.gmk runtest TEST="tier1"
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   102
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   103
# If TEST_SELECTION is given, only use TESTDIRS to determine component.
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   104
# If TEST_SELECTION is not given, use TESTDIRS  to determine component and
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   105
# test in the component.
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   106
# TESTDIRS must begin with ../<component>/test.
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   107
# Specifying only TESTDIRS=../<component>/test (with or without trailing slash)
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   108
# is an error.
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   109
#
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   110
COMPONENT=$(word 2,$(subst /, ,$(TESTDIRS)))
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   111
#ifneq ($(TEST_SELECTION), )
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   112
#  $(addprefix $(COMPONENT)/test:, $(TESTNAMES))
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   113
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   114
TESTDIRS_TESTS=$(patsubst ../$(COMPONENT)/test/%,%,$(TESTDIRS))
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   115
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   116
jtreg_tests:
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   117
	echo TESTS=$(sort $(TESTDIRS) $(TEST_SELECTION))
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   118
	echo COMPONENT $(COMPONENT) TESTDIRS_TESTS $(TESTDIRS_TESTS)
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   119
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   120
all: runtest
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   121
dbf68259f80e Populate with latest code from jdk9 sandbox.
ihse
parents:
diff changeset
   122
.PHONY: default all