langtools/test/Makefile
author lana
Fri, 18 Jul 2014 08:25:26 -0700
changeset 25597 6073de33135f
parent 24405 71b654b695b7
child 27382 60a3693d0d87
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
#
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
     2
# Makefile to run jtreg and other tests
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
     3
#
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
     4
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
     5
# Product builds and langtools builds
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
     6
#
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
     7
# A full product build (or "control" build) creates a complete JDK image.
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
     8
# To test a product build, set TESTJAVA to the path for the image.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     9
#
20602
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
    10
# A langtools build just builds the langtools components of a JDK.
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    11
# To test a langtools build, set TESTJAVA to the path for a recent JDK
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    12
# build, and set TESTBOOTCLASSPATH to the compiled langtools classes --
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    13
# for example build/classes or dist/lib/classes.jar.
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    14
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    15
# JPRT
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    16
# JPRT may invoke this Makefile directly, as part of a langtools build,
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    17
# or indirectly, via FOREST/test/Makefile, as part of a control build.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
# Get OS/ARCH specifics
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
OSNAME = $(shell uname -s)
06bc494ca11e Initial load
duke
parents:
diff changeset
    21
ifeq ($(OSNAME), SunOS)
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    22
  SLASH_JAVA = /java
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    23
  PLATFORM = solaris
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
  JT_PLATFORM = solaris
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
  ARCH = $(shell uname -p)
06bc494ca11e Initial load
duke
parents:
diff changeset
    26
  ifeq ($(ARCH), i386)
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
    ARCH=i586
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
  endif
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
endif
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
ifeq ($(OSNAME), Linux)
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    31
  SLASH_JAVA = /java
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
  PLATFORM = linux
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
  JT_PLATFORM = linux
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
  ARCH = $(shell uname -m)
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
  ifeq ($(ARCH), i386)
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
    ARCH=i586
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
  endif
06bc494ca11e Initial load
duke
parents:
diff changeset
    38
endif
12084
b367473ef0f1 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10947
diff changeset
    39
ifeq ($(OSNAME), Darwin)
b367473ef0f1 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10947
diff changeset
    40
  PLATFORM = bsd
b367473ef0f1 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10947
diff changeset
    41
  JT_PLATFORM = linux
b367473ef0f1 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10947
diff changeset
    42
  ARCH = $(shell uname -m)
b367473ef0f1 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10947
diff changeset
    43
  ifeq ($(ARCH), i386)
b367473ef0f1 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10947
diff changeset
    44
    ARCH=i586
b367473ef0f1 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10947
diff changeset
    45
  endif
b367473ef0f1 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10947
diff changeset
    46
endif
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
ifeq ($(OSNAME), Windows_NT)
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    48
  # MKS
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    49
  PLATFORM=windows
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    50
endif
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    51
ifeq ($(PLATFORM),)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
  PLATFORM = windows
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    53
  CYGPATH = | cygpath -m -s -f -
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    54
endif
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    55
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    56
ifeq ($(PLATFORM), windows)
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    57
  SLASH_JAVA = J:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
  JT_PLATFORM = win32
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
  ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),ia64)
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
    ARCH=ia64
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
  else
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
    ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),AMD64)
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
      ARCH=x64
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
    else
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
      ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T)
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
        ARCH=x64
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
      else
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
        ARCH=i586
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
      endif
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
    endif
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
  endif
5652
89482b760ef7 6954901: langtools/test/Makefile should check for bin/javac(.exe) instead of lib/tools.jar
jjg
parents: 5647
diff changeset
    72
  EXE_SUFFIX=.exe
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    73
endif
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
# Root of this test area (important to use full paths in some places)
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    76
TEST_ROOT := $(shell pwd $(CYGPATH) )
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    78
# Default bundle of all test results (passed or not) (JPRT only)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    79
ifdef JPRT_JOB_ID
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    80
  JPRT_CLEAN = clean
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    81
  JPRT_ARCHIVE_BUNDLE = $(TEST_ROOT)/JPRT_ARCHIVE_BUNDLE.zip
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    82
endif
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
ifeq ($(PLATFORM), windows)
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
  SLASH_JAVA = J:
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
else
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
  SLASH_JAVA = /java
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
endif
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
# Default JTREG to run
3779
8b3fc577aec6 6877763: update langtools/test/Makefile for JPRT
jjg
parents: 1261
diff changeset
    91
ifdef JPRT_JTREG_HOME
8b3fc577aec6 6877763: update langtools/test/Makefile for JPRT
jjg
parents: 1261
diff changeset
    92
  JTREG_HOME = $(JPRT_JTREG_HOME)
8b3fc577aec6 6877763: update langtools/test/Makefile for JPRT
jjg
parents: 1261
diff changeset
    93
else
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    94
  JTREG_HOME = $(SLASH_JAVA)/re/jtreg/4.1/promoted/latest/binaries/jtreg
3779
8b3fc577aec6 6877763: update langtools/test/Makefile for JPRT
jjg
parents: 1261
diff changeset
    95
endif
8b3fc577aec6 6877763: update langtools/test/Makefile for JPRT
jjg
parents: 1261
diff changeset
    96
JTREG = $(JTREG_HOME)/$(JT_PLATFORM)/bin/jtreg
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    97
JTDIFF = $(JTREG_HOME)/$(JT_PLATFORM)/bin/jtdiff
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    99
# Default JCK to run
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   100
ifdef JPRT_JCK_HOME
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   101
  JCK_HOME = $(JPRT_JCK_HOME)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   102
else
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
   103
  JCK_HOME = $(SLASH_JAVA)/re/jck/8/promoted/latest/binaries
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   104
endif
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   105
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   106
# Default JDK for JTREG and JCK
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   107
#
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   108
# JT_JAVA is the version of java used to run jtreg/JCK. Since it is now
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   109
# standard to execute tests in sameVM mode, it should normally be set the
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   110
# same as TESTJAVA (although not necessarily so.)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   111
#
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
ifdef JPRT_JAVA_HOME
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
  JT_JAVA = $(JPRT_JAVA_HOME)
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
else
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
   115
  JT_JAVA = $(SLASH_JAVA)/re/jdk/1.7.0/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
endif
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
06bc494ca11e Initial load
duke
parents:
diff changeset
   118
# Default JDK to test
3779
8b3fc577aec6 6877763: update langtools/test/Makefile for JPRT
jjg
parents: 1261
diff changeset
   119
ifdef JPRT_IMPORT_PRODUCT_HOME
8b3fc577aec6 6877763: update langtools/test/Makefile for JPRT
jjg
parents: 1261
diff changeset
   120
  TESTJAVA = $(JPRT_IMPORT_PRODUCT_HOME)
8b3fc577aec6 6877763: update langtools/test/Makefile for JPRT
jjg
parents: 1261
diff changeset
   121
else
8b3fc577aec6 6877763: update langtools/test/Makefile for JPRT
jjg
parents: 1261
diff changeset
   122
  TESTJAVA = $(SLASH_JAVA)/re/jdk/1.7.0/promoted/latest/binaries/$(PLATFORM)-$(ARCH)
8b3fc577aec6 6877763: update langtools/test/Makefile for JPRT
jjg
parents: 1261
diff changeset
   123
endif
8b3fc577aec6 6877763: update langtools/test/Makefile for JPRT
jjg
parents: 1261
diff changeset
   124
20602
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
   125
# PRODUCT_HOME is a JPRT variable pointing to a directory containing the output from
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   126
# make/Makefile
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   127
# For langtools, this is a directory containing build and dist
20602
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
   128
# For a control build, this is build/$(PRODUCT)-$(ARCH)/XYZ-image
5652
89482b760ef7 6954901: langtools/test/Makefile should check for bin/javac(.exe) instead of lib/tools.jar
jjg
parents: 5647
diff changeset
   129
#	(i.e, j2sdk-image or jdk-module-image)
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   130
ifdef PRODUCT_HOME
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   131
  ifeq ($(shell [ -r $(PRODUCT_HOME)/dist/lib/classes.jar ]; echo $$?),0)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   132
    TESTBOOTCLASSPATH = $(PRODUCT_HOME)/dist/lib/classes.jar
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   133
  endif
5652
89482b760ef7 6954901: langtools/test/Makefile should check for bin/javac(.exe) instead of lib/tools.jar
jjg
parents: 5647
diff changeset
   134
  ifeq ($(shell [ -r $(PRODUCT_HOME)/bin/javac$(EXE_SUFFIX) ]; echo $$?),0)
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   135
    TESTJAVA = $(PRODUCT_HOME)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   136
  endif
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   137
endif
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   138
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   139
ifdef TESTBOOTCLASSPATH
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   140
  JTREG_OPTIONS += -Xbootclasspath/p:$(TESTBOOTCLASSPATH)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   141
### In the following, -refvmoptions is an undocumented option
20602
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
   142
### The following does not work JCK 7 b30 2/6/2010. Awaiting b31.
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   143
  JCK_OPTIONS += \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   144
	-vmoptions:-Xbootclasspath/p:$(TESTBOOTCLASSPATH) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   145
	-refvmoptions:-Xbootclasspath/p:$(TESTBOOTCLASSPATH)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   146
endif
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   147
20602
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
   148
# Concurrency is the number of tests that can execute at once.
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   149
# On an otherwise empty machine, suggest setting to (#cpus + 2)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   150
# If unset, the default is (#cpus)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   151
### RFE: determine and use #cpus
14546
7e2a1569de76 8003357: Add support for jtreg -concurrency to langtools/test/Makefile
jjh
parents: 12084
diff changeset
   152
ifdef CONCURRENCY
7e2a1569de76 8003357: Add support for jtreg -concurrency to langtools/test/Makefile
jjh
parents: 12084
diff changeset
   153
  JTREG_OPTIONS += -agentvm -concurrency:$(CONCURRENCY)
7e2a1569de76 8003357: Add support for jtreg -concurrency to langtools/test/Makefile
jjh
parents: 12084
diff changeset
   154
else
7e2a1569de76 8003357: Add support for jtreg -concurrency to langtools/test/Makefile
jjh
parents: 12084
diff changeset
   155
  JTREG_OPTIONS += -samevm
7e2a1569de76 8003357: Add support for jtreg -concurrency to langtools/test/Makefile
jjh
parents: 12084
diff changeset
   156
endif
7e2a1569de76 8003357: Add support for jtreg -concurrency to langtools/test/Makefile
jjh
parents: 12084
diff changeset
   157
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   158
ifdef JCK_CONCURRENCY
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   159
  JCK_OPTIONS += -concurrency:$(JCK_CONCURRENCY)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   160
endif
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   161
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   162
# JCK is executed using "Multi-JVM Group Mode", which is a hybrid
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   163
# of otherVM and sameVM modes. New JVMs are created and reused for
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   164
# a number of tests, then eventually discarded and a new one started.
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   165
# This amortizes the JVM startup time.  The "group size" defines
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   166
# how many tests are run in a JVM before it is replaced.
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   167
# If unset, the default is 100.
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   168
JCK_GROUP_SIZE = 1000
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   169
ifdef JCK_GROUP_SIZE
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   170
  JCK_COMPILER_OPTIONS += \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   171
    -jtoptions:-Ejck.env.compiler.testCompile.groupMode.groupSize=$(JCK_GROUP_SIZE) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   172
    -jtoptions:-Ejck.env.compiler.compRefExecute.groupMode.groupSize=$(JCK_GROUP_SIZE)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   173
### The following is not supported. Awaiting RFE 6924287
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   174
### 6924287: Jck4Jdk: Allow to configure test group size for group mode via simple command line option
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   175
###  JCK_RUNTIME_OPTIONS += \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   176
###    -jtoptions:-Ejck.env.runtime.testCompile.groupMode.groupSize=$(JCK_GROUP_SIZE)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   177
endif
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   178
5647
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   179
# Timeouts -- by default, increase test timeouts when running on JPRT
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   180
ifdef JPRT_JOB_ID
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   181
  ifndef JTREG_TIMEOUT_FACTOR
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   182
    JTREG_TIMEOUT_FACTOR = 3
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   183
  endif
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   184
endif
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   185
ifdef JTREG_TIMEOUT_FACTOR
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   186
  JTREG_OPTIONS += -timeoutFactor:$(JTREG_TIMEOUT_FACTOR)
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   187
endif
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   188
24405
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   189
# Default verbosity setting for jtreg
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   190
JTREG_VERBOSE = fail,error,nopass
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   191
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   192
# Default verbosity setting for jck
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   193
JCK_VERBOSE = non-pass
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   194
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   195
# Assertions: some tests show failures when assertions are enabled.
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   196
# Since javac is typically loaded via the bootclassloader (either via TESTJAVA
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   197
# or TESTBOOTCLASSPATH), you may need -esa to enable assertions in javac.
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   198
JTREG_OPTIONS += $(ASSERTION_OPTIONS)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   199
JCK_OPTIONS += $(ASSERTION_OPTIONS:%=-vmoptions:%)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   200
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   201
# Include shared options
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   202
JCK_COMPILER_OPTIONS += $(JCK_OPTIONS)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   203
JCK_RUNTIME_OPTIONS += $(JCK_OPTIONS)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   204
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   205
# Exit codes:
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   206
# jtreg, jck:   0: OK, 1: tests failed, 2: tests error; 3+: SERIOUS
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   207
FATAL_JTREG_EXIT = 3
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   208
FATAL_JCK_EXIT = 3
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   209
# jtdiff: 0: OK, 1: differences found; 2+: SERIOUS
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   210
FATAL_JTDIFF_EXIT = 2
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   211
#
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   212
# Exit -- used for final "normal" exit from "make". Redefine to "true" to avoid
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   213
# having make exit with non-zero return code.
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   214
EXIT = exit
20602
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
   215
# Function to exit shell if exit code of preceding command is greater than or equal
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   216
# to a given level. Redefine function or preceding FATAL_*_EXIT codes as needed.
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   217
EXIT_IF_FATAL = status=$$?; if [ $$status -ge $(1) ]; then exit $$status ; fi
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   218
06bc494ca11e Initial load
duke
parents:
diff changeset
   219
# The test directories to run
06bc494ca11e Initial load
duke
parents:
diff changeset
   220
DEFAULT_TESTDIRS = .
06bc494ca11e Initial load
duke
parents:
diff changeset
   221
TESTDIRS = $(DEFAULT_TESTDIRS)
06bc494ca11e Initial load
duke
parents:
diff changeset
   222
06bc494ca11e Initial load
duke
parents:
diff changeset
   223
# Root of all test results
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   224
TEST_OUTPUT_DIR = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   225
ABS_TEST_OUTPUT_DIR := \
20602
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
   226
	$(shell mkdir -p $(TEST_OUTPUT_DIR); \
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
   227
		cd  $(TEST_OUTPUT_DIR); \
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
   228
		pwd $(CYGPATH))
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   229
# Subdirectories for different test runs
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   230
JTREG_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jtreg
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   231
JCK_COMPILER_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jck-compiler
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   232
JCK_RUNTIME_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jck-runtime-Xcompile
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   233
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   234
# Default make rule -- warning, may take a while
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   235
all: $(JPRT_CLEAN) jtreg-tests jck-compiler-tests jck-runtime-tests $(JPRT_ARCHIVE_BUNDLE) all-summary
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   236
	@echo "Testing completed successfully"
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   237
15030
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents: 14546
diff changeset
   238
jtreg apt javac javadoc javah javap jdeps: $(JPRT_CLEAN) jtreg-tests $(JPRT_ARCHIVE_BUNDLE) jtreg-summary
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   239
	@echo "Testing completed successfully"
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   240
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   241
jck-compiler: $(JPRT_CLEAN) jck-compiler-tests $(JPRT_ARCHIVE_BUNDLE) jck-compiler-summary
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   242
	@echo "Testing completed successfully"
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   243
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   244
jck-runtime: $(JPRT_CLEAN) jck-runtime-tests $(JPRT_ARCHIVE_BUNDLE) jck-runtime-summary
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   245
	@echo "Testing completed successfully"
06bc494ca11e Initial load
duke
parents:
diff changeset
   246
06bc494ca11e Initial load
duke
parents:
diff changeset
   247
# for use with JPRT -testrule
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   248
all:		JTREG_TESTDIRS = .
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   249
jtreg:		JTREG_TESTDIRS = .
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   250
apt:		JTREG_TESTDIRS = tools/apt
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   251
javac: 		JTREG_TESTDIRS = tools/javac
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   252
javadoc:	JTREG_TESTDIRS = tools/javadoc com/sun/javadoc
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   253
javah:		JTREG_TESTDIRS = tools/javah
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   254
javap:		JTREG_TESTDIRS = tools/javap
15030
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents: 14546
diff changeset
   255
jdeps:		JTREG_TESTDIRS = tools/jdeps
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   256
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   257
# Run jtreg tests
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   258
#
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   259
# JTREG_HOME
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   260
#	Installed location of jtreg
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   261
# JT_JAVA
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   262
#	Version of java used to run jtreg.  Should normally be the same as TESTJAVA
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   263
# TESTJAVA
20602
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
   264
# 	Version of java to be tested.
24405
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   265
# JTREG_VERBOSE
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   266
# Verbosity setting for jtreg
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   267
# JTREG_OPTIONS
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   268
#	Additional options for jtreg
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   269
# JTREG_TESTDIRS
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   270
#	Directories of tests to be run
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   271
# JTREG_OUTPUT_DIR
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   272
#	Where to write the results
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   273
# JTREG_REFERENCE
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   274
#	(Optional) reference results (e.g. work, report or summary.txt)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   275
#
12084
b367473ef0f1 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10947
diff changeset
   276
jtreg_tests: jtreg-tests
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   277
jtreg-tests: check-jtreg FRC
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   278
	@rm -f -r $(JTREG_OUTPUT_DIR)/JTwork $(JTREG_OUTPUT_DIR)/JTreport \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   279
	    $(JTREG_OUTPUT_DIR)/diff.html $(JTREG_OUTPUT_DIR)/status.txt
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   280
	@mkdir -p $(JTREG_OUTPUT_DIR)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   281
	JT_JAVA=$(JT_JAVA) $(JTREG) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   282
	  -J-Xmx512m \
15384
5a8d00abf076 8006694: temporarily workaround combo tests are causing time out in several platforms
vromero
parents: 15030
diff changeset
   283
	  -vmoption:-Xmx768m \
24405
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   284
	  -a -ignore:quiet $(if $(JTREG_VERBOSE),-v:$(JTREG_VERBOSE)) \
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   285
          -r:$(JTREG_OUTPUT_DIR)/JTreport \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   286
          -w:$(JTREG_OUTPUT_DIR)/JTwork \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   287
          -jdk:$(TESTJAVA) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   288
          $(JAVA_ARGS:%=-vmoption:%) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   289
	  $(JTREG_OPTIONS) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   290
          $(JTREG_TESTDIRS) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   291
	|| ( $(call EXIT_IF_FATAL,$(FATAL_JTREG_EXIT)) ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   292
	    echo $$status > $(JTREG_OUTPUT_DIR)/status.txt \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   293
	)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   294
ifdef JTREG_REFERENCE
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   295
	JT_JAVA=$(JT_JAVA) $(JTDIFF) -o $(JTREG_OUTPUT_DIR)/diff.html \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   296
	    $(JTREG_REFERENCE) $(JTREG_OUTPUT_DIR)/JTreport \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   297
	|| ( $(call EXIT_IF_FATAL,$(FATAL_JTDIFF_EXIT)) )
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   298
endif
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   299
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   300
jtreg-summary: FRC
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   301
	if [ -r $(JTREG_OUTPUT_DIR)/status.txt ]; then \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   302
	    echo ; echo "Summary of jtreg test failures" ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   303
	    cat $(JTREG_OUTPUT_DIR)/JTreport/text/summary.txt | \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   304
		grep -v 'Not run' | grep -v 'Passed' ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   305
	    echo ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   306
	    $(EXIT) `cat $(JTREG_OUTPUT_DIR)/status.txt` ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   307
	fi
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   308
06bc494ca11e Initial load
duke
parents:
diff changeset
   309
# Check to make sure these directories exist
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
   310
check-jtreg: $(PRODUCT_HOME) $(JTREG)
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   311
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   312
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   313
# Run JCK-compiler tests
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   314
#
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   315
# JCK_HOME
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   316
#	Installed location of JCK: should include JCK-compiler, and JCK-extras
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
   317
#       Default is JCK 8.
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   318
# JT_JAVA
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   319
#	Version of java used to run JCK.  Should normally be the same as TESTJAVA
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
   320
#       Default is JDK 7
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   321
# TESTJAVA
20602
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
   322
# 	Version of java to be tested.
24405
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   323
# JCK_VERBOSE
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   324
#	Verbosity setting for jtjck
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   325
# JCK_COMPILER_OPTIONS
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   326
#	Additional options for JCK-compiler
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   327
# JCK_COMPILER_TESTDIRS
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   328
#	Directories of tests to be run
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   329
# JCK_COMPILER_OUTPUT_DIR
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   330
#	Where to write the results
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   331
# JCK_COMPILER_REFERENCE
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   332
#	(Optional) reference results (e.g. work, report or summary.txt)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   333
#
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   334
jck-compiler-tests: check-jck FRC
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   335
	@rm -f -r $(JCK_COMPILER_OUTPUT_DIR)/work $(JCK_COMPILER_OUTPUT_DIR)/report \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   336
	    $(JCK_COMPILER_OUTPUT_DIR)/diff.html $(JCK_COMPILER_OUTPUT_DIR)/status.txt
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   337
	@mkdir -p $(JCK_COMPILER_OUTPUT_DIR)
24405
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   338
	$(JT_JAVA)/bin/java -Xmx512m \
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
   339
	    -jar $(JCK_HOME)/JCK-compiler-8/lib/jtjck.jar \
24405
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   340
	    $(if $(JCK_VERBOSE),-v:$(JCK_VERBOSE)) \
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   341
            -r:$(JCK_COMPILER_OUTPUT_DIR)/report \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   342
            -w:$(JCK_COMPILER_OUTPUT_DIR)/work \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   343
            -jdk:$(TESTJAVA) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   344
	    $(JCK_COMPILER_OPTIONS) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   345
            $(JCK_COMPILER_TESTDIRS) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   346
	|| ( $(call EXIT_IF_FATAL,$(FATAL_JCK_EXIT)) ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   347
	    echo $$status > $(JCK_COMPILER_OUTPUT_DIR)/status.txt \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   348
	)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   349
ifdef JCK_COMPILER_REFERENCE
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   350
	JT_JAVA=$(JT_JAVA) $(JTDIFF) -o $(JCK_COMPILER_OUTPUT_DIR)/diff.html \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   351
	    $(JCK_COMPILER_REFERENCE) $(JCK_COMPILER_OUTPUT_DIR)/report \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   352
	|| ( $(call EXIT_IF_FATAL,$(FATAL_JTDIFF_EXIT)) )
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   353
endif
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   354
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   355
jck-compiler-summary: FRC
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   356
	if [ -r $(JCK_COMPILER_OUTPUT_DIR)/status.txt ]; then \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   357
	    echo ; echo "Summary of JCK-compiler test failures" ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   358
	    cat $(JCK_COMPILER_OUTPUT_DIR)/report/text/summary.txt | \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   359
		grep -v 'Not run' | grep -v 'Passed' ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   360
	    echo ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   361
	    $(EXIT) `cat $(JCK_COMPILER_OUTPUT_DIR)/status.txt` ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   362
	fi
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   363
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   364
# Run JCK-runtime tests in -Xcompile mode
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   365
# This is a special mode to test javac by compiling the tests in the JCK-runtime test suite
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   366
# Normal JCK-runtime invocation belongs in the jdk/ repository.
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   367
#
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   368
# JCK_HOME
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   369
#	Installed location of JCK: should include JCK-compiler, JCK-runtime and JCK-extras
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   370
# JT_JAVA
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   371
#	Version of java used to run JCK.  Should normally be the same as TESTJAVA
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   372
# TESTJAVA
20602
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
   373
# 	Version of java to be tested.
24405
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   374
# JCK_VERBOSE
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   375
#	Verbosity setting for jtjck
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   376
# JCK_RUNTIME_OPTIONS
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   377
#	Additional options for JCK-runtime
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   378
# JCK_RUNTIME_TESTDIRS
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   379
#	Directories of tests to be run
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   380
# JCK_RUNTIME_OUTPUT_DIR
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   381
#	Where to write the results
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   382
# JCK_RUNTIME_REFERENCE
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   383
#	(Optional) reference results (e.g. work, report or summary.txt)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   384
#
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   385
jck-runtime-tests: check-jck FRC
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   386
	@rm -f -r $(JCK_RUNTIME_OUTPUT_DIR)/work $(JCK_RUNTIME_OUTPUT_DIR)/report \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   387
	    $(JCK_RUNTIME_OUTPUT_DIR)/diff.html $(JCK_RUNTIME_OUTPUT_DIR)/status.txt
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   388
	@mkdir -p $(JCK_RUNTIME_OUTPUT_DIR)
24405
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   389
	$(JT_JAVA)/bin/java -Xmx512m \
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
   390
	    -jar $(JCK_HOME)/JCK-runtime-8/lib/jtjck.jar \
24405
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   391
	    $(if $(JCK_VERBOSE),-v:$(JCK_VERBOSE)) \
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   392
            -r:$(JCK_RUNTIME_OUTPUT_DIR)/report \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   393
            -w:$(JCK_RUNTIME_OUTPUT_DIR)/work \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   394
            -jdk:$(TESTJAVA) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   395
	    -Xcompile \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   396
	    $(JCK_RUNTIME_OPTIONS) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   397
            $(JCK_RUNTIME_TESTDIRS) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   398
	|| ( $(call EXIT_IF_FATAL,$(FATAL_JCK_EXIT)) ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   399
	    echo $$status > $(JCK_RUNTIME_OUTPUT_DIR)/status.txt \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   400
	)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   401
ifdef JCK_RUNTIME_REFERENCE
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   402
	JT_JAVA=$(JT_JAVA) $(JTDIFF) -o $(JCK_RUNTIME_OUTPUT_DIR)/diff.html \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   403
	    $(JCK_RUNTIME_REFERENCE) $(JCK_RUNTIME_OUTPUT_DIR)/report \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   404
	|| ( $(call EXIT_IF_FATAL,$(FATAL_JTDIFF_EXIT)) )
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   405
endif
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   406
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   407
jck-runtime-summary: FRC
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   408
	if [ -r $(JCK_RUNTIME_OUTPUT_DIR)/status.txt ]; then \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   409
	    echo ; echo "Summary of JCK-runtime test failures" ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   410
	    cat $(JCK_RUNTIME_OUTPUT_DIR)/report/text/summary.txt | \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   411
		grep -v 'Not run' | grep -v 'Passed' ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   412
	    echo ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   413
	    $(EXIT) `cat $(JCK_RUNTIME_OUTPUT_DIR)/status.txt` ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   414
	fi
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   415
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   416
# Check to make sure these directories exist
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
   417
check-jck: $(JCK_HOME) $(PRODUCT_HOME)
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   418
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   419
all-summary: FRC
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   420
	if [ -n "`find $(TEST_OUTPUT_DIR) -name status.txt`" ]; then
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   421
	    echo ; echo "Summary of test failures" ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   422
	    cat `find $(TEST_OUTPUT_DIR) -name summary.txt` | \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   423
		grep -v 'Not run' | grep -v 'Passed' ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   424
	    echo ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   425
	    $(EXIT) 1
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   426
	fi
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   427
06bc494ca11e Initial load
duke
parents:
diff changeset
   428
# Bundle up the results
06bc494ca11e Initial load
duke
parents:
diff changeset
   429
$(JPRT_ARCHIVE_BUNDLE): FRC
06bc494ca11e Initial load
duke
parents:
diff changeset
   430
	@rm -f $@
06bc494ca11e Initial load
duke
parents:
diff changeset
   431
	@mkdir -p $(@D)
06bc494ca11e Initial load
duke
parents:
diff changeset
   432
	( cd $(TEST_OUTPUT_DIR) && zip -q -r $@ . )
06bc494ca11e Initial load
duke
parents:
diff changeset
   433
06bc494ca11e Initial load
duke
parents:
diff changeset
   434
# Cleanup
06bc494ca11e Initial load
duke
parents:
diff changeset
   435
clean:
06bc494ca11e Initial load
duke
parents:
diff changeset
   436
	rm -f $(JPRT_ARCHIVE_BUNDLE)
06bc494ca11e Initial load
duke
parents:
diff changeset
   437
06bc494ca11e Initial load
duke
parents:
diff changeset
   438
# Used to force a target rules to run
06bc494ca11e Initial load
duke
parents:
diff changeset
   439
FRC:
06bc494ca11e Initial load
duke
parents:
diff changeset
   440
06bc494ca11e Initial load
duke
parents:
diff changeset
   441
# Phony targets (e.g. these are not filenames)
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   442
.PHONY: all clean \
15030
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents: 14546
diff changeset
   443
	jtreg javac javadoc javah javap jdeps jtreg-tests jtreg-summary check-jtreg \
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   444
	jck-compiler jck-compiler-tests jck-compiler-summary \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   445
	jck-runtime jck-runtime-tests jck-runtime-summary check-jck
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   446
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   447
# No use of suffix rules
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   448
.SUFFIXES:
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   449