359 JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%) |
361 JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%) |
360 endif |
362 endif |
361 |
363 |
362 # Some tests annoy me and fail frequently |
364 # Some tests annoy me and fail frequently |
363 PROBLEM_LIST=ProblemList.txt |
365 PROBLEM_LIST=ProblemList.txt |
|
366 PROBLEM_LISTS=$(PROBLEM_LIST) $(wildcard closed/$(PROBLEM_LIST)) |
364 EXCLUDELIST=$(ABS_TEST_OUTPUT_DIR)/excludelist.txt |
367 EXCLUDELIST=$(ABS_TEST_OUTPUT_DIR)/excludelist.txt |
365 |
368 |
366 # Create exclude list for this platform and arch |
369 # Create exclude list for this platform and arch |
367 ifdef NO_EXCLUDES |
370 ifdef NO_EXCLUDES |
368 $(EXCLUDELIST): $(PROBLEM_LIST) $(TESTDIRS) |
371 $(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS) |
369 @$(ECHO) "NOTHING_EXCLUDED" > $@ |
372 @$(ECHO) "NOTHING_EXCLUDED" > $@ |
370 else |
373 else |
371 $(EXCLUDELIST): $(PROBLEM_LIST) $(TESTDIRS) |
374 $(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS) |
372 @$(RM) $@ $@.temp1 $@.temp2 |
375 @$(RM) $@ $@.temp1 $@.temp2 |
373 @( ( $(EGREP) -- '$(OS_NAME)-all' $< ) ;\ |
376 @(($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-all' ) ;\ |
374 ( $(EGREP) -- '$(OS_NAME)-$(OS_ARCH)' $< ) ;\ |
377 ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_ARCH)' ) ;\ |
375 ( $(EGREP) -- '$(OS_NAME)-$(OS_VERSION)' $< ) ;\ |
378 ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_VERSION)') ;\ |
376 ( $(EGREP) -- 'generic-$(OS_ARCH)' $< ) ;\ |
379 ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH)' ) ;\ |
377 ( $(EGREP) -- 'generic-all' $< ) ;\ |
380 ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-all' ) ;\ |
378 ( $(ECHO) "#") ;\ |
381 ($(ECHO) "#") ;\ |
379 ) | $(SED) -e 's@^[\ ]*@@' \ |
382 ) | $(SED) -e 's@^[\ ]*@@' \ |
380 | $(EGREP) -v '^#' > $@.temp1 |
383 | $(EGREP) -v '^#' > $@.temp1 |
381 @for tdir in $(TESTDIRS) ; do \ |
384 @for tdir in $(TESTDIRS) ; do \ |
382 ( ( $(CAT) $@.temp1 | $(EGREP) "^$${tdir}" ) ; $(ECHO) "#" ) >> $@.temp2 ; \ |
385 ( ( $(CAT) $@.temp1 | $(EGREP) "^$${tdir}" ) ; $(ECHO) "#" ) >> $@.temp2 ; \ |
383 done |
386 done |
384 @$(ECHO) "# at least one line" >> $@.temp2 |
387 @$(ECHO) "# at least one line" >> $@.temp2 |
385 @( $(EGREP) -v '^#' $@.temp2 ; true ) > $@ |
388 @( $(EGREP) -v '^#' $@.temp2 ; true ) > $@ |
386 @$(ECHO) "Excluding list contains `$(EXPAND) $@ | $(WC) -l` items" |
389 @$(ECHO) "Excluding list contains `$(EXPAND) $@ | $(WC) -l` items" |
387 endif |
390 endif |
388 |
391 |
|
392 # Select list of directories that exist |
|
393 define TestDirs |
|
394 $(foreach i,$1,$(wildcard ${i})) $(foreach i,$1,$(wildcard closed/${i})) |
|
395 endef |
389 # Running batches of tests with or without samevm |
396 # Running batches of tests with or without samevm |
390 define RunSamevmBatch |
397 define RunSamevmBatch |
391 $(ECHO) "Running tests in samevm mode: $?" |
398 $(ECHO) "Running tests in samevm mode: $(call TestDirs, $?)" |
392 $(MAKE) TESTDIRS="$?" USE_JTREG_SAMEVM=true UNIQUE_DIR=$@ jtreg_tests |
399 $(MAKE) TESTDIRS="$(call TestDirs, $?)" USE_JTREG_SAMEVM=true UNIQUE_DIR=$@ jtreg_tests |
393 endef |
400 endef |
394 define RunOthervmBatch |
401 define RunOthervmBatch |
395 $(ECHO) "Running tests in othervm mode: $?" |
402 $(ECHO) "Running tests in othervm mode: $(call TestDirs, $?)" |
396 $(MAKE) TESTDIRS="$?" USE_JTREG_SAMEVM=false UNIQUE_DIR=$@ jtreg_tests |
403 $(MAKE) TESTDIRS="$(call TestDirs, $?)" USE_JTREG_SAMEVM=false UNIQUE_DIR=$@ jtreg_tests |
397 endef |
404 endef |
398 define SummaryInfo |
405 define SummaryInfo |
399 $(ECHO) "Summary for: $?" |
406 $(ECHO) "Summary for: $?" |
400 $(CAT) $(?:%=$(ABS_TEST_OUTPUT_DIR)/%/$(STATS_TXT_NAME)) |
407 $(CAT) $(?:%=$(ABS_TEST_OUTPUT_DIR)/%/$(STATS_TXT_NAME)) |
401 endef |
408 endef |
426 $(call RunOthervmBatch) |
433 $(call RunOthervmBatch) |
427 JDK_ALL_TARGETS += jdk_beans3 |
434 JDK_ALL_TARGETS += jdk_beans3 |
428 jdk_beans3: java/beans/XMLEncoder |
435 jdk_beans3: java/beans/XMLEncoder |
429 $(call RunOthervmBatch) |
436 $(call RunOthervmBatch) |
430 |
437 |
|
438 jdk_beans: jdk_beans1 jdk_beans2 jdk_beans3 |
|
439 @$(SummaryInfo) |
|
440 |
431 # Stable samevm testruns (minus items from PROBLEM_LIST) |
441 # Stable samevm testruns (minus items from PROBLEM_LIST) |
432 JDK_ALL_TARGETS += jdk_io |
442 JDK_ALL_TARGETS += jdk_io |
433 jdk_io: java/io |
443 jdk_io: java/io |
434 $(call RunSamevmBatch) |
444 $(call RunSamevmBatch) |
435 |
445 |
447 # Stable othervm testruns (minus items from PROBLEM_LIST) |
457 # Stable othervm testruns (minus items from PROBLEM_LIST) |
448 # Using samevm has serious problems with these tests |
458 # Using samevm has serious problems with these tests |
449 JDK_ALL_TARGETS += jdk_management2 |
459 JDK_ALL_TARGETS += jdk_management2 |
450 jdk_management2: com/sun/jmx com/sun/management sun/management |
460 jdk_management2: com/sun/jmx com/sun/management sun/management |
451 $(call RunOthervmBatch) |
461 $(call RunOthervmBatch) |
|
462 |
|
463 jdk_management: jdk_management1 jdk_management2 |
|
464 @$(SummaryInfo) |
452 |
465 |
453 # Stable samevm testruns (minus items from PROBLEM_LIST) |
466 # Stable samevm testruns (minus items from PROBLEM_LIST) |
454 JDK_ALL_TARGETS += jdk_math |
467 JDK_ALL_TARGETS += jdk_math |
455 jdk_math: java/math |
468 jdk_math: java/math |
456 $(call RunSamevmBatch) |
469 $(call RunSamevmBatch) |
480 $(call RunOthervmBatch) |
493 $(call RunOthervmBatch) |
481 JDK_ALL_TARGETS += jdk_nio3 |
494 JDK_ALL_TARGETS += jdk_nio3 |
482 jdk_nio3: com/sun/nio sun/nio |
495 jdk_nio3: com/sun/nio sun/nio |
483 $(call RunOthervmBatch) |
496 $(call RunOthervmBatch) |
484 |
497 |
|
498 jdk_nio: jdk_nio1 jdk_nio2 jdk_nio3 |
|
499 @$(SummaryInfo) |
|
500 |
485 # Stable othervm testruns (minus items from PROBLEM_LIST) |
501 # Stable othervm testruns (minus items from PROBLEM_LIST) |
486 # Using samevm has serious problems with these tests |
502 # Using samevm has serious problems with these tests |
487 JDK_ALL_TARGETS += jdk_rmi |
503 JDK_ALL_TARGETS += jdk_rmi |
488 jdk_rmi: java/rmi javax/rmi sun/rmi |
504 jdk_rmi: java/rmi javax/rmi sun/rmi |
489 $(call RunOthervmBatch) |
505 $(call RunOthervmBatch) |
500 $(call RunOthervmBatch) |
516 $(call RunOthervmBatch) |
501 JDK_ALL_TARGETS += jdk_security3 |
517 JDK_ALL_TARGETS += jdk_security3 |
502 jdk_security3: com/sun/security lib/security javax/security sun/security |
518 jdk_security3: com/sun/security lib/security javax/security sun/security |
503 $(call RunOthervmBatch) |
519 $(call RunOthervmBatch) |
504 |
520 |
|
521 jdk_security: jdk_security1 jdk_security2 jdk_security3 |
|
522 @$(SummaryInfo) |
|
523 |
505 # Stable othervm testruns (minus items from PROBLEM_LIST) |
524 # Stable othervm testruns (minus items from PROBLEM_LIST) |
506 # Using samevm has problems, and doesn't help performance as much as others. |
525 # Using samevm has problems, and doesn't help performance as much as others. |
507 JDK_ALL_TARGETS += jdk_swing |
526 JDK_ALL_TARGETS += jdk_swing |
508 jdk_swing: javax/swing sun/java2d |
527 jdk_swing: javax/swing sun/java2d |
509 $(call RunOthervmBatch) |
528 $(call RunOthervmBatch) |
519 jdk_tools1: com/sun/jdi |
538 jdk_tools1: com/sun/jdi |
520 $(call RunOthervmBatch) |
539 $(call RunOthervmBatch) |
521 JDK_ALL_TARGETS += jdk_tools2 |
540 JDK_ALL_TARGETS += jdk_tools2 |
522 jdk_tools2: com/sun/tools sun/jvmstat sun/tools tools vm com/sun/servicetag com/sun/tracing |
541 jdk_tools2: com/sun/tools sun/jvmstat sun/tools tools vm com/sun/servicetag com/sun/tracing |
523 $(call RunOthervmBatch) |
542 $(call RunOthervmBatch) |
|
543 |
|
544 jdk_tools: jdk_tools1 jdk_tools2 |
|
545 @$(SummaryInfo) |
524 |
546 |
525 # Stable samevm testruns (minus items from PROBLEM_LIST) |
547 # Stable samevm testruns (minus items from PROBLEM_LIST) |
526 JDK_ALL_TARGETS += jdk_util |
548 JDK_ALL_TARGETS += jdk_util |
527 jdk_util: java/util sun/util |
549 jdk_util: java/util sun/util |
528 $(call RunSamevmBatch) |
550 $(call RunSamevmBatch) |