jdk/test/java/rmi/testlibrary/README.jcov
author katleman
Thu, 29 Dec 2011 15:14:45 -0800
changeset 11330 084a13b20cf3
parent 2 90ce3da70b43
permissions -rw-r--r--
Added tag jdk8-b19 for changeset d0ec48636c58
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
######################################################################## 
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
# This file contains example scripts and property files for collecting 
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# code coverage data of the RMI regression suite.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# Since many RMI regression tests spawn child VMs (either directly
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# or through activation), special support is required for setting
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
# command line options and arguments needed by jcov - the code coverage 
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# instrumentation and collection tool.  This special support is provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
# by properties in the test.props file.  If a file named ../../test.props 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
# exists (assuming the working directory is "<path>/JTwork/scratch", this
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# will find "<path>/test.props"), then it will be used by test library 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# code that spawns VMs or instances of rmid.  See the example test.props
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# file below for the properties that may be defined.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
######################################################################## 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# The following is a script used to execute RMI regression tests 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
# on Solaris and collect code coverage data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
#!/bin/ksh
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
export JAVA_HOME=<path to special JDK jcov instrumented build>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
export JT_HOME=<path to special JTREG build with jcov hooks>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
export CLASSPATH=.:${JT_HOME}/javatest.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
export OPTS="-Xms256m -Xmx256m -XX:+UseUnsupportedDeprecatedJVMPI -XX:+EnableJVMPIInstructionStartEvent -XX:-UseFastEmptyMethods -XX:-UseFastAccessorMethods -timeoutFactor:4"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
export TESTBASE=/files/<JDK workspace>/test
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
${JT_HOME}/solaris/bin/jtreg -Xrunjcov:file=/files/rmi.jcov ${OPTS} -va -w:/tmp/JT -r:/tmp/JTreport -jdk:${JAVA_HOME} ${TESTBASE}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
########################################################################
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
# The following section is an example test.props property file
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
# used for collecting code coverage data for JDK 1.6.  These properties
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
# are currently supported:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
#   jcov.options are the jcov options that should be added to VMs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
#                system properties
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
#   rmid.jcov.args are the jcov options that should be added as
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
#                  arguments to rmid command line; effectively, these
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
#                  are identical to jcov.options but each option is
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
#                  prefaced with '-C'
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
#   jcov.sleep.multiplier is an integer that will be multiplied by
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
#                         various wait times in the test library; the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
#                         default value used is '1'
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
jcov.options=-Xrunjcov:file=/files/rmi.jcov -Xms256m -Xmx256m -XX:+UseUnsupportedDeprecatedJVMPI -XX:+EnableJVMPIInstructionStartEvent -XX:-UseFastEmptyMethods -XX:-UseFastAccessorMethods
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
rmid.jcov.args=-C-Xrunjcov:file=/files/rmi.jcov -C-Xms256m -C-Xmx256m -C-XX:+UseUnsupportedDeprecatedJVMPI -C-XX:+EnableJVMPIInstructionStartEvent -C-XX:-UseFastEmptyMethods -C-XX:-UseFastAccessorMethods
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
jcov.sleep.multiplier=3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
########################################################################
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
# The following section is an example script that generates the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
# jcov report.  The important documentation here is the list of Java
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
# packages and classes that are included in the RMI coverage report.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
#!/bin/ksh
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
export CLASSPATH=<path to jcov.jar>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
export SRCS=<path to sources of the instrumented JDK build>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
java com.sun.tdk.jcov.MergerMain <path to jcov 'A' template for the build>template_a.jcov /files/rmi.jcov
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
java -Xms256m -Xmx512m com.sun.tdk.jcov.RepGenMain -fmt=html_ns -src_root=${SRCS} \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
        -include=java.rmi.* \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
        -include=java.rmi.activation.* \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
        -include=java.rmi.dgc.* \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
        -include=java.rmi.registry.* \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
        -include=java.rmi.server.* \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
        -include=sun.rmi.log.* \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
        -include=sun.rmi.registry.* \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
        -include=sun.rmi.runtime.* \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
        -include=sun.rmi.server.* \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
        -include=sun.rmi.transport.* \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
        -include=sun.rmi.transport.proxy.* \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
        -include=sun.rmi.transport.tcp.* \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
        -include=java.lang.reflect.Proxy \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
        -include=sun.misc.ProxyGenerator \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
        -exclude=com.sun.rmi.rmid.* \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
        -exclude=sun.rmi.rmic.* \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
        -exclude=sun.rmi.rmic.iiop.* \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
        -exclude=javax.rmi.ssl.* \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
        java.jcov
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80