langtools/test/Makefile
changeset 39102 5a820f7e00b9
parent 37941 d8b9240efe5d
child 41449 de8df2220540
equal deleted inserted replaced
39101:fd8a6392b7ea 39102:5a820f7e00b9
    82 else
    82 else
    83   SLASH_JAVA = /java
    83   SLASH_JAVA = /java
    84 endif
    84 endif
    85 
    85 
    86 # Default JTREG to run
    86 # Default JTREG to run
    87 ifdef JPRT_JTREG_HOME
    87 ifndef JTREG_HOME
    88   JTREG_HOME = $(JPRT_JTREG_HOME)
    88   ifdef JPRT_JTREG_HOME
    89 else ifdef JT_HOME
    89     JTREG_HOME = $(JPRT_JTREG_HOME)
    90   JTREG_HOME = $(JT_HOME)
    90   else ifdef JT_HOME
    91 else
    91     JTREG_HOME = $(JT_HOME)
    92   JTREG_HOME = $(SLASH_JAVA)/re/jtreg/4.1-jigsaw/nightly/binaries/jtreg/
    92   else
       
    93     JTREG_HOME = $(SLASH_JAVA)/re/jtreg/4.2/promoted/latest/
       
    94   endif
    93 endif
    95 endif
    94 JTREG = $(JTREG_HOME)/bin/jtreg
    96 JTREG = $(JTREG_HOME)/bin/jtreg
    95 JTDIFF = $(JTREG_HOME)/bin/jtdiff
    97 JTDIFF = $(JTREG_HOME)/bin/jtdiff
    96 
    98 
    97 # Problematic tests to be excluded
    99 # Problematic tests to be excluded
   103 else
   105 else
   104   JTREG_EXCLUSIONS = $(PROBLEM_LISTS:%=-exclude:%)
   106   JTREG_EXCLUSIONS = $(PROBLEM_LISTS:%=-exclude:%)
   105 endif
   107 endif
   106 
   108 
   107 # Default JCK to run
   109 # Default JCK to run
   108 ifdef JPRT_JCK_HOME
   110 ifndef JCK_HOME
   109   JCK_HOME = $(JPRT_JCK_HOME)
   111   ifdef JPRT_JCK_HOME
   110 else
   112     JCK_HOME = $(JPRT_JCK_HOME)
   111   JCK_HOME = $(SLASH_JAVA)/re/jck/8/promoted/latest/binaries
   113   else
       
   114     JCK_HOME = $(SLASH_JAVA)/re/jck/8/promoted/latest/binaries
       
   115   endif
   112 endif
   116 endif
   113 
   117 
   114 # Default JDK for JTREG and JCK
   118 # Default JDK for JTREG and JCK
   115 #
   119 #
   116 # JT_JAVA is the version of java used to run jtreg/JCK. 
   120 # JT_JAVA is the version of java used to run jtreg/JCK. 
   201 ifdef JCK_TIMEOUT_FACTOR
   205 ifdef JCK_TIMEOUT_FACTOR
   202   JCK_OPTIONS += -timeout:$(JCK_TIMEOUT_FACTOR)
   206   JCK_OPTIONS += -timeout:$(JCK_TIMEOUT_FACTOR)
   203 endif
   207 endif
   204 
   208 
   205 # Default verbosity setting for jtreg
   209 # Default verbosity setting for jtreg
   206 JTREG_VERBOSE = fail,error,nopass
   210 JTREG_VERBOSE ?= fail,error,nopass
   207 
   211 
   208 # Default verbosity setting for jck
   212 # Default verbosity setting for jck
   209 JCK_VERBOSE = non-pass
   213 JCK_VERBOSE ?= non-pass
   210 
   214 
   211 # Assertions: some tests show failures when assertions are enabled.
   215 # Assertions: some tests show failures when assertions are enabled.
   212 # Since javac is typically loaded via the bootclassloader (either via TESTJAVA
   216 # Since javac is typically loaded via the bootclassloader (either via TESTJAVA
   213 # or TESTBOOTCLASSPATH), you may need -esa to enable assertions in javac.
   217 # or TESTBOOTCLASSPATH), you may need -esa to enable assertions in javac.
   214 JTREG_OPTIONS += $(ASSERTION_OPTIONS)
   218 JTREG_OPTIONS += $(ASSERTION_OPTIONS)
   229 # having make exit with non-zero return code.
   233 # having make exit with non-zero return code.
   230 EXIT = exit
   234 EXIT = exit
   231 # Function to exit shell if exit code of preceding command is greater than or equal
   235 # Function to exit shell if exit code of preceding command is greater than or equal
   232 # to a given level. Redefine function or preceding FATAL_*_EXIT codes as needed.
   236 # to a given level. Redefine function or preceding FATAL_*_EXIT codes as needed.
   233 EXIT_IF_FATAL = status=$$?; if [ $$status -ge $(1) ]; then exit $$status ; fi
   237 EXIT_IF_FATAL = status=$$?; if [ $$status -ge $(1) ]; then exit $$status ; fi
   234 
       
   235 # The test directories to run
       
   236 DEFAULT_TESTDIRS = .
       
   237 TESTDIRS = $(DEFAULT_TESTDIRS)
       
   238 
   238 
   239 # Root of all test results
   239 # Root of all test results
   240 TEST_OUTPUT_DIR = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools
   240 TEST_OUTPUT_DIR = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools
   241 ABS_TEST_OUTPUT_DIR := \
   241 ABS_TEST_OUTPUT_DIR := \
   242 	$(shell mkdir -p $(TEST_OUTPUT_DIR); \
   242 	$(shell mkdir -p $(TEST_OUTPUT_DIR); \
   258 	@echo "Testing completed successfully"
   258 	@echo "Testing completed successfully"
   259 
   259 
   260 jck-runtime: $(JPRT_CLEAN) jck-runtime-tests $(JPRT_ARCHIVE_BUNDLE) jck-runtime-summary
   260 jck-runtime: $(JPRT_CLEAN) jck-runtime-tests $(JPRT_ARCHIVE_BUNDLE) jck-runtime-summary
   261 	@echo "Testing completed successfully"
   261 	@echo "Testing completed successfully"
   262 
   262 
       
   263 # a way to select tests from outside
       
   264 # works for targets 'jtreg', 'jck-compiler', and 'jck-runtime'
       
   265 ifdef TEST_SELECTION
       
   266   JTREG_TESTDIRS = $(TEST_SELECTION)
       
   267   JCK_COMPILER_TESTDIRS = $(TEST_SELECTION)
       
   268   JCK_RUNTIME_TESTDIRS = $(TEST_SELECTION)
       
   269 endif
       
   270 
   263 # for use with JPRT -testrule
   271 # for use with JPRT -testrule
   264 all:		JTREG_TESTDIRS = .
   272 all:		JTREG_TESTDIRS = .
   265 jtreg:		JTREG_TESTDIRS = .
   273 jtreg:		JTREG_TESTDIRS ?= .
   266 apt:		JTREG_TESTDIRS = tools/apt
   274 apt:		JTREG_TESTDIRS = tools/apt
   267 javac: 		JTREG_TESTDIRS = tools/javac
   275 javac: 		JTREG_TESTDIRS = tools/javac
   268 javadoc:	JTREG_TESTDIRS = tools/javadoc com/sun/javadoc
   276 javadoc:	JTREG_TESTDIRS = tools/javadoc com/sun/javadoc
   269 javah:		JTREG_TESTDIRS = tools/javah
   277 javah:		JTREG_TESTDIRS = tools/javah
   270 javap:		JTREG_TESTDIRS = tools/javap
   278 javap:		JTREG_TESTDIRS = tools/javap
   271 jdeps:		JTREG_TESTDIRS = tools/jdeps
   279 jdeps:		JTREG_TESTDIRS = tools/jdeps
   272 
       
   273 # a way to select jtreg tests from outside
       
   274 ifdef TEST_SELECTION
       
   275   JTREG_TESTDIRS = $(TEST_SELECTION)
       
   276 endif
       
   277 
   280 
   278 
   281 
   279 # Run jtreg tests
   282 # Run jtreg tests
   280 #
   283 #
   281 # JTREG_HOME
   284 # JTREG_HOME
   436 	    $(EXIT) `cat $(JCK_RUNTIME_OUTPUT_DIR)/status.txt` ; \
   439 	    $(EXIT) `cat $(JCK_RUNTIME_OUTPUT_DIR)/status.txt` ; \
   437 	fi
   440 	fi
   438 
   441 
   439 # Check to make sure these directories exist
   442 # Check to make sure these directories exist
   440 check-jck:
   443 check-jck:
   441 	if [ ! -d '$(JCK_HOME)' ]; then \
   444 	@if [ ! -d '$(JCK_HOME)' ]; then \
   442 	    echo "JCK_HOME $(JCK_HOME) missing" ; \
   445 	    echo "JCK_HOME $(JCK_HOME) missing" ; \
   443 	    $(EXIT) 1 ; \
   446 	    $(EXIT) 1 ; \
   444 	fi
   447 	fi
   445 	if [ ! -d '$(PRODUCT_HOME)' ]; then \
   448 	@if [ ! -d '$(PRODUCT_HOME)' ]; then \
   446 	    echo "PRODUCT_HOME $(PRODUCT_HOME) missing" ; \
   449 	    echo "PRODUCT_HOME $(PRODUCT_HOME) missing" ; \
   447 	    $(EXIT) 1 ; \
   450 	    $(EXIT) 1 ; \
   448 	fi
   451 	fi
   449 
   452 
   450 all-summary: FRC
   453 all-summary: FRC