test/Makefile

Print this page




 290     $(EXPAND) $${_summary} | $(EGREP) -v ' Not run\.' > $(RUNLIST); \
 291     $(EGREP) ' Passed\.' $(RUNLIST) \
 292       | $(EGREP) -v ' Error\.' \
 293       | $(EGREP) -v ' Failed\.' > $(PASSLIST); \
 294     ( $(EGREP) ' Failed\.' $(RUNLIST); \
 295       $(EGREP) ' Error\.' $(RUNLIST); \
 296       $(EGREP) -v ' Passed\.' $(RUNLIST) ) \
 297       | $(SORT) | $(UNIQ) > $(FAILLIST); \
 298     if [ $${jtregExitCode} != 0 -o -s $(FAILLIST) ] ; then \
 299       $(EXPAND) $(FAILLIST) \
 300         | $(CUT) -d' ' -f1 \
 301         | $(SED) -e 's@^@FAILED: @' >> $(STATS_TXT); \
 302       if [ $${jtregExitCode} = 0 ] ; then \
 303         jtregExitCode=1; \
 304       fi; \
 305     fi; \
 306     runc="`$(CAT) $(RUNLIST)      | $(WC) -l | $(AWK) '{print $$1;}'`"; \
 307     passc="`$(CAT) $(PASSLIST)    | $(WC) -l | $(AWK) '{print $$1;}'`"; \
 308     failc="`$(CAT) $(FAILLIST)    | $(WC) -l | $(AWK) '{print $$1;}'`"; \
 309     exclc="`$(CAT) $(EXCLUDELIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
 310     $(ECHO) "TEST STATS: run=$${runc}  pass=$${passc}  fail=$${failc}  excluded=$${exclc}" \
 311       >> $(STATS_TXT); \
 312   else \
 313     $(ECHO) "Missing file: $${_summary}" >> $(STATS_TXT); \
 314   fi; \
 315   $(CAT) $(STATS_TXT); \
 316   $(ZIP_UP_RESULTS) ; \
 317   $(TESTEXIT) \
 318 )
 319 
 320 ################################################################
 321 
 322 # Default make rule (runs jtreg_tests)
 323 all: jtreg_tests
 324         @$(ECHO) "Testing completed successfully"
 325 
 326 # Prep for output
 327 prep: clean
 328         @$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR)
 329         @$(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)`
 330 
 331 # Cleanup
 332 clean:
 333         $(RM) -r $(ABS_TEST_OUTPUT_DIR)
 334         $(RM) $(ARCHIVE_BUNDLE)
 335 
 336 ################################################################
 337 
 338 # jtreg tests
 339 
 340 # Expect JT_HOME to be set for jtreg tests. (home for jtreg)
 341 ifndef JT_HOME
 342   JT_HOME = $(SLASH_JAVA)/re/jtreg/4.0/promoted/latest/binaries/jtreg
 343   ifdef JPRT_JTREG_HOME
 344     JT_HOME = $(JPRT_JTREG_HOME)
 345   endif
 346 endif
 347 
 348 # Expect JPRT to set TESTDIRS to the jtreg test dirs
 349 ifndef TESTDIRS


 359   JTREG_SAMEVM_OPTION = -samevm
 360   EXTRA_JTREG_OPTIONS += $(JTREG_SAMEVM_OPTION) $(JAVA_ARGS) $(JAVA_ARGS:%=-vmoption:%)
 361   JTREG_TEST_OPTIONS = $(JAVA_VM_ARGS:%=-vmoption:%)
 362 else
 363   JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%)
 364 endif
 365 
 366 # Some tests annoy me and fail frequently
 367 PROBLEM_LIST=ProblemList.txt
 368 PROBLEM_LISTS=$(PROBLEM_LIST) $(wildcard closed/$(PROBLEM_LIST))
 369 EXCLUDELIST=$(ABS_TEST_OUTPUT_DIR)/excludelist.txt
 370 
 371 # Create exclude list for this platform and arch
 372 ifdef NO_EXCLUDES
 373 $(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS)
 374         @$(ECHO) "NOTHING_EXCLUDED" > $@
 375 else
 376 $(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS)
 377         @$(RM) $@ $@.temp1 $@.temp2
 378         @(($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-all'          ) ;\
 379           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_ARCH)'   ) ;\
 380           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_ARCH2)'  ) ;\
 381           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_VERSION)') ;\
 382           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH)'      ) ;\
 383           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH2)'     ) ;\
 384           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-all'             ) ;\
 385           ($(ECHO) "#") ;\
 386         ) | $(SED) -e 's@^[\ ]*@@' \
 387           | $(EGREP) -v '^#' > $@.temp1
 388         @for tdir in $(TESTDIRS) ; do \
 389           ( ( $(CAT) $@.temp1 | $(EGREP) "^$${tdir}" ) ; $(ECHO) "#" ) >> $@.temp2 ; \
 390         done
 391         @$(ECHO) "# at least one line" >> $@.temp2
 392         @( $(EGREP) -v '^#' $@.temp2 ; true ) > $@
 393         @$(ECHO) "Excluding list contains `$(EXPAND) $@ | $(WC) -l` items"
 394 endif
 395 
 396 # Select list of directories that exist
 397 define TestDirs
 398 $(foreach i,$1,$(wildcard ${i})) $(foreach i,$1,$(wildcard closed/${i}))
 399 endef


 545 #   Using samevm has problems, and doesn't help performance as much as others.
 546 JDK_ALL_TARGETS += jdk_swing
 547 jdk_swing: javax/swing sun/java2d
 548         $(call RunOthervmBatch)
 549 
 550 # Stable samevm testruns (minus items from PROBLEM_LIST)
 551 JDK_ALL_TARGETS += jdk_text
 552 jdk_text: java/text sun/text
 553         $(call RunSamevmBatch)
 554 
 555 # Stable samevm testruns (minus items from PROBLEM_LIST)
 556 JDK_ALL_TARGETS += jdk_tools1
 557 jdk_tools1: com/sun/jdi
 558         $(call RunSamevmBatch)
 559 
 560 # Stable othervm testruns (minus items from PROBLEM_LIST)
 561 #   Using samevm has serious problems with these tests
 562 JDK_ALL_TARGETS += jdk_tools2
 563 jdk_tools2: com/sun/tools sun/jvmstat sun/tools tools vm com/sun/servicetag com/sun/tracing
 564         $(call SharedLibraryPermissions,tools/launcher)
 565         $(call RunOthervmBatch)
 566 
 567 # All tools tests
 568 jdk_tools: jdk_tools1 jdk_tools2
 569         @$(SummaryInfo)
 570 
 571 # Stable samevm testruns (minus items from PROBLEM_LIST)
 572 JDK_ALL_TARGETS += jdk_util
 573 jdk_util: java/util sun/util
 574         $(call RunSamevmBatch)
 575 
 576 # ------------------------------------------------------------------
 577 
 578 # Run all tests
 579 FILTER_OUT_LIST=jdk_awt jdk_rmi jdk_swing
 580 JDK_ALL_STABLE_TARGETS := $(filter-out $(FILTER_OUT_LIST), $(JDK_ALL_TARGETS))
 581 jdk_all: $(JDK_ALL_STABLE_TARGETS)
 582         @$(SummaryInfo)
 583 
 584 # These are all phony targets
 585 PHONY_LIST += $(JDK_ALL_TARGETS)




 290     $(EXPAND) $${_summary} | $(EGREP) -v ' Not run\.' > $(RUNLIST); \
 291     $(EGREP) ' Passed\.' $(RUNLIST) \
 292       | $(EGREP) -v ' Error\.' \
 293       | $(EGREP) -v ' Failed\.' > $(PASSLIST); \
 294     ( $(EGREP) ' Failed\.' $(RUNLIST); \
 295       $(EGREP) ' Error\.' $(RUNLIST); \
 296       $(EGREP) -v ' Passed\.' $(RUNLIST) ) \
 297       | $(SORT) | $(UNIQ) > $(FAILLIST); \
 298     if [ $${jtregExitCode} != 0 -o -s $(FAILLIST) ] ; then \
 299       $(EXPAND) $(FAILLIST) \
 300         | $(CUT) -d' ' -f1 \
 301         | $(SED) -e 's@^@FAILED: @' >> $(STATS_TXT); \
 302       if [ $${jtregExitCode} = 0 ] ; then \
 303         jtregExitCode=1; \
 304       fi; \
 305     fi; \
 306     runc="`$(CAT) $(RUNLIST)      | $(WC) -l | $(AWK) '{print $$1;}'`"; \
 307     passc="`$(CAT) $(PASSLIST)    | $(WC) -l | $(AWK) '{print $$1;}'`"; \
 308     failc="`$(CAT) $(FAILLIST)    | $(WC) -l | $(AWK) '{print $$1;}'`"; \
 309     exclc="`$(CAT) $(EXCLUDELIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
 310     $(ECHO) "TEST STATS: name=$(UNIQUE_DIR)  run=$${runc}  pass=$${passc}  fail=$${failc}  excluded=$${exclc}" \
 311       >> $(STATS_TXT); \
 312   else \
 313     $(ECHO) "Missing file: $${_summary}" >> $(STATS_TXT); \
 314   fi; \
 315   $(CAT) $(STATS_TXT); \
 316   $(ZIP_UP_RESULTS) ; \
 317   $(TESTEXIT) \
 318 )
 319 
 320 ################################################################
 321 
 322 # Default make rule (runs jtreg_tests)
 323 all: jtreg_tests
 324         @$(ECHO) "Testing completed successfully"
 325 
 326 # Prep for output
 327 prep: clean
 328         @$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR)
 329         @$(MKDIR) -p `$(DIRNAME) $(ARCHIVE_BUNDLE)`
 330 
 331 # Cleanup
 332 clean:
 333         $(RM) -r $(ABS_TEST_OUTPUT_DIR)
 334         $(RM) $(ARCHIVE_BUNDLE)
 335 
 336 ################################################################
 337 
 338 # jtreg tests
 339 
 340 # Expect JT_HOME to be set for jtreg tests. (home for jtreg)
 341 ifndef JT_HOME
 342   JT_HOME = $(SLASH_JAVA)/re/jtreg/4.0/promoted/latest/binaries/jtreg
 343   ifdef JPRT_JTREG_HOME
 344     JT_HOME = $(JPRT_JTREG_HOME)
 345   endif
 346 endif
 347 
 348 # Expect JPRT to set TESTDIRS to the jtreg test dirs
 349 ifndef TESTDIRS


 359   JTREG_SAMEVM_OPTION = -samevm
 360   EXTRA_JTREG_OPTIONS += $(JTREG_SAMEVM_OPTION) $(JAVA_ARGS) $(JAVA_ARGS:%=-vmoption:%)
 361   JTREG_TEST_OPTIONS = $(JAVA_VM_ARGS:%=-vmoption:%)
 362 else
 363   JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%)
 364 endif
 365 
 366 # Some tests annoy me and fail frequently
 367 PROBLEM_LIST=ProblemList.txt
 368 PROBLEM_LISTS=$(PROBLEM_LIST) $(wildcard closed/$(PROBLEM_LIST))
 369 EXCLUDELIST=$(ABS_TEST_OUTPUT_DIR)/excludelist.txt
 370 
 371 # Create exclude list for this platform and arch
 372 ifdef NO_EXCLUDES
 373 $(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS)
 374         @$(ECHO) "NOTHING_EXCLUDED" > $@
 375 else
 376 $(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS)
 377         @$(RM) $@ $@.temp1 $@.temp2
 378         @(($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-all'          ) ;\
 379           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(PLATFORM_OS)'          ) ;\
 380           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_ARCH2)'  ) ;\
 381           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_VERSION)') ;\
 382           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH)'      ) ;\
 383           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH2)'     ) ;\
 384           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-all'             ) ;\
 385           ($(ECHO) "#") ;\
 386         ) | $(SED) -e 's@^[\ ]*@@' \
 387           | $(EGREP) -v '^#' > $@.temp1
 388         @for tdir in $(TESTDIRS) ; do \
 389           ( ( $(CAT) $@.temp1 | $(EGREP) "^$${tdir}" ) ; $(ECHO) "#" ) >> $@.temp2 ; \
 390         done
 391         @$(ECHO) "# at least one line" >> $@.temp2
 392         @( $(EGREP) -v '^#' $@.temp2 ; true ) > $@
 393         @$(ECHO) "Excluding list contains `$(EXPAND) $@ | $(WC) -l` items"
 394 endif
 395 
 396 # Select list of directories that exist
 397 define TestDirs
 398 $(foreach i,$1,$(wildcard ${i})) $(foreach i,$1,$(wildcard closed/${i}))
 399 endef


 545 #   Using samevm has problems, and doesn't help performance as much as others.
 546 JDK_ALL_TARGETS += jdk_swing
 547 jdk_swing: javax/swing sun/java2d
 548         $(call RunOthervmBatch)
 549 
 550 # Stable samevm testruns (minus items from PROBLEM_LIST)
 551 JDK_ALL_TARGETS += jdk_text
 552 jdk_text: java/text sun/text
 553         $(call RunSamevmBatch)
 554 
 555 # Stable samevm testruns (minus items from PROBLEM_LIST)
 556 JDK_ALL_TARGETS += jdk_tools1
 557 jdk_tools1: com/sun/jdi
 558         $(call RunSamevmBatch)
 559 
 560 # Stable othervm testruns (minus items from PROBLEM_LIST)
 561 #   Using samevm has serious problems with these tests
 562 JDK_ALL_TARGETS += jdk_tools2
 563 jdk_tools2: com/sun/tools sun/jvmstat sun/tools tools vm com/sun/servicetag com/sun/tracing
 564         $(call SharedLibraryPermissions,tools/launcher)
 565         $(call RunSamevmBatch)
 566 
 567 # All tools tests
 568 jdk_tools: jdk_tools1 jdk_tools2
 569         @$(SummaryInfo)
 570 
 571 # Stable samevm testruns (minus items from PROBLEM_LIST)
 572 JDK_ALL_TARGETS += jdk_util
 573 jdk_util: java/util sun/util
 574         $(call RunSamevmBatch)
 575 
 576 # ------------------------------------------------------------------
 577 
 578 # Run all tests
 579 FILTER_OUT_LIST=jdk_awt jdk_rmi jdk_swing
 580 JDK_ALL_STABLE_TARGETS := $(filter-out $(FILTER_OUT_LIST), $(JDK_ALL_TARGETS))
 581 jdk_all: $(JDK_ALL_STABLE_TARGETS)
 582         @$(SummaryInfo)
 583 
 584 # These are all phony targets
 585 PHONY_LIST += $(JDK_ALL_TARGETS)