test/langtools/Makefile
author iignatyev
Thu, 21 Jun 2018 22:17:22 -0700
changeset 50709 483806baeba1
parent 47216 71c04702a3d5
child 51994 7577686cc9bd
permissions -rw-r--r--
8172854: [TESTBUG] Exclude runtime/ReservedStack/ReservedStackTest.java from being run with DeoptimizeALot option Reviewed-by: kvn
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
  ARCH = $(shell uname -p)
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
  ifeq ($(ARCH), i386)
06bc494ca11e Initial load
duke
parents:
diff changeset
    26
    ARCH=i586
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
  endif
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
endif
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
ifeq ($(OSNAME), Linux)
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    30
  SLASH_JAVA = /java
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    31
  PLATFORM = linux
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
  ARCH = $(shell uname -m)
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
  ifeq ($(ARCH), i386)
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
    ARCH=i586
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
  endif
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
endif
12084
b367473ef0f1 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10947
diff changeset
    37
ifeq ($(OSNAME), Darwin)
b367473ef0f1 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10947
diff changeset
    38
  PLATFORM = bsd
b367473ef0f1 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10947
diff changeset
    39
  ARCH = $(shell uname -m)
b367473ef0f1 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10947
diff changeset
    40
  ifeq ($(ARCH), i386)
b367473ef0f1 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10947
diff changeset
    41
    ARCH=i586
b367473ef0f1 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10947
diff changeset
    42
  endif
b367473ef0f1 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10947
diff changeset
    43
endif
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
ifeq ($(OSNAME), Windows_NT)
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    45
  # MKS
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    46
  PLATFORM=windows
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    47
endif
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    48
ifeq ($(PLATFORM),)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
  PLATFORM = windows
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    50
  CYGPATH = | cygpath -m -s -f -
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    51
endif
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    52
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    53
ifeq ($(PLATFORM), windows)
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
    54
  SLASH_JAVA = J:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
  ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),ia64)
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
    ARCH=ia64
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
  else
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
    ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),AMD64)
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
      ARCH=x64
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
    else
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
      ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T)
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
        ARCH=x64
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
      else
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
        ARCH=i586
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
      endif
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
    endif
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
  endif
5652
89482b760ef7 6954901: langtools/test/Makefile should check for bin/javac(.exe) instead of lib/tools.jar
jjg
parents: 5647
diff changeset
    68
  EXE_SUFFIX=.exe
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
endif
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
# 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
    72
TEST_ROOT := $(shell pwd $(CYGPATH) )
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    73
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    74
# Default bundle of all test results (passed or not) (JPRT only)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    75
ifdef JPRT_JOB_ID
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    76
  JPRT_CLEAN = clean
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    77
  JPRT_ARCHIVE_BUNDLE = $(TEST_ROOT)/JPRT_ARCHIVE_BUNDLE.zip
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
    78
endif
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
ifeq ($(PLATFORM), windows)
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
  SLASH_JAVA = J:
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
else
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
  SLASH_JAVA = /java
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
endif
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
# Default JTREG to run
39102
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
    87
ifndef JTREG_HOME
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
    88
  ifdef JPRT_JTREG_HOME
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
    89
    JTREG_HOME = $(JPRT_JTREG_HOME)
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
    90
  else ifdef JT_HOME
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
    91
    JTREG_HOME = $(JT_HOME)
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
    92
  else
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
    93
    JTREG_HOME = $(SLASH_JAVA)/re/jtreg/4.2/promoted/latest/
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
    94
  endif
3779
8b3fc577aec6 6877763: update langtools/test/Makefile for JPRT
jjg
parents: 1261
diff changeset
    95
endif
28141
a9bd48f9cf07 8066808: langtools/test/Makefile should not use OS-specific jtreg binary
jjg
parents: 28140
diff changeset
    96
JTREG = $(JTREG_HOME)/bin/jtreg
a9bd48f9cf07 8066808: langtools/test/Makefile should not use OS-specific jtreg binary
jjg
parents: 28140
diff changeset
    97
JTDIFF = $(JTREG_HOME)/bin/jtdiff
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35809
diff changeset
    99
# Problematic tests to be excluded
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35809
diff changeset
   100
PROBLEM_LISTS=ProblemList.txt
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35809
diff changeset
   101
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35809
diff changeset
   102
# Create exclude list for this platform and arch
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35809
diff changeset
   103
ifdef NO_EXCLUDES
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35809
diff changeset
   104
  JTREG_EXCLUSIONS =
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35809
diff changeset
   105
else
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35809
diff changeset
   106
  JTREG_EXCLUSIONS = $(PROBLEM_LISTS:%=-exclude:%)
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35809
diff changeset
   107
endif
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35809
diff changeset
   108
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   109
# Default JCK to run
39102
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
   110
ifndef JCK_HOME
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
   111
  ifdef JPRT_JCK_HOME
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
   112
    JCK_HOME = $(JPRT_JCK_HOME)
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
   113
  else
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
   114
    JCK_HOME = $(SLASH_JAVA)/re/jck/8/promoted/latest/binaries
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
   115
  endif
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   116
endif
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   117
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   118
# Default JDK for JTREG and JCK
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   119
#
28140
1fa50caeb63b 8066807: langtools/test/Makefile should use -agentvm not -samevm
jjg
parents: 27382
diff changeset
   120
# JT_JAVA is the version of java used to run jtreg/JCK. 
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   121
#
37941
d8b9240efe5d 8156658: Common way to run jtreg tests
sla
parents: 36526
diff changeset
   122
ifndef JT_JAVA
d8b9240efe5d 8156658: Common way to run jtreg tests
sla
parents: 36526
diff changeset
   123
  ifdef JPRT_JAVA_HOME
d8b9240efe5d 8156658: Common way to run jtreg tests
sla
parents: 36526
diff changeset
   124
    JT_JAVA = $(JPRT_JAVA_HOME)
d8b9240efe5d 8156658: Common way to run jtreg tests
sla
parents: 36526
diff changeset
   125
  else
d8b9240efe5d 8156658: Common way to run jtreg tests
sla
parents: 36526
diff changeset
   126
    JT_JAVA = $(SLASH_JAVA)/re/jdk/1.9.0/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
d8b9240efe5d 8156658: Common way to run jtreg tests
sla
parents: 36526
diff changeset
   127
  endif
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   128
endif
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
# Default JDK to test
3779
8b3fc577aec6 6877763: update langtools/test/Makefile for JPRT
jjg
parents: 1261
diff changeset
   131
ifdef JPRT_IMPORT_PRODUCT_HOME
8b3fc577aec6 6877763: update langtools/test/Makefile for JPRT
jjg
parents: 1261
diff changeset
   132
  TESTJAVA = $(JPRT_IMPORT_PRODUCT_HOME)
8b3fc577aec6 6877763: update langtools/test/Makefile for JPRT
jjg
parents: 1261
diff changeset
   133
else
28140
1fa50caeb63b 8066807: langtools/test/Makefile should use -agentvm not -samevm
jjg
parents: 27382
diff changeset
   134
  TESTJAVA = $(SLASH_JAVA)/re/jdk/1.9.0/promoted/latest/binaries/$(PLATFORM)-$(ARCH)
3779
8b3fc577aec6 6877763: update langtools/test/Makefile for JPRT
jjg
parents: 1261
diff changeset
   135
endif
8b3fc577aec6 6877763: update langtools/test/Makefile for JPRT
jjg
parents: 1261
diff changeset
   136
20602
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
   137
# 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
   138
# make/Makefile
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   139
# 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
   140
# 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
   141
#	(i.e, j2sdk-image or jdk-module-image)
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   142
ifdef PRODUCT_HOME
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   143
  ifeq ($(shell [ -r $(PRODUCT_HOME)/dist/lib/classes.jar ]; echo $$?),0)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   144
    TESTBOOTCLASSPATH = $(PRODUCT_HOME)/dist/lib/classes.jar
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   145
  endif
5652
89482b760ef7 6954901: langtools/test/Makefile should check for bin/javac(.exe) instead of lib/tools.jar
jjg
parents: 5647
diff changeset
   146
  ifeq ($(shell [ -r $(PRODUCT_HOME)/bin/javac$(EXE_SUFFIX) ]; echo $$?),0)
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   147
    TESTJAVA = $(PRODUCT_HOME)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   148
  endif
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   149
endif
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   150
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   151
ifdef TESTBOOTCLASSPATH
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   152
  JTREG_OPTIONS += -Xbootclasspath/p:$(TESTBOOTCLASSPATH)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   153
### 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
   154
### 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
   155
  JCK_OPTIONS += \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   156
	-vmoptions:-Xbootclasspath/p:$(TESTBOOTCLASSPATH) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   157
	-refvmoptions:-Xbootclasspath/p:$(TESTBOOTCLASSPATH)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   158
endif
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   159
41449
de8df2220540 8166648: jib make run-test for langtools results in intermittent failures on windows-x86
tbell
parents: 39102
diff changeset
   160
# Set the max memory for jtreg target test JVMs
de8df2220540 8166648: jib make run-test for langtools results in intermittent failures on windows-x86
tbell
parents: 39102
diff changeset
   161
JTREG_TESTVM_MEMORY_OPTION = -vmoption:-Xmx768m
de8df2220540 8166648: jib make run-test for langtools results in intermittent failures on windows-x86
tbell
parents: 39102
diff changeset
   162
JTREG_OPTIONS += $(JTREG_TESTVM_MEMORY_OPTION)
de8df2220540 8166648: jib make run-test for langtools results in intermittent failures on windows-x86
tbell
parents: 39102
diff changeset
   163
42409
6af953b43ebf 8168607: langtools/test/Makefile should set -retain:fail,error by default
erikj
parents: 42406
diff changeset
   164
# Retain all files for failing tests
6af953b43ebf 8168607: langtools/test/Makefile should set -retain:fail,error by default
erikj
parents: 42406
diff changeset
   165
JTREG_OPTIONS += -retain:fail,error
6af953b43ebf 8168607: langtools/test/Makefile should set -retain:fail,error by default
erikj
parents: 42406
diff changeset
   166
37941
d8b9240efe5d 8156658: Common way to run jtreg tests
sla
parents: 36526
diff changeset
   167
ifdef EXTRA_JTREG_OPTIONS
d8b9240efe5d 8156658: Common way to run jtreg tests
sla
parents: 36526
diff changeset
   168
  JTREG_OPTIONS += $(EXTRA_JTREG_OPTIONS)
d8b9240efe5d 8156658: Common way to run jtreg tests
sla
parents: 36526
diff changeset
   169
endif
d8b9240efe5d 8156658: Common way to run jtreg tests
sla
parents: 36526
diff changeset
   170
20602
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
   171
# Concurrency is the number of tests that can execute at once.
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   172
# On an otherwise empty machine, suggest setting to (#cpus + 2)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   173
# If unset, the default is (#cpus)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   174
### RFE: determine and use #cpus
14546
7e2a1569de76 8003357: Add support for jtreg -concurrency to langtools/test/Makefile
jjh
parents: 12084
diff changeset
   175
ifdef CONCURRENCY
7e2a1569de76 8003357: Add support for jtreg -concurrency to langtools/test/Makefile
jjh
parents: 12084
diff changeset
   176
  JTREG_OPTIONS += -agentvm -concurrency:$(CONCURRENCY)
7e2a1569de76 8003357: Add support for jtreg -concurrency to langtools/test/Makefile
jjh
parents: 12084
diff changeset
   177
else
28140
1fa50caeb63b 8066807: langtools/test/Makefile should use -agentvm not -samevm
jjg
parents: 27382
diff changeset
   178
  JTREG_OPTIONS += -agentvm
14546
7e2a1569de76 8003357: Add support for jtreg -concurrency to langtools/test/Makefile
jjh
parents: 12084
diff changeset
   179
endif
7e2a1569de76 8003357: Add support for jtreg -concurrency to langtools/test/Makefile
jjh
parents: 12084
diff changeset
   180
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   181
ifdef JCK_CONCURRENCY
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   182
  JCK_OPTIONS += -concurrency:$(JCK_CONCURRENCY)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   183
endif
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   184
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   185
# JCK is executed using "Multi-JVM Group Mode", which is a hybrid
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   186
# of otherVM and sameVM modes. New JVMs are created and reused for
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   187
# a number of tests, then eventually discarded and a new one started.
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   188
# This amortizes the JVM startup time.  The "group size" defines
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   189
# how many tests are run in a JVM before it is replaced.
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   190
# If unset, the default is 100.
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   191
JCK_GROUP_SIZE = 1000
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   192
ifdef JCK_GROUP_SIZE
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   193
  JCK_COMPILER_OPTIONS += \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   194
    -jtoptions:-Ejck.env.compiler.testCompile.groupMode.groupSize=$(JCK_GROUP_SIZE) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   195
    -jtoptions:-Ejck.env.compiler.compRefExecute.groupMode.groupSize=$(JCK_GROUP_SIZE)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   196
### The following is not supported. Awaiting RFE 6924287
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   197
### 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
   198
###  JCK_RUNTIME_OPTIONS += \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   199
###    -jtoptions:-Ejck.env.runtime.testCompile.groupMode.groupSize=$(JCK_GROUP_SIZE)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   200
endif
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   201
5647
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   202
# 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
   203
ifdef JPRT_JOB_ID
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   204
  ifndef JTREG_TIMEOUT_FACTOR
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   205
    JTREG_TIMEOUT_FACTOR = 3
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   206
  endif
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   207
endif
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   208
ifdef JTREG_TIMEOUT_FACTOR
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   209
  JTREG_OPTIONS += -timeoutFactor:$(JTREG_TIMEOUT_FACTOR)
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   210
endif
9a0b03523aa9 6952188: update timeout for langtools jtreg tests on JPRT
jjg
parents: 5214
diff changeset
   211
27382
60a3693d0d87 8062449: Update langtools/test/Makefile to use JCK 9
dlsmith
parents: 24405
diff changeset
   212
ifdef JCK_TIMEOUT_FACTOR
60a3693d0d87 8062449: Update langtools/test/Makefile to use JCK 9
dlsmith
parents: 24405
diff changeset
   213
  JCK_OPTIONS += -timeout:$(JCK_TIMEOUT_FACTOR)
60a3693d0d87 8062449: Update langtools/test/Makefile to use JCK 9
dlsmith
parents: 24405
diff changeset
   214
endif
60a3693d0d87 8062449: Update langtools/test/Makefile to use JCK 9
dlsmith
parents: 24405
diff changeset
   215
24405
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   216
# Default verbosity setting for jtreg
42406
3a2f57a44b57 8166737: default langtools make test settings result in no ouput
erikj
parents: 42276
diff changeset
   217
JTREG_VERBOSE ?= fail,error,time
24405
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   218
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   219
# Default verbosity setting for jck
39102
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
   220
JCK_VERBOSE ?= non-pass
24405
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   221
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   222
# Assertions: some tests show failures when assertions are enabled.
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   223
# Since javac is typically loaded via the bootclassloader (either via TESTJAVA
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   224
# or TESTBOOTCLASSPATH), you may need -esa to enable assertions in javac.
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   225
JTREG_OPTIONS += $(ASSERTION_OPTIONS)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   226
JCK_OPTIONS += $(ASSERTION_OPTIONS:%=-vmoptions:%)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   227
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   228
# Include shared options
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   229
JCK_COMPILER_OPTIONS += $(JCK_OPTIONS)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   230
JCK_RUNTIME_OPTIONS += $(JCK_OPTIONS)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   231
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   232
# Exit codes:
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   233
# jtreg, jck:   0: OK, 1: tests failed, 2: tests error; 3+: SERIOUS
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   234
FATAL_JTREG_EXIT = 3
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   235
FATAL_JCK_EXIT = 3
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   236
# jtdiff: 0: OK, 1: differences found; 2+: SERIOUS
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   237
FATAL_JTDIFF_EXIT = 2
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   238
#
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   239
# Exit -- used for final "normal" exit from "make". Redefine to "true" to avoid
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   240
# having make exit with non-zero return code.
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   241
EXIT = exit
20602
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
   242
# 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
   243
# to a given level. Redefine function or preceding FATAL_*_EXIT codes as needed.
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   244
EXIT_IF_FATAL = status=$$?; if [ $$status -ge $(1) ]; then exit $$status ; fi
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   245
06bc494ca11e Initial load
duke
parents:
diff changeset
   246
# Root of all test results
42968
2e5d313df9fd 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42409
diff changeset
   247
TEST_OUTPUT_DIR ?= $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   248
ABS_TEST_OUTPUT_DIR := \
20602
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
   249
	$(shell mkdir -p $(TEST_OUTPUT_DIR); \
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
   250
		cd  $(TEST_OUTPUT_DIR); \
10947
47788da3eb3f 7101933: langtools jtreg tests do not work with jprt on windows
jjh
parents: 5652
diff changeset
   251
		pwd $(CYGPATH))
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   252
# Subdirectories for different test runs
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   253
JTREG_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jtreg
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   254
JCK_COMPILER_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jck-compiler
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   255
JCK_RUNTIME_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jck-runtime-Xcompile
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   256
41632
c599331f6040 8167600: jib make run-test for langtools and intermittent failures on windows-x86
tbell
parents: 41520
diff changeset
   257
# Is the test JVM 32-bit?
c599331f6040 8167600: jib make run-test for langtools and intermittent failures on windows-x86
tbell
parents: 41520
diff changeset
   258
DATA_MODEL := \
41853
1b8722f62d87 8168369: fix for langtools intermittent failures needs to check PRODUCT_HOME
tbell
parents: 41632
diff changeset
   259
	$(shell $(TESTJAVA)/bin/java -XshowSettings:properties -version 2>&1 | \
41632
c599331f6040 8167600: jib make run-test for langtools and intermittent failures on windows-x86
tbell
parents: 41520
diff changeset
   260
		grep 'sun\.arch\.data\.model' | \
c599331f6040 8167600: jib make run-test for langtools and intermittent failures on windows-x86
tbell
parents: 41520
diff changeset
   261
		awk '{print $$3}')
c599331f6040 8167600: jib make run-test for langtools and intermittent failures on windows-x86
tbell
parents: 41520
diff changeset
   262
ifeq ($(DATA_MODEL), 32)
c599331f6040 8167600: jib make run-test for langtools and intermittent failures on windows-x86
tbell
parents: 41520
diff changeset
   263
  # Set the GC options for test vms having a smaller address space
c599331f6040 8167600: jib make run-test for langtools and intermittent failures on windows-x86
tbell
parents: 41520
diff changeset
   264
  JTREG_GC_OPTION = -vmoption:-XX:+UseSerialGC
c599331f6040 8167600: jib make run-test for langtools and intermittent failures on windows-x86
tbell
parents: 41520
diff changeset
   265
  JTREG_OPTIONS += $(JTREG_GC_OPTION)
c599331f6040 8167600: jib make run-test for langtools and intermittent failures on windows-x86
tbell
parents: 41520
diff changeset
   266
endif
c599331f6040 8167600: jib make run-test for langtools and intermittent failures on windows-x86
tbell
parents: 41520
diff changeset
   267
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   268
# Default make rule -- warning, may take a while
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   269
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
   270
	@echo "Testing completed successfully"
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   271
15030
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents: 14546
diff changeset
   272
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
   273
	@echo "Testing completed successfully"
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   274
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   275
jck-compiler: $(JPRT_CLEAN) jck-compiler-tests $(JPRT_ARCHIVE_BUNDLE) jck-compiler-summary
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   276
	@echo "Testing completed successfully"
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   277
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   278
jck-runtime: $(JPRT_CLEAN) jck-runtime-tests $(JPRT_ARCHIVE_BUNDLE) jck-runtime-summary
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   279
	@echo "Testing completed successfully"
06bc494ca11e Initial load
duke
parents:
diff changeset
   280
39102
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
   281
# a way to select tests from outside
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
   282
# works for targets 'jtreg', 'jck-compiler', and 'jck-runtime'
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
   283
ifdef TEST_SELECTION
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
   284
  JTREG_TESTDIRS = $(TEST_SELECTION)
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
   285
  JCK_COMPILER_TESTDIRS = $(TEST_SELECTION)
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
   286
  JCK_RUNTIME_TESTDIRS = $(TEST_SELECTION)
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
   287
endif
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
   288
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   289
# for use with JPRT -testrule
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   290
all:		JTREG_TESTDIRS = .
39102
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
   291
jtreg:		JTREG_TESTDIRS ?= .
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   292
apt:		JTREG_TESTDIRS = tools/apt
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   293
javac: 		JTREG_TESTDIRS = tools/javac
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   294
javadoc:	JTREG_TESTDIRS = tools/javadoc com/sun/javadoc
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   295
javah:		JTREG_TESTDIRS = tools/javah
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   296
javap:		JTREG_TESTDIRS = tools/javap
15030
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents: 14546
diff changeset
   297
jdeps:		JTREG_TESTDIRS = tools/jdeps
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   298
37941
d8b9240efe5d 8156658: Common way to run jtreg tests
sla
parents: 36526
diff changeset
   299
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   300
# Run jtreg tests
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   301
#
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   302
# JTREG_HOME
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   303
#	Installed location of jtreg
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   304
# JT_JAVA
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   305
#	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
   306
# TESTJAVA
20602
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
   307
# 	Version of java to be tested.
24405
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   308
# JTREG_VERBOSE
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   309
# Verbosity setting for jtreg
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   310
# JTREG_OPTIONS
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   311
#	Additional options for jtreg
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   312
# JTREG_TESTDIRS
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   313
#	Directories of tests to be run
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   314
# JTREG_OUTPUT_DIR
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   315
#	Where to write the results
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   316
# JTREG_REFERENCE
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   317
#	(Optional) reference results (e.g. work, report or summary.txt)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   318
#
12084
b367473ef0f1 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10947
diff changeset
   319
jtreg_tests: jtreg-tests
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   320
jtreg-tests: check-jtreg FRC
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   321
	@rm -f -r $(JTREG_OUTPUT_DIR)/JTwork $(JTREG_OUTPUT_DIR)/JTreport \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   322
	    $(JTREG_OUTPUT_DIR)/diff.html $(JTREG_OUTPUT_DIR)/status.txt
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   323
	@mkdir -p $(JTREG_OUTPUT_DIR)
42276
2765a352dc07 8170279: Langtools test/Makefile ignores failed tests
erikj
parents: 41853
diff changeset
   324
	( JT_JAVA=$(JT_JAVA) $(JTREG) \
24405
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   325
	  -a -ignore:quiet $(if $(JTREG_VERBOSE),-v:$(JTREG_VERBOSE)) \
37941
d8b9240efe5d 8156658: Common way to run jtreg tests
sla
parents: 36526
diff changeset
   326
	  -r:$(JTREG_OUTPUT_DIR)/JTreport \
d8b9240efe5d 8156658: Common way to run jtreg tests
sla
parents: 36526
diff changeset
   327
	  -w:$(JTREG_OUTPUT_DIR)/JTwork \
d8b9240efe5d 8156658: Common way to run jtreg tests
sla
parents: 36526
diff changeset
   328
	  -jdk:$(TESTJAVA) \
d8b9240efe5d 8156658: Common way to run jtreg tests
sla
parents: 36526
diff changeset
   329
	  $(JAVA_ARGS:%=-vmoption:%) \
d8b9240efe5d 8156658: Common way to run jtreg tests
sla
parents: 36526
diff changeset
   330
	  $(JTREG_EXCLUSIONS) \
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   331
	  $(JTREG_OPTIONS) \
37941
d8b9240efe5d 8156658: Common way to run jtreg tests
sla
parents: 36526
diff changeset
   332
	  $(JTREG_TESTDIRS) \
42276
2765a352dc07 8170279: Langtools test/Makefile ignores failed tests
erikj
parents: 41853
diff changeset
   333
	  || ( $(call EXIT_IF_FATAL,$(FATAL_JTREG_EXIT)) ; \
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   334
	    echo $$status > $(JTREG_OUTPUT_DIR)/status.txt \
42276
2765a352dc07 8170279: Langtools test/Makefile ignores failed tests
erikj
parents: 41853
diff changeset
   335
	  ) \
2765a352dc07 8170279: Langtools test/Makefile ignores failed tests
erikj
parents: 41853
diff changeset
   336
	) 2>&1 | tee $(JTREG_OUTPUT_DIR)/output.txt
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   337
ifdef JTREG_REFERENCE
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   338
	JT_JAVA=$(JT_JAVA) $(JTDIFF) -o $(JTREG_OUTPUT_DIR)/diff.html \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   339
	    $(JTREG_REFERENCE) $(JTREG_OUTPUT_DIR)/JTreport \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   340
	|| ( $(call EXIT_IF_FATAL,$(FATAL_JTDIFF_EXIT)) )
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   341
endif
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   342
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   343
jtreg-summary: FRC
27382
60a3693d0d87 8062449: Update langtools/test/Makefile to use JCK 9
dlsmith
parents: 24405
diff changeset
   344
	@if [ -r $(JTREG_OUTPUT_DIR)/status.txt ]; then \
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   345
	    echo ; echo "Summary of jtreg test failures" ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   346
	    cat $(JTREG_OUTPUT_DIR)/JTreport/text/summary.txt | \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   347
		grep -v 'Not run' | grep -v 'Passed' ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   348
	    echo ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   349
	    $(EXIT) `cat $(JTREG_OUTPUT_DIR)/status.txt` ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   350
	fi
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   351
06bc494ca11e Initial load
duke
parents:
diff changeset
   352
# 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
   353
check-jtreg: $(PRODUCT_HOME) $(JTREG)
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   354
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   355
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   356
# Run JCK-compiler tests
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   357
#
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   358
# JCK_HOME
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   359
#	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
   360
#       Default is JCK 8.
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   361
# JT_JAVA
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   362
#	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
   363
#       Default is JDK 7
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   364
# TESTJAVA
20602
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
   365
# 	Version of java to be tested.
24405
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   366
# JCK_VERBOSE
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   367
#	Verbosity setting for jtjck
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   368
# JCK_COMPILER_OPTIONS
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   369
#	Additional options for JCK-compiler
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   370
# JCK_COMPILER_TESTDIRS
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   371
#	Directories of tests to be run
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   372
# JCK_COMPILER_OUTPUT_DIR
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   373
#	Where to write the results
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   374
# JCK_COMPILER_REFERENCE
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   375
#	(Optional) reference results (e.g. work, report or summary.txt)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   376
#
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   377
jck-compiler-tests: check-jck FRC
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   378
	@rm -f -r $(JCK_COMPILER_OUTPUT_DIR)/work $(JCK_COMPILER_OUTPUT_DIR)/report \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   379
	    $(JCK_COMPILER_OUTPUT_DIR)/diff.html $(JCK_COMPILER_OUTPUT_DIR)/status.txt
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   380
	@mkdir -p $(JCK_COMPILER_OUTPUT_DIR)
43261
d377e97291d8 8138725: Add options for Javadoc generation
jjg
parents: 42968
diff changeset
   381
	$(JT_JAVA)/bin/java -Xmx1024m \
27382
60a3693d0d87 8062449: Update langtools/test/Makefile to use JCK 9
dlsmith
parents: 24405
diff changeset
   382
	    -jar $(JCK_HOME)/JCK-compiler-9/lib/jtjck.jar \
60a3693d0d87 8062449: Update langtools/test/Makefile to use JCK 9
dlsmith
parents: 24405
diff changeset
   383
	    $(if $(JCK_VERBOSE),$(if $(filter $(JCK_VERBOSE),summary),-v,-v:$(JCK_VERBOSE))) \
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   384
            -r:$(JCK_COMPILER_OUTPUT_DIR)/report \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   385
            -w:$(JCK_COMPILER_OUTPUT_DIR)/work \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   386
            -jdk:$(TESTJAVA) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   387
	    $(JCK_COMPILER_OPTIONS) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   388
            $(JCK_COMPILER_TESTDIRS) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   389
	|| ( $(call EXIT_IF_FATAL,$(FATAL_JCK_EXIT)) ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   390
	    echo $$status > $(JCK_COMPILER_OUTPUT_DIR)/status.txt \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   391
	)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   392
ifdef JCK_COMPILER_REFERENCE
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   393
	JT_JAVA=$(JT_JAVA) $(JTDIFF) -o $(JCK_COMPILER_OUTPUT_DIR)/diff.html \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   394
	    $(JCK_COMPILER_REFERENCE) $(JCK_COMPILER_OUTPUT_DIR)/report \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   395
	|| ( $(call EXIT_IF_FATAL,$(FATAL_JTDIFF_EXIT)) )
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   396
endif
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   397
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   398
jck-compiler-summary: FRC
27382
60a3693d0d87 8062449: Update langtools/test/Makefile to use JCK 9
dlsmith
parents: 24405
diff changeset
   399
	@if [ -r $(JCK_COMPILER_OUTPUT_DIR)/status.txt ]; then \
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   400
	    echo ; echo "Summary of JCK-compiler test failures" ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   401
	    cat $(JCK_COMPILER_OUTPUT_DIR)/report/text/summary.txt | \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   402
		grep -v 'Not run' | grep -v 'Passed' ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   403
	    echo ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   404
	    $(EXIT) `cat $(JCK_COMPILER_OUTPUT_DIR)/status.txt` ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   405
	fi
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   406
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   407
# Run JCK-runtime tests in -Xcompile mode
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   408
# 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
   409
# Normal JCK-runtime invocation belongs in the jdk/ repository.
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   410
#
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   411
# JCK_HOME
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   412
#	Installed location of JCK: should include JCK-compiler, JCK-runtime and JCK-extras
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   413
# JT_JAVA
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   414
#	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
   415
# TESTJAVA
20602
88692440ebd1 8024842: Define ABS_TEST_OUTPUT_DIR via TEST_OUTPUT_DIR
mduigou
parents: 15384
diff changeset
   416
# 	Version of java to be tested.
24405
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   417
# JCK_VERBOSE
71b654b695b7 8042882: Support verbosity options in langtools testing
dlsmith
parents: 20602
diff changeset
   418
#	Verbosity setting for jtjck
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   419
# JCK_RUNTIME_OPTIONS
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   420
#	Additional options for JCK-runtime
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   421
# JCK_RUNTIME_TESTDIRS
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   422
#	Directories of tests to be run
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   423
# JCK_RUNTIME_OUTPUT_DIR
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   424
#	Where to write the results
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   425
# JCK_RUNTIME_REFERENCE
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   426
#	(Optional) reference results (e.g. work, report or summary.txt)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   427
#
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   428
jck-runtime-tests: check-jck FRC
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   429
	@rm -f -r $(JCK_RUNTIME_OUTPUT_DIR)/work $(JCK_RUNTIME_OUTPUT_DIR)/report \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   430
	    $(JCK_RUNTIME_OUTPUT_DIR)/diff.html $(JCK_RUNTIME_OUTPUT_DIR)/status.txt
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   431
	@mkdir -p $(JCK_RUNTIME_OUTPUT_DIR)
43261
d377e97291d8 8138725: Add options for Javadoc generation
jjg
parents: 42968
diff changeset
   432
	$(JT_JAVA)/bin/java -Xmx1024m \
27382
60a3693d0d87 8062449: Update langtools/test/Makefile to use JCK 9
dlsmith
parents: 24405
diff changeset
   433
	    -jar $(JCK_HOME)/JCK-runtime-9/lib/jtjck.jar \
60a3693d0d87 8062449: Update langtools/test/Makefile to use JCK 9
dlsmith
parents: 24405
diff changeset
   434
	    $(if $(JCK_VERBOSE),$(if $(filter $(JCK_VERBOSE),summary),-v,-v:$(JCK_VERBOSE))) \
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   435
            -r:$(JCK_RUNTIME_OUTPUT_DIR)/report \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   436
            -w:$(JCK_RUNTIME_OUTPUT_DIR)/work \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   437
            -jdk:$(TESTJAVA) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   438
	    -Xcompile \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   439
	    $(JCK_RUNTIME_OPTIONS) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   440
            $(JCK_RUNTIME_TESTDIRS) \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   441
	|| ( $(call EXIT_IF_FATAL,$(FATAL_JCK_EXIT)) ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   442
	    echo $$status > $(JCK_RUNTIME_OUTPUT_DIR)/status.txt \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   443
	)
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   444
ifdef JCK_RUNTIME_REFERENCE
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   445
	JT_JAVA=$(JT_JAVA) $(JTDIFF) -o $(JCK_RUNTIME_OUTPUT_DIR)/diff.html \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   446
	    $(JCK_RUNTIME_REFERENCE) $(JCK_RUNTIME_OUTPUT_DIR)/report \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   447
	|| ( $(call EXIT_IF_FATAL,$(FATAL_JTDIFF_EXIT)) )
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   448
endif
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   449
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   450
jck-runtime-summary: FRC
27382
60a3693d0d87 8062449: Update langtools/test/Makefile to use JCK 9
dlsmith
parents: 24405
diff changeset
   451
	@if [ -r $(JCK_RUNTIME_OUTPUT_DIR)/status.txt ]; then \
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   452
	    echo ; echo "Summary of JCK-runtime test failures" ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   453
	    cat $(JCK_RUNTIME_OUTPUT_DIR)/report/text/summary.txt | \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   454
		grep -v 'Not run' | grep -v 'Passed' ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   455
	    echo ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   456
	    $(EXIT) `cat $(JCK_RUNTIME_OUTPUT_DIR)/status.txt` ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   457
	fi
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   458
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   459
# Check to make sure these directories exist
35352
5558ce88298a 8147930: Langtools test Makefile still requires special make in Cygwin
erikj
parents: 28141
diff changeset
   460
check-jck:
39102
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
   461
	@if [ ! -d '$(JCK_HOME)' ]; then \
35354
a9c8e2634f92 8147995: 8147930 uses incorrect whitespace in langtools/test/Makefile
jjg
parents: 35352
diff changeset
   462
	    echo "JCK_HOME $(JCK_HOME) missing" ; \
a9c8e2634f92 8147995: 8147930 uses incorrect whitespace in langtools/test/Makefile
jjg
parents: 35352
diff changeset
   463
	    $(EXIT) 1 ; \
a9c8e2634f92 8147995: 8147930 uses incorrect whitespace in langtools/test/Makefile
jjg
parents: 35352
diff changeset
   464
	fi
39102
5a820f7e00b9 8158992: langtools/test/Makefile: improve support for control via variables
dlsmith
parents: 37941
diff changeset
   465
	@if [ ! -d '$(PRODUCT_HOME)' ]; then \
35354
a9c8e2634f92 8147995: 8147930 uses incorrect whitespace in langtools/test/Makefile
jjg
parents: 35352
diff changeset
   466
	    echo "PRODUCT_HOME $(PRODUCT_HOME) missing" ; \
a9c8e2634f92 8147995: 8147930 uses incorrect whitespace in langtools/test/Makefile
jjg
parents: 35352
diff changeset
   467
	    $(EXIT) 1 ; \
a9c8e2634f92 8147995: 8147930 uses incorrect whitespace in langtools/test/Makefile
jjg
parents: 35352
diff changeset
   468
	fi
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   469
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   470
all-summary: FRC
27382
60a3693d0d87 8062449: Update langtools/test/Makefile to use JCK 9
dlsmith
parents: 24405
diff changeset
   471
	@if [ -n "`find $(TEST_OUTPUT_DIR) -name status.txt`" ]; then
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   472
	    echo ; echo "Summary of test failures" ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   473
	    cat `find $(TEST_OUTPUT_DIR) -name summary.txt` | \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   474
		grep -v 'Not run' | grep -v 'Passed' ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   475
	    echo ; \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   476
	    $(EXIT) 1
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   477
	fi
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   478
06bc494ca11e Initial load
duke
parents:
diff changeset
   479
# Bundle up the results
06bc494ca11e Initial load
duke
parents:
diff changeset
   480
$(JPRT_ARCHIVE_BUNDLE): FRC
06bc494ca11e Initial load
duke
parents:
diff changeset
   481
	@rm -f $@
06bc494ca11e Initial load
duke
parents:
diff changeset
   482
	@mkdir -p $(@D)
06bc494ca11e Initial load
duke
parents:
diff changeset
   483
	( cd $(TEST_OUTPUT_DIR) && zip -q -r $@ . )
06bc494ca11e Initial load
duke
parents:
diff changeset
   484
06bc494ca11e Initial load
duke
parents:
diff changeset
   485
# Cleanup
06bc494ca11e Initial load
duke
parents:
diff changeset
   486
clean:
06bc494ca11e Initial load
duke
parents:
diff changeset
   487
	rm -f $(JPRT_ARCHIVE_BUNDLE)
06bc494ca11e Initial load
duke
parents:
diff changeset
   488
06bc494ca11e Initial load
duke
parents:
diff changeset
   489
# Used to force a target rules to run
06bc494ca11e Initial load
duke
parents:
diff changeset
   490
FRC:
06bc494ca11e Initial load
duke
parents:
diff changeset
   491
06bc494ca11e Initial load
duke
parents:
diff changeset
   492
# Phony targets (e.g. these are not filenames)
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   493
.PHONY: all clean \
15030
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents: 14546
diff changeset
   494
	jtreg javac javadoc javah javap jdeps jtreg-tests jtreg-summary check-jtreg \
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   495
	jck-compiler jck-compiler-tests jck-compiler-summary \
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   496
	jck-runtime jck-runtime-tests jck-runtime-summary check-jck
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   497
5214
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   498
# No use of suffix rules
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   499
.SUFFIXES:
b71be6b1f652 6934224: update langtools/test/Makefile
jjg
parents: 3779
diff changeset
   500