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