test/Makefile

Print this page




  20 #
  21 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  22 # CA 95054 USA or visit www.sun.com if you need additional information or
  23 # have any questions.
  24 #
  25 
  26 #
  27 # Makefile to run various jdk tests
  28 #
  29 
  30 # Empty these to get rid of some default rules
  31 .SUFFIXES:
  32 .SUFFIXES: .java
  33 CO=
  34 GET=
  35 
  36 # Utilities used
  37 AWK       = awk
  38 CAT       = cat
  39 CD        = cd

  40 CP        = cp
  41 CUT       = cut
  42 ECHO      = echo
  43 EGREP     = egrep
  44 EXPAND    = expand

  45 MKDIR     = mkdir
  46 PWD       = pwd
  47 SED       = sed
  48 SORT      = sort
  49 TEE       = tee
  50 UNAME     = uname
  51 UNIQ      = uniq
  52 WC        = wc
  53 ZIP       = zip
  54 
  55 # Get OS name from uname
  56 UNAME_S := $(shell $(UNAME) -s)
  57 
  58 # Commands to run on paths to make mixed paths for java on windows
  59 GETMIXEDPATH=$(ECHO)
  60 
  61 # Location of developer shared files
  62 SLASH_JAVA = /java
  63 
  64 # Platform specific settings


 217 #   Should be passed into anything running the vm (java, javac, javadoc, ...).
 218 ifdef JPRT_PRODUCT_VM_ARGS
 219   JAVA_VM_ARGS = $(JPRT_PRODUCT_VM_ARGS)
 220 endif
 221 
 222 # Check JAVA_ARGS arguments based on ARCH_DATA_MODEL etc.
 223 ifeq ($(OS_NAME),solaris)
 224   D64_ERROR_MESSAGE=Mismatch between ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) and use of -d64 in JAVA_ARGS=$(JAVA_ARGS)
 225   ifeq ($(ARCH_DATA_MODEL),32)
 226     ifneq ($(findstring -d64,$(JAVA_ARGS)),)
 227       x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)")
 228     endif
 229   endif
 230   ifeq ($(ARCH_DATA_MODEL),64)
 231     ifeq ($(findstring -d64,$(JAVA_ARGS)),)
 232       x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)")
 233     endif
 234   endif
 235 endif
 236 



























 237 # Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results)
 238 ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip
 239 ifdef JPRT_ARCHIVE_BUNDLE
 240   ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE)
 241 endif
 242 
 243 # How to create the test bundle (pass or fail, we want to create this)
 244 #   Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed.
 245 ZIP_UP_RESULTS = ( $(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)`     \
 246                    && $(CD) $(ABS_TEST_OUTPUT_DIR)             \
 247                    && $(ZIP) -q -r $(ARCHIVE_BUNDLE) . )
 248 SUMMARY_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport/text/summary.txt
 249 STATS_TXT_NAME = Stats.txt
 250 STATS_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/$(STATS_TXT_NAME)
 251 RUNLIST   = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/runlist.txt
 252 PASSLIST  = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/passlist.txt
 253 FAILLIST  = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/faillist.txt
 254 EXITCODE  = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/exitcode.txt
 255 
 256 TESTEXIT = \


 466 jdk_misc: demo javax/imageio javax/naming javax/print javax/script \
 467           javax/smartcardio javax/sound com/sun/java com/sun/jndi \
 468           com/sun/org sun/misc sun/pisces
 469         $(call RunSamevmBatch)
 470 
 471 # Stable samevm testruns (minus items from PROBLEM_LIST)
 472 JDK_ALL_TARGETS += jdk_net
 473 jdk_net: com/sun/net java/net sun/net
 474         $(call RunSamevmBatch)
 475 
 476 # Stable samevm testruns (minus items from PROBLEM_LIST)
 477 JDK_ALL_TARGETS += jdk_nio1
 478 jdk_nio1: java/nio/file
 479         $(call RunSamevmBatch)
 480 
 481 # Stable othervm testruns (minus items from PROBLEM_LIST)
 482 #   Using samevm has serious problems with these tests
 483 JDK_ALL_TARGETS += jdk_nio2
 484 jdk_nio2: java/nio/Buffer java/nio/ByteOrder \
 485           java/nio/channels java/nio/BufferPoolMXBean java/nio/MappedByteBuffer

 486         $(call RunOthervmBatch)
 487 
 488 # Stable othervm testruns (minus items from PROBLEM_LIST)
 489 #   Using samevm has serious problems with these tests
 490 JDK_ALL_TARGETS += jdk_nio3
 491 jdk_nio3: com/sun/nio sun/nio
 492         $(call RunOthervmBatch)
 493 
 494 # All nio tests
 495 jdk_nio: jdk_nio1 jdk_nio2 jdk_nio3
 496         @$(SummaryInfo)
 497 
 498 # Stable othervm testruns (minus items from PROBLEM_LIST)
 499 #   Using samevm has serious problems with these tests
 500 JDK_ALL_TARGETS += jdk_rmi
 501 jdk_rmi: java/rmi javax/rmi sun/rmi
 502         $(call RunOthervmBatch)
 503 
 504 # Stable samevm testruns (minus items from PROBLEM_LIST)
 505 JDK_ALL_TARGETS += jdk_security1
 506 jdk_security1: java/security
 507         $(call RunSamevmBatch)
 508 
 509 # Stable othervm testruns (minus items from PROBLEM_LIST)
 510 #   Using samevm has serious problems with these tests
 511 JDK_ALL_TARGETS += jdk_security2
 512 jdk_security2: javax/crypto com/sun/crypto
 513         $(call RunOthervmBatch)
 514 
 515 # Stable othervm testruns (minus items from PROBLEM_LIST)
 516 #   Using samevm has serious problems with these tests
 517 JDK_ALL_TARGETS += jdk_security3
 518 jdk_security3: com/sun/security lib/security javax/security sun/security

 519         $(call RunOthervmBatch)
 520 
 521 # All security tests
 522 jdk_security: jdk_security1 jdk_security2 jdk_security3
 523         @$(SummaryInfo)
 524 
 525 # Stable othervm testruns (minus items from PROBLEM_LIST)
 526 #   Using samevm has problems, and doesn't help performance as much as others.
 527 JDK_ALL_TARGETS += jdk_swing
 528 jdk_swing: javax/swing sun/java2d
 529         $(call RunOthervmBatch)
 530 
 531 # Stable samevm testruns (minus items from PROBLEM_LIST)
 532 JDK_ALL_TARGETS += jdk_text
 533 jdk_text: java/text sun/text
 534         $(call RunSamevmBatch)
 535 
 536 # Stable samevm testruns (minus items from PROBLEM_LIST)
 537 JDK_ALL_TARGETS += jdk_tools1
 538 jdk_tools1: com/sun/jdi
 539         $(call RunSamevmBatch)
 540 
 541 # Stable othervm testruns (minus items from PROBLEM_LIST)
 542 #   Using samevm has serious problems with these tests
 543 JDK_ALL_TARGETS += jdk_tools2
 544 jdk_tools2: com/sun/tools sun/jvmstat sun/tools tools vm com/sun/servicetag com/sun/tracing

 545         $(call RunOthervmBatch)
 546 
 547 # All tools tests
 548 jdk_tools: jdk_tools1 jdk_tools2
 549         @$(SummaryInfo)
 550 
 551 # Stable samevm testruns (minus items from PROBLEM_LIST)
 552 JDK_ALL_TARGETS += jdk_util
 553 jdk_util: java/util sun/util
 554         $(call RunSamevmBatch)
 555 
 556 # ------------------------------------------------------------------
 557 
 558 # Run all tests
 559 FILTER_OUT_LIST=jdk_awt jdk_rmi jdk_swing
 560 JDK_ALL_STABLE_TARGETS := $(filter-out $(FILTER_OUT_LIST), $(JDK_ALL_TARGETS))
 561 jdk_all: $(JDK_ALL_STABLE_TARGETS)
 562         @$(SummaryInfo)
 563 
 564 # These are all phony targets




  20 #
  21 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  22 # CA 95054 USA or visit www.sun.com if you need additional information or
  23 # have any questions.
  24 #
  25 
  26 #
  27 # Makefile to run various jdk tests
  28 #
  29 
  30 # Empty these to get rid of some default rules
  31 .SUFFIXES:
  32 .SUFFIXES: .java
  33 CO=
  34 GET=
  35 
  36 # Utilities used
  37 AWK       = awk
  38 CAT       = cat
  39 CD        = cd
  40 CHMOD     = chmod
  41 CP        = cp
  42 CUT       = cut
  43 ECHO      = echo
  44 EGREP     = egrep
  45 EXPAND    = expand
  46 FIND      = find
  47 MKDIR     = mkdir
  48 PWD       = pwd
  49 SED       = sed
  50 SORT      = sort
  51 TEE       = tee
  52 UNAME     = uname
  53 UNIQ      = uniq
  54 WC        = wc
  55 ZIP       = zip
  56 
  57 # Get OS name from uname
  58 UNAME_S := $(shell $(UNAME) -s)
  59 
  60 # Commands to run on paths to make mixed paths for java on windows
  61 GETMIXEDPATH=$(ECHO)
  62 
  63 # Location of developer shared files
  64 SLASH_JAVA = /java
  65 
  66 # Platform specific settings


 219 #   Should be passed into anything running the vm (java, javac, javadoc, ...).
 220 ifdef JPRT_PRODUCT_VM_ARGS
 221   JAVA_VM_ARGS = $(JPRT_PRODUCT_VM_ARGS)
 222 endif
 223 
 224 # Check JAVA_ARGS arguments based on ARCH_DATA_MODEL etc.
 225 ifeq ($(OS_NAME),solaris)
 226   D64_ERROR_MESSAGE=Mismatch between ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) and use of -d64 in JAVA_ARGS=$(JAVA_ARGS)
 227   ifeq ($(ARCH_DATA_MODEL),32)
 228     ifneq ($(findstring -d64,$(JAVA_ARGS)),)
 229       x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)")
 230     endif
 231   endif
 232   ifeq ($(ARCH_DATA_MODEL),64)
 233     ifeq ($(findstring -d64,$(JAVA_ARGS)),)
 234       x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)")
 235     endif
 236   endif
 237 endif
 238 
 239 # Temp file to hold list of shared library files possibly needing execute 
 240 #   permissions at runtime. 
 241 SHARED_LIBRARY_LIST=$(ABS_TEST_OUTPUT_DIR)/shared_libraries.txt
 242 
 243 # Macro that may change execute permissions on library files and check for them.
 244 #  Files in repositories should not really have execute permissions, however
 245 #  windows dll files require execute permission. Adding execute permission
 246 #  may happen automatically on windows when using certain versions of mercurial
 247 #  but it cannot be guaranteed. And blindly adding execute permission might
 248 #  be seen as a mercurial 'change', so we avoid adding execute permission to
 249 #  repository files. Testing from a plain source tree may need the chmod a+x.
 250 #  Used on select directories.
 251 define CheckLibraryExecutePermissions # dir
 252 $(RM) $(SHARED_LIBRARY_LIST)
 253 $(FIND) $1 -name \*.dll -o -name \*.DLL -o -name \*.so > $(SHARED_LIBRARY_LIST)
 254 if [ -s $(SHARED_LIBRARY_LIST) -a ! -d $(TEST_ROOT)/../.hg ] ; then    \
 255   $(CHMOD) a+x `$(CAT) $(SHARED_LIBRARY_LIST)`;                        \
 256 fi
 257 if [ -s $(SHARED_LIBRARY_LIST) ] ; then                                \
 258   for i in `$(CAT) $(SHARED_LIBRARY_LIST)` ; do                        \
 259     if [ ! -x $${i} ] ; then                                           \
 260       $(ECHO) "WARNING: File does not have execute permission: $${i}"; \
 261     fi;                                                                \
 262   done;                                                                \
 263 fi
 264 endef
 265 
 266 # Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results)
 267 ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip
 268 ifdef JPRT_ARCHIVE_BUNDLE
 269   ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE)
 270 endif
 271 
 272 # How to create the test bundle (pass or fail, we want to create this)
 273 #   Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed.
 274 ZIP_UP_RESULTS = ( $(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)`     \
 275                    && $(CD) $(ABS_TEST_OUTPUT_DIR)             \
 276                    && $(ZIP) -q -r $(ARCHIVE_BUNDLE) . )
 277 SUMMARY_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport/text/summary.txt
 278 STATS_TXT_NAME = Stats.txt
 279 STATS_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/$(STATS_TXT_NAME)
 280 RUNLIST   = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/runlist.txt
 281 PASSLIST  = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/passlist.txt
 282 FAILLIST  = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/faillist.txt
 283 EXITCODE  = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/exitcode.txt
 284 
 285 TESTEXIT = \


 495 jdk_misc: demo javax/imageio javax/naming javax/print javax/script \
 496           javax/smartcardio javax/sound com/sun/java com/sun/jndi \
 497           com/sun/org sun/misc sun/pisces
 498         $(call RunSamevmBatch)
 499 
 500 # Stable samevm testruns (minus items from PROBLEM_LIST)
 501 JDK_ALL_TARGETS += jdk_net
 502 jdk_net: com/sun/net java/net sun/net
 503         $(call RunSamevmBatch)
 504 
 505 # Stable samevm testruns (minus items from PROBLEM_LIST)
 506 JDK_ALL_TARGETS += jdk_nio1
 507 jdk_nio1: java/nio/file
 508         $(call RunSamevmBatch)
 509 
 510 # Stable othervm testruns (minus items from PROBLEM_LIST)
 511 #   Using samevm has serious problems with these tests
 512 JDK_ALL_TARGETS += jdk_nio2
 513 jdk_nio2: java/nio/Buffer java/nio/ByteOrder \
 514           java/nio/channels java/nio/BufferPoolMXBean java/nio/MappedByteBuffer
 515         $(call CheckLibraryExecutePermissions,java/nio/channels)
 516         $(call RunOthervmBatch)
 517 
 518 # Stable othervm testruns (minus items from PROBLEM_LIST)
 519 #   Using samevm has serious problems with these tests
 520 JDK_ALL_TARGETS += jdk_nio3
 521 jdk_nio3: com/sun/nio sun/nio
 522         $(call RunOthervmBatch)
 523 
 524 # All nio tests
 525 jdk_nio: jdk_nio1 jdk_nio2 jdk_nio3
 526         @$(SummaryInfo)
 527 
 528 # Stable othervm testruns (minus items from PROBLEM_LIST)
 529 #   Using samevm has serious problems with these tests
 530 JDK_ALL_TARGETS += jdk_rmi
 531 jdk_rmi: java/rmi javax/rmi sun/rmi
 532         $(call RunOthervmBatch)
 533 
 534 # Stable samevm testruns (minus items from PROBLEM_LIST)
 535 JDK_ALL_TARGETS += jdk_security1
 536 jdk_security1: java/security
 537         $(call RunSamevmBatch)
 538 
 539 # Stable othervm testruns (minus items from PROBLEM_LIST)
 540 #   Using samevm has serious problems with these tests
 541 JDK_ALL_TARGETS += jdk_security2
 542 jdk_security2: javax/crypto com/sun/crypto
 543         $(call RunOthervmBatch)
 544 
 545 # Stable othervm testruns (minus items from PROBLEM_LIST)
 546 #   Using samevm has serious problems with these tests
 547 JDK_ALL_TARGETS += jdk_security3
 548 jdk_security3: com/sun/security lib/security javax/security sun/security
 549         $(call CheckLibraryExecutePermissions,sun/security)
 550         $(call RunOthervmBatch)
 551 
 552 # All security tests
 553 jdk_security: jdk_security1 jdk_security2 jdk_security3
 554         @$(SummaryInfo)
 555 
 556 # Stable othervm testruns (minus items from PROBLEM_LIST)
 557 #   Using samevm has problems, and doesn't help performance as much as others.
 558 JDK_ALL_TARGETS += jdk_swing
 559 jdk_swing: javax/swing sun/java2d
 560         $(call RunOthervmBatch)
 561 
 562 # Stable samevm testruns (minus items from PROBLEM_LIST)
 563 JDK_ALL_TARGETS += jdk_text
 564 jdk_text: java/text sun/text
 565         $(call RunSamevmBatch)
 566 
 567 # Stable samevm testruns (minus items from PROBLEM_LIST)
 568 JDK_ALL_TARGETS += jdk_tools1
 569 jdk_tools1: com/sun/jdi
 570         $(call RunSamevmBatch)
 571 
 572 # Stable othervm testruns (minus items from PROBLEM_LIST)
 573 #   Using samevm has serious problems with these tests
 574 JDK_ALL_TARGETS += jdk_tools2
 575 jdk_tools2: com/sun/tools sun/jvmstat sun/tools tools vm com/sun/servicetag com/sun/tracing
 576         $(call CheckLibraryExecutePermissions,tools/launcher)
 577         $(call RunOthervmBatch)
 578 
 579 # All tools tests
 580 jdk_tools: jdk_tools1 jdk_tools2
 581         @$(SummaryInfo)
 582 
 583 # Stable samevm testruns (minus items from PROBLEM_LIST)
 584 JDK_ALL_TARGETS += jdk_util
 585 jdk_util: java/util sun/util
 586         $(call RunSamevmBatch)
 587 
 588 # ------------------------------------------------------------------
 589 
 590 # Run all tests
 591 FILTER_OUT_LIST=jdk_awt jdk_rmi jdk_swing
 592 JDK_ALL_STABLE_TARGETS := $(filter-out $(FILTER_OUT_LIST), $(JDK_ALL_TARGETS))
 593 jdk_all: $(JDK_ALL_STABLE_TARGETS)
 594         @$(SummaryInfo)
 595 
 596 # These are all phony targets