< prev index next >

make/RunTests.gmk

Print this page
rev 52333 : imported patch 8213058


 641 
 642 ################################################################################
 643 
 644 ### Rules for special tests
 645 
 646 SetupRunSpecialTest = $(NamedParamsMacroTemplate)
 647 define SetupRunSpecialTestBody
 648   $1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1
 649   $1_TEST_SUPPORT_DIR := $$(TEST_SUPPORT_DIR)/$1
 650   $1_EXITCODE := $$($1_TEST_RESULTS_DIR)/exitcode.txt
 651 
 652   $1_FULL_TEST_NAME := $$(strip $$(patsubst special:%, %, $$($1_TEST)))
 653   ifneq ($$(findstring :, $$($1_FULL_TEST_NAME)), )
 654     $1_TEST_NAME := $$(firstword $$(subst :, ,$$($1_FULL_TEST_NAME)))
 655     $1_TEST_ARGS := $$(strip $$(patsubst special:$$($1_TEST_NAME):%, %, $$($1_TEST)))
 656   else
 657     $1_TEST_NAME := $$($1_FULL_TEST_NAME)
 658     $1_TEST_ARGS :=
 659   endif
 660 
 661   ifeq ($$($1_TEST_NAME), hotspot-internal)
 662     $1_TEST_COMMAND_LINE := \
 663         $$(JDK_IMAGE_DIR)/bin/java -XX:+ExecuteInternalVMTests \
 664         -XX:+ShowMessageBoxOnError -version
 665   else ifeq ($$($1_TEST_NAME), failure-handler)
 666     $1_TEST_COMMAND_LINE := \
 667         ($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f \
 668         BuildFailureHandler.gmk test)
 669   else ifeq ($$($1_TEST_NAME), make)
 670     $1_TEST_COMMAND_LINE := \
 671         ($(CD) $(TOPDIR)/test/make && $(MAKE) $(MAKE_ARGS) -f \
 672         TestMake.gmk $$($1_TEST_ARGS))
 673   else
 674     $$(error Invalid special test specification: $$($1_TEST_NAME))
 675   endif
 676 
 677   run-test-$1: $(TEST_PREREQS)
 678         $$(call LogWarn)
 679         $$(call LogWarn, Running test '$$($1_TEST)')
 680         $$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
 681         $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/test-execution, \
 682             $$($1_TEST_COMMAND_LINE) \
 683                 > >($(TEE) $$($1_TEST_RESULTS_DIR)/test-output.txt) \
 684             && $$(ECHO) $$$$? > $$($1_EXITCODE) \
 685             || $$(ECHO) $$$$? > $$($1_EXITCODE) \




 641 
 642 ################################################################################
 643 
 644 ### Rules for special tests
 645 
 646 SetupRunSpecialTest = $(NamedParamsMacroTemplate)
 647 define SetupRunSpecialTestBody
 648   $1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1
 649   $1_TEST_SUPPORT_DIR := $$(TEST_SUPPORT_DIR)/$1
 650   $1_EXITCODE := $$($1_TEST_RESULTS_DIR)/exitcode.txt
 651 
 652   $1_FULL_TEST_NAME := $$(strip $$(patsubst special:%, %, $$($1_TEST)))
 653   ifneq ($$(findstring :, $$($1_FULL_TEST_NAME)), )
 654     $1_TEST_NAME := $$(firstword $$(subst :, ,$$($1_FULL_TEST_NAME)))
 655     $1_TEST_ARGS := $$(strip $$(patsubst special:$$($1_TEST_NAME):%, %, $$($1_TEST)))
 656   else
 657     $1_TEST_NAME := $$($1_FULL_TEST_NAME)
 658     $1_TEST_ARGS :=
 659   endif
 660 
 661   ifeq ($$($1_TEST_NAME), failure-handler)




 662     $1_TEST_COMMAND_LINE := \
 663         ($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f \
 664         BuildFailureHandler.gmk test)
 665   else ifeq ($$($1_TEST_NAME), make)
 666     $1_TEST_COMMAND_LINE := \
 667         ($(CD) $(TOPDIR)/test/make && $(MAKE) $(MAKE_ARGS) -f \
 668         TestMake.gmk $$($1_TEST_ARGS))
 669   else
 670     $$(error Invalid special test specification: $$($1_TEST_NAME))
 671   endif
 672 
 673   run-test-$1: $(TEST_PREREQS)
 674         $$(call LogWarn)
 675         $$(call LogWarn, Running test '$$($1_TEST)')
 676         $$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
 677         $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/test-execution, \
 678             $$($1_TEST_COMMAND_LINE) \
 679                 > >($(TEE) $$($1_TEST_RESULTS_DIR)/test-output.txt) \
 680             && $$(ECHO) $$$$? > $$($1_EXITCODE) \
 681             || $$(ECHO) $$$$? > $$($1_EXITCODE) \


< prev index next >