test/Makefile

Print this page




 353 
 354 # Expect JT_HOME to be set for jtreg tests. (home for jtreg)
 355 ifndef JT_HOME
 356   JT_HOME = $(SLASH_JAVA)/re/jtreg/4.0/promoted/latest/binaries/jtreg
 357   ifdef JPRT_JTREG_HOME
 358     JT_HOME = $(JPRT_JTREG_HOME)
 359   endif
 360 endif
 361 
 362 # Expect JPRT to set TESTDIRS to the jtreg test dirs
 363 ifndef TESTDIRS
 364   TESTDIRS = demo
 365 endif
 366 
 367 # Samevm settings (default is false)
 368 ifndef USE_JTREG_SAMEVM
 369   USE_JTREG_SAMEVM=false
 370 endif
 371 # With samevm, you cannot use -javaoptions?
 372 ifeq ($(USE_JTREG_SAMEVM),true)
 373   EXTRA_JTREG_OPTIONS += -samevm $(JAVA_ARGS) $(JAVA_ARGS:%=-vmoption:%)

 374   JTREG_TEST_OPTIONS = $(JAVA_VM_ARGS:%=-vmoption:%)
 375 else
 376   JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%)
 377 endif
 378 
 379 # Some tests annoy me and fail frequently
 380 PROBLEM_LIST=ProblemList.txt
 381 PROBLEM_LISTS=$(PROBLEM_LIST) $(wildcard closed/$(PROBLEM_LIST))
 382 EXCLUDELIST=$(ABS_TEST_OUTPUT_DIR)/excludelist.txt
 383 
 384 # Create exclude list for this platform and arch
 385 ifdef NO_EXCLUDES
 386 $(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS)
 387         @$(ECHO) "NOTHING_EXCLUDED" > $@
 388 else
 389 $(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS)
 390         @$(RM) $@ $@.temp1 $@.temp2
 391         @(($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-all'          ) ;\
 392           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_ARCH)'   ) ;\
 393           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_VERSION)') ;\


 583 
 584 # ------------------------------------------------------------------
 585 
 586 # Run all tests
 587 FILTER_OUT_LIST=jdk_awt jdk_rmi jdk_swing
 588 JDK_ALL_STABLE_TARGETS := $(filter-out $(FILTER_OUT_LIST), $(JDK_ALL_TARGETS))
 589 jdk_all: $(JDK_ALL_STABLE_TARGETS)
 590         @$(SummaryInfo)
 591 
 592 # These are all phony targets
 593 PHONY_LIST += $(JDK_ALL_TARGETS)
 594 
 595 # ------------------------------------------------------------------
 596 
 597 # Default JTREG to run (win32 script works for everybody)
 598 JTREG = $(JT_HOME)/win32/bin/jtreg
 599 # Add any extra options (samevm etc.)
 600 JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)
 601 # Only run automatic tests
 602 JTREG_BASIC_OPTIONS += -a



 603 # Report details on all failed or error tests, times too
 604 JTREG_BASIC_OPTIONS += -v:fail,error,time
 605 # Retain all files for failing tests
 606 JTREG_BASIC_OPTIONS += -retain:fail,error
 607 # Ignore tests are not run and completely silent about it
 608 JTREG_BASIC_OPTIONS += -ignore:quiet

 609 # Multiple by 4 the timeout numbers
 610 JTREG_BASIC_OPTIONS += -timeoutFactor:4

 611 # Boost the max memory for jtreg to avoid gc thrashing
 612 JTREG_BASIC_OPTIONS += -J-Xmx512m

 613 
 614 # Make sure jtreg exists
 615 $(JTREG): $(JT_HOME)
 616 
 617 # Run jtreg
 618 jtreg_tests: prep $(PRODUCT_HOME) $(JTREG) $(EXCLUDELIST)
 619         @$(EXPAND) $(EXCLUDELIST) \
 620             | $(CUT) -d' ' -f1 \
 621             | $(SED) -e 's@^@Excluding: @'
 622         (                                                                    \
 623           ( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)");                   \
 624             export JT_HOME;                                                  \
 625             $(PREP_DISPLAY) &&                                               \
 626             $(shell $(GETMIXEDPATH) "$(JTREG)")                              \
 627               $(JTREG_BASIC_OPTIONS)                                         \
 628               -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport  \
 629               -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTwork    \
 630               -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)")                \
 631               -exclude:$(shell $(GETMIXEDPATH) "$(EXCLUDELIST)")             \
 632               $(JTREG_TEST_OPTIONS)                                          \




 353 
 354 # Expect JT_HOME to be set for jtreg tests. (home for jtreg)
 355 ifndef JT_HOME
 356   JT_HOME = $(SLASH_JAVA)/re/jtreg/4.0/promoted/latest/binaries/jtreg
 357   ifdef JPRT_JTREG_HOME
 358     JT_HOME = $(JPRT_JTREG_HOME)
 359   endif
 360 endif
 361 
 362 # Expect JPRT to set TESTDIRS to the jtreg test dirs
 363 ifndef TESTDIRS
 364   TESTDIRS = demo
 365 endif
 366 
 367 # Samevm settings (default is false)
 368 ifndef USE_JTREG_SAMEVM
 369   USE_JTREG_SAMEVM=false
 370 endif
 371 # With samevm, you cannot use -javaoptions?
 372 ifeq ($(USE_JTREG_SAMEVM),true)
 373   JTREG_SAMEVM_OPTION = -samevm
 374   EXTRA_JTREG_OPTIONS += $(JTREG_SAMEVM_OPTION) $(JAVA_ARGS) $(JAVA_ARGS:%=-vmoption:%)
 375   JTREG_TEST_OPTIONS = $(JAVA_VM_ARGS:%=-vmoption:%)
 376 else
 377   JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%)
 378 endif
 379 
 380 # Some tests annoy me and fail frequently
 381 PROBLEM_LIST=ProblemList.txt
 382 PROBLEM_LISTS=$(PROBLEM_LIST) $(wildcard closed/$(PROBLEM_LIST))
 383 EXCLUDELIST=$(ABS_TEST_OUTPUT_DIR)/excludelist.txt
 384 
 385 # Create exclude list for this platform and arch
 386 ifdef NO_EXCLUDES
 387 $(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS)
 388         @$(ECHO) "NOTHING_EXCLUDED" > $@
 389 else
 390 $(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS)
 391         @$(RM) $@ $@.temp1 $@.temp2
 392         @(($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-all'          ) ;\
 393           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_ARCH)'   ) ;\
 394           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_VERSION)') ;\


 584 
 585 # ------------------------------------------------------------------
 586 
 587 # Run all tests
 588 FILTER_OUT_LIST=jdk_awt jdk_rmi jdk_swing
 589 JDK_ALL_STABLE_TARGETS := $(filter-out $(FILTER_OUT_LIST), $(JDK_ALL_TARGETS))
 590 jdk_all: $(JDK_ALL_STABLE_TARGETS)
 591         @$(SummaryInfo)
 592 
 593 # These are all phony targets
 594 PHONY_LIST += $(JDK_ALL_TARGETS)
 595 
 596 # ------------------------------------------------------------------
 597 
 598 # Default JTREG to run (win32 script works for everybody)
 599 JTREG = $(JT_HOME)/win32/bin/jtreg
 600 # Add any extra options (samevm etc.)
 601 JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)
 602 # Only run automatic tests
 603 JTREG_BASIC_OPTIONS += -a
 604 # Always turn on assertions
 605 JTREG_ASSERT_OPTION = -ea -esa
 606 JTREG_BASIC_OPTIONS += $(JTREG_ASSERT_OPTION)
 607 # Report details on all failed or error tests, times too
 608 JTREG_BASIC_OPTIONS += -v:fail,error,time
 609 # Retain all files for failing tests
 610 JTREG_BASIC_OPTIONS += -retain:fail,error
 611 # Ignore tests are not run and completely silent about it
 612 JTREG_IGNORE_OPTION = -ignore:quiet
 613 JTREG_BASIC_OPTIONS += $(JTREG_IGNORE_OPTION)
 614 # Multiple by 4 the timeout numbers
 615 JTREG_TIMEOUT_OPTION =  -timeoutFactor:4
 616 JTREG_BASIC_OPTIONS += $(JTREG_TIMEOUT_OPTION)
 617 # Boost the max memory for jtreg to avoid gc thrashing
 618 JTREG_MEMORY_OPTION = -J-Xmx512m
 619 JTREG_BASIC_OPTIONS += $(JTREG_MEMORY_OPTION)
 620 
 621 # Make sure jtreg exists
 622 $(JTREG): $(JT_HOME)
 623 
 624 # Run jtreg
 625 jtreg_tests: prep $(PRODUCT_HOME) $(JTREG) $(EXCLUDELIST)
 626         @$(EXPAND) $(EXCLUDELIST) \
 627             | $(CUT) -d' ' -f1 \
 628             | $(SED) -e 's@^@Excluding: @'
 629         (                                                                    \
 630           ( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)");                   \
 631             export JT_HOME;                                                  \
 632             $(PREP_DISPLAY) &&                                               \
 633             $(shell $(GETMIXEDPATH) "$(JTREG)")                              \
 634               $(JTREG_BASIC_OPTIONS)                                         \
 635               -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport  \
 636               -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTwork    \
 637               -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)")                \
 638               -exclude:$(shell $(GETMIXEDPATH) "$(EXCLUDELIST)")             \
 639               $(JTREG_TEST_OPTIONS)                                          \