langtools/test/Makefile
changeset 10947 47788da3eb3f
parent 5652 89482b760ef7
child 12084 b367473ef0f1
equal deleted inserted replaced
10946:dff783bb105d 10947:47788da3eb3f
    17 # or indirectly, via FOREST/test/Makefile, as part of a control build.
    17 # or indirectly, via FOREST/test/Makefile, as part of a control build.
    18 
    18 
    19 # Get OS/ARCH specifics
    19 # Get OS/ARCH specifics
    20 OSNAME = $(shell uname -s)
    20 OSNAME = $(shell uname -s)
    21 ifeq ($(OSNAME), SunOS)
    21 ifeq ($(OSNAME), SunOS)
       
    22   SLASH_JAVA = /java
    22   PLATFORM = solaris
    23   PLATFORM = solaris
    23   JT_PLATFORM = solaris
    24   JT_PLATFORM = solaris
    24   ARCH = $(shell uname -p)
    25   ARCH = $(shell uname -p)
    25   ifeq ($(ARCH), i386)
    26   ifeq ($(ARCH), i386)
    26     ARCH=i586
    27     ARCH=i586
    27   endif
    28   endif
    28 endif
    29 endif
    29 ifeq ($(OSNAME), Linux)
    30 ifeq ($(OSNAME), Linux)
       
    31   SLASH_JAVA = /java
    30   PLATFORM = linux
    32   PLATFORM = linux
    31   JT_PLATFORM = linux
    33   JT_PLATFORM = linux
    32   ARCH = $(shell uname -m)
    34   ARCH = $(shell uname -m)
    33   ifeq ($(ARCH), i386)
    35   ifeq ($(ARCH), i386)
    34     ARCH=i586
    36     ARCH=i586
    35   endif
    37   endif
    36 endif
    38 endif
    37 ifeq ($(OSNAME), Windows_NT)
    39 ifeq ($(OSNAME), Windows_NT)
       
    40   # MKS
       
    41   PLATFORM=windows
       
    42 endif
       
    43 ifeq ($(PLATFORM),)
    38   PLATFORM = windows
    44   PLATFORM = windows
       
    45   CYGPATH = | cygpath -m -s -f -
       
    46 endif
       
    47 
       
    48 ifeq ($(PLATFORM), windows)
       
    49   SLASH_JAVA = J:
    39   JT_PLATFORM = win32
    50   JT_PLATFORM = win32
    40   ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),ia64)
    51   ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),ia64)
    41     ARCH=ia64
    52     ARCH=ia64
    42   else
    53   else
    43     ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),AMD64)
    54     ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),AMD64)
    52   endif
    63   endif
    53   EXE_SUFFIX=.exe
    64   EXE_SUFFIX=.exe
    54 endif
    65 endif
    55 
    66 
    56 # Root of this test area (important to use full paths in some places)
    67 # Root of this test area (important to use full paths in some places)
    57 TEST_ROOT := $(shell pwd)
    68 TEST_ROOT := $(shell pwd $(CYGPATH) )
    58 
    69 
    59 # Default bundle of all test results (passed or not) (JPRT only)
    70 # Default bundle of all test results (passed or not) (JPRT only)
    60 ifdef JPRT_JOB_ID
    71 ifdef JPRT_JOB_ID
    61   JPRT_CLEAN = clean
    72   JPRT_CLEAN = clean
    62   JPRT_ARCHIVE_BUNDLE = $(TEST_ROOT)/JPRT_ARCHIVE_BUNDLE.zip
    73   JPRT_ARCHIVE_BUNDLE = $(TEST_ROOT)/JPRT_ARCHIVE_BUNDLE.zip
    70 
    81 
    71 # Default JTREG to run
    82 # Default JTREG to run
    72 ifdef JPRT_JTREG_HOME
    83 ifdef JPRT_JTREG_HOME
    73   JTREG_HOME = $(JPRT_JTREG_HOME)
    84   JTREG_HOME = $(JPRT_JTREG_HOME)
    74 else
    85 else
    75   JTREG_HOME = $(SLASH_JAVA)/re/jtreg/4.0/promoted/latest/binaries/jtreg
    86   JTREG_HOME = $(SLASH_JAVA)/re/jtreg/4.1/promoted/latest/binaries/jtreg
    76 endif
    87 endif
    77 JTREG = $(JTREG_HOME)/$(JT_PLATFORM)/bin/jtreg
    88 JTREG = $(JTREG_HOME)/$(JT_PLATFORM)/bin/jtreg
    78 JTDIFF = $(JTREG_HOME)/$(JT_PLATFORM)/bin/jtdiff
    89 JTDIFF = $(JTREG_HOME)/$(JT_PLATFORM)/bin/jtdiff
    79 
    90 
    80 # Default JCK to run
    91 # Default JCK to run
    81 ifdef JPRT_JCK_HOME
    92 ifdef JPRT_JCK_HOME
    82   JCK_HOME = $(JPRT_JCK_HOME)
    93   JCK_HOME = $(JPRT_JCK_HOME)
    83 else
    94 else
    84   JCK_HOME = $(SLASH_JAVA)/re/jck/7/promoted/latest/binaries
    95   JCK_HOME = $(SLASH_JAVA)/re/jck/8/promoted/latest/binaries
    85 endif
    96 endif
    86 
    97 
    87 # Default JDK for JTREG and JCK
    98 # Default JDK for JTREG and JCK
    88 #
    99 #
    89 # JT_JAVA is the version of java used to run jtreg/JCK. Since it is now
   100 # JT_JAVA is the version of java used to run jtreg/JCK. Since it is now
    91 # same as TESTJAVA (although not necessarily so.)
   102 # same as TESTJAVA (although not necessarily so.)
    92 #
   103 #
    93 ifdef JPRT_JAVA_HOME
   104 ifdef JPRT_JAVA_HOME
    94   JT_JAVA = $(JPRT_JAVA_HOME)
   105   JT_JAVA = $(JPRT_JAVA_HOME)
    95 else
   106 else
    96   JT_JAVA = $(SLASH_JAVA)/re/jdk/1.6.0/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
   107   JT_JAVA = $(SLASH_JAVA)/re/jdk/1.7.0/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
    97 endif
   108 endif
    98 
   109 
    99 # Default JDK to test
   110 # Default JDK to test
   100 ifdef JPRT_IMPORT_PRODUCT_HOME
   111 ifdef JPRT_IMPORT_PRODUCT_HOME
   101   TESTJAVA = $(JPRT_IMPORT_PRODUCT_HOME)
   112   TESTJAVA = $(JPRT_IMPORT_PRODUCT_HOME)
   193 # Root of all test results
   204 # Root of all test results
   194 TEST_OUTPUT_DIR = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools
   205 TEST_OUTPUT_DIR = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools
   195 ABS_TEST_OUTPUT_DIR := \
   206 ABS_TEST_OUTPUT_DIR := \
   196 	$(shell mkdir -p $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools; \
   207 	$(shell mkdir -p $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools; \
   197 		cd  $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools; \
   208 		cd  $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools; \
   198 		pwd )
   209 		pwd $(CYGPATH))
   199 # Subdirectories for different test runs
   210 # Subdirectories for different test runs
   200 JTREG_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jtreg
   211 JTREG_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jtreg
   201 JCK_COMPILER_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jck-compiler
   212 JCK_COMPILER_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jck-compiler
   202 JCK_RUNTIME_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jck-runtime-Xcompile
   213 JCK_RUNTIME_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jck-runtime-Xcompile
   203 
   214 
   270 	    echo ; \
   281 	    echo ; \
   271 	    $(EXIT) `cat $(JTREG_OUTPUT_DIR)/status.txt` ; \
   282 	    $(EXIT) `cat $(JTREG_OUTPUT_DIR)/status.txt` ; \
   272 	fi
   283 	fi
   273 
   284 
   274 # Check to make sure these directories exist
   285 # Check to make sure these directories exist
   275 check-jtreg: $(JT_HOME) $(PRODUCT_HOME) $(JTREG)
   286 check-jtreg: $(PRODUCT_HOME) $(JTREG)
   276 
   287 
   277 
   288 
   278 # Run JCK-compiler tests
   289 # Run JCK-compiler tests
   279 #
   290 #
   280 # JCK_HOME
   291 # JCK_HOME
   281 #	Installed location of JCK: should include JCK-compiler, and JCK-extras
   292 #	Installed location of JCK: should include JCK-compiler, and JCK-extras
       
   293 #       Default is JCK 8.
   282 # JT_JAVA
   294 # JT_JAVA
   283 #	Version of java used to run JCK.  Should normally be the same as TESTJAVA
   295 #	Version of java used to run JCK.  Should normally be the same as TESTJAVA
       
   296 #       Default is JDK 7
   284 # TESTJAVA
   297 # TESTJAVA
   285 # 	Version of java to be tested.  
   298 # 	Version of java to be tested.  
   286 # JCK_COMPILER_OPTIONS
   299 # JCK_COMPILER_OPTIONS
   287 #	Additional options for JCK-compiler
   300 #	Additional options for JCK-compiler
   288 # JCK_COMPILER_TESTDIRS
   301 # JCK_COMPILER_TESTDIRS
   295 jck-compiler-tests: check-jck FRC
   308 jck-compiler-tests: check-jck FRC
   296 	@rm -f -r $(JCK_COMPILER_OUTPUT_DIR)/work $(JCK_COMPILER_OUTPUT_DIR)/report \
   309 	@rm -f -r $(JCK_COMPILER_OUTPUT_DIR)/work $(JCK_COMPILER_OUTPUT_DIR)/report \
   297 	    $(JCK_COMPILER_OUTPUT_DIR)/diff.html $(JCK_COMPILER_OUTPUT_DIR)/status.txt
   310 	    $(JCK_COMPILER_OUTPUT_DIR)/diff.html $(JCK_COMPILER_OUTPUT_DIR)/status.txt
   298 	@mkdir -p $(JCK_COMPILER_OUTPUT_DIR)
   311 	@mkdir -p $(JCK_COMPILER_OUTPUT_DIR)
   299 	$(JT_JAVA)/bin/java -XX:MaxPermSize=256m -Xmx512m \
   312 	$(JT_JAVA)/bin/java -XX:MaxPermSize=256m -Xmx512m \
   300 	    -jar $(JCK_HOME)/JCK-compiler-7/lib/jtjck.jar \
   313 	    -jar $(JCK_HOME)/JCK-compiler-8/lib/jtjck.jar \
   301 	    -v:non-pass \
   314 	    -v:non-pass \
   302             -r:$(JCK_COMPILER_OUTPUT_DIR)/report \
   315             -r:$(JCK_COMPILER_OUTPUT_DIR)/report \
   303             -w:$(JCK_COMPILER_OUTPUT_DIR)/work \
   316             -w:$(JCK_COMPILER_OUTPUT_DIR)/work \
   304             -jdk:$(TESTJAVA) \
   317             -jdk:$(TESTJAVA) \
   305 	    $(JCK_COMPILER_OPTIONS) \
   318 	    $(JCK_COMPILER_OPTIONS) \
   344 jck-runtime-tests: check-jck FRC
   357 jck-runtime-tests: check-jck FRC
   345 	@rm -f -r $(JCK_RUNTIME_OUTPUT_DIR)/work $(JCK_RUNTIME_OUTPUT_DIR)/report \
   358 	@rm -f -r $(JCK_RUNTIME_OUTPUT_DIR)/work $(JCK_RUNTIME_OUTPUT_DIR)/report \
   346 	    $(JCK_RUNTIME_OUTPUT_DIR)/diff.html $(JCK_RUNTIME_OUTPUT_DIR)/status.txt
   359 	    $(JCK_RUNTIME_OUTPUT_DIR)/diff.html $(JCK_RUNTIME_OUTPUT_DIR)/status.txt
   347 	@mkdir -p $(JCK_RUNTIME_OUTPUT_DIR)
   360 	@mkdir -p $(JCK_RUNTIME_OUTPUT_DIR)
   348 	$(JT_JAVA)/bin/java -XX:MaxPermSize=256m -Xmx512m \
   361 	$(JT_JAVA)/bin/java -XX:MaxPermSize=256m -Xmx512m \
   349 	    -jar $(JCK_HOME)/JCK-runtime-7/lib/jtjck.jar \
   362 	    -jar $(JCK_HOME)/JCK-runtime-8/lib/jtjck.jar \
   350 	    -v:non-pass \
   363 	    -v:non-pass \
   351             -r:$(JCK_RUNTIME_OUTPUT_DIR)/report \
   364             -r:$(JCK_RUNTIME_OUTPUT_DIR)/report \
   352             -w:$(JCK_RUNTIME_OUTPUT_DIR)/work \
   365             -w:$(JCK_RUNTIME_OUTPUT_DIR)/work \
   353             -jdk:$(TESTJAVA) \
   366             -jdk:$(TESTJAVA) \
   354 	    -Xcompile \
   367 	    -Xcompile \
   371 	    echo ; \
   384 	    echo ; \
   372 	    $(EXIT) `cat $(JCK_RUNTIME_OUTPUT_DIR)/status.txt` ; \
   385 	    $(EXIT) `cat $(JCK_RUNTIME_OUTPUT_DIR)/status.txt` ; \
   373 	fi
   386 	fi
   374 
   387 
   375 # Check to make sure these directories exist
   388 # Check to make sure these directories exist
   376 check-jck: $(JT_HOME) $(JCK_HOME) $(PRODUCT_HOME)
   389 check-jck: $(JCK_HOME) $(PRODUCT_HOME)
   377 
   390 
   378 all-summary: FRC
   391 all-summary: FRC
   379 	if [ -n "`find $(TEST_OUTPUT_DIR) -name status.txt`" ]; then
   392 	if [ -n "`find $(TEST_OUTPUT_DIR) -name status.txt`" ]; then
   380 	    echo ; echo "Summary of test failures" ; \
   393 	    echo ; echo "Summary of test failures" ; \
   381 	    cat `find $(TEST_OUTPUT_DIR) -name summary.txt` | \
   394 	    cat `find $(TEST_OUTPUT_DIR) -name summary.txt` | \