JDO
  1. JDO
  2. JDO-300

Log system and jvm version information with test results

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JDO 2 beta
    • Fix Version/s: JDO 2 final (2.0)
    • Component/s: tck
    • Labels:
      None

      Description

      In order to capture complete environment information with a test run for certification and debugging, capture information about the host system and the jvm and write to the log/.../configuration directory for the test run. This could be implemented in maven using java -version and uname calls, or could be implemented as a special-purpose junit test where the latter records the values of the relevant java system properties, such as java.version, os.name... The latter approach is more easily made independent of the OS the test run is performed on.

      1. JDO-300.patch
        5 kB
        Michelle Caisse

        Activity

        Hide
        Michelle Caisse added a comment -

        Fixed with revision 384120

        Show
        Michelle Caisse added a comment - Fixed with revision 384120
        Hide
        Craig L Russell added a comment -

        You have convinced me that we don't need anything but the system properties.

        Good to go.

        Show
        Craig L Russell added a comment - You have convinced me that we don't need anything but the system properties. Good to go.
        Hide
        Michelle Caisse added a comment -

        (1) I will make the file name an argument.

        (2) I thought we decided to get all the system information from Java system properties instead of using commands that are OS-specific. Java provides some host and OS information, though perhaps not always as detailed as uname -a output. On my machine I get this from uname -a:

        CYGWIN_NT-5.0 michelle-home 1.5.18(0.132/4/2) 2005-07-02 20:30 i686 unknown unknown Cygwin

        and this as output of SystemCfgSummary:

        java.runtime.name: Java(TM) 2 Runtime Environment, Standard Edition
        sun.boot.library.path: C:\Program Files\Java\jdk1.5.0_05\jre\bin
        java.vm.version: 1.5.0_05-b05
        java.vm.vendor: Sun Microsystems Inc.
        java.vendor.url: http://java.sun.com/
        path.separator: ;
        java.vm.name: Java HotSpot(TM) Client VM
        file.encoding.pkg: sun.io
        user.country: US
        sun.os.patch.level: Service Pack 4
        java.vm.specification.name: Java Virtual Machine Specification
        user.dir: C:\svn0\jdo\trunk\tck20\target
        java.runtime.version: 1.5.0_05-b05
        java.awt.graphicsenv: sun.awt.Win32GraphicsEnvironment
        java.endorsed.dirs: C:\Program Files\Java\jdk1.5.0_05\jre\lib\endorsed
        os.arch: x86
        java.io.tmpdir: c:\DOCUME~1\michelle\LOCALS~1\Temp\
        line.separator:

        java.vm.specification.vendor: Sun Microsystems Inc.
        user.variant:
        os.name: Windows 2000
        sun.jnu.encoding: Cp1252
        java.library.path: C:\Program Files\Java\jdk1.5.0_05\jre\bin;.;C:\WINNT\system32;C:\WINNT;C:\cygwin\usr\local\bin;C:\cygwin\bin;C:\cygwin\bin;C:\cygwin\usr\X11R6\bin;c:\WINNT\system32;c:\WINNT;c:\WINNT\system32\WBEM;c:\Program Files\Soundruler\bin\win32;c:\Program Files\Java\jdk1.5.0_05\bin;c:\PROGRA~1\svn-win32-1.2.3\bin;c:\maven 1.0.2\bin;c:\cvs;c:\apache-ant-1.6.2\bin;c:\jikes-1.14\bin;C:\cygwin\bin;c:\Program Files\cvsnt;c:\maven-2.0\bin;.\
        java.specification.name: Java Platform API Specification
        java.class.version: 49.0
        sun.management.compiler: HotSpot Client Compiler
        os.version: 5.0
        user.home: C:\Documents and Settings\michelle
        user.timezone:
        java.awt.printerjob: sun.awt.windows.WPrinterJob
        file.encoding: Cp1252
        java.specification.version: 1.5
        user.name: michelle

        Show
        Michelle Caisse added a comment - (1) I will make the file name an argument. (2) I thought we decided to get all the system information from Java system properties instead of using commands that are OS-specific. Java provides some host and OS information, though perhaps not always as detailed as uname -a output. On my machine I get this from uname -a: CYGWIN_NT-5.0 michelle-home 1.5.18(0.132/4/2) 2005-07-02 20:30 i686 unknown unknown Cygwin and this as output of SystemCfgSummary: java.runtime.name: Java(TM) 2 Runtime Environment, Standard Edition sun.boot.library.path: C:\Program Files\Java\jdk1.5.0_05\jre\bin java.vm.version: 1.5.0_05-b05 java.vm.vendor: Sun Microsystems Inc. java.vendor.url: http://java.sun.com/ path.separator: ; java.vm.name: Java HotSpot(TM) Client VM file.encoding.pkg: sun.io user.country: US sun.os.patch.level: Service Pack 4 java.vm.specification.name: Java Virtual Machine Specification user.dir: C:\svn0\jdo\trunk\tck20\target java.runtime.version: 1.5.0_05-b05 java.awt.graphicsenv: sun.awt.Win32GraphicsEnvironment java.endorsed.dirs: C:\Program Files\Java\jdk1.5.0_05\jre\lib\endorsed os.arch: x86 java.io.tmpdir: c:\DOCUME~1\michelle\LOCALS~1\Temp\ line.separator: java.vm.specification.vendor: Sun Microsystems Inc. user.variant: os.name: Windows 2000 sun.jnu.encoding: Cp1252 java.library.path: C:\Program Files\Java\jdk1.5.0_05\jre\bin;.;C:\WINNT\system32;C:\WINNT;C:\cygwin\usr\local\bin;C:\cygwin\bin;C:\cygwin\bin;C:\cygwin\usr\X11R6\bin;c:\WINNT\system32;c:\WINNT;c:\WINNT\system32\WBEM;c:\Program Files\Soundruler\bin\win32;c:\Program Files\Java\jdk1.5.0_05\bin;c:\PROGRA~1\svn-win32-1.2.3\bin;c:\maven 1.0.2\bin;c:\cvs;c:\apache-ant-1.6.2\bin;c:\jikes-1.14\bin;C:\cygwin\bin;c:\Program Files\cvsnt;c:\maven-2.0\bin;.\ java.specification.name: Java Platform API Specification java.class.version: 49.0 sun.management.compiler: HotSpot Client Compiler os.version: 5.0 user.home: C:\Documents and Settings\michelle user.timezone: java.awt.printerjob: sun.awt.windows.WPrinterJob file.encoding: Cp1252 java.specification.version: 1.5 user.name: michelle
        Hide
        Craig L Russell added a comment -

        And I think I missed where you output the java version and the `uname -a` output for the system info.

        Show
        Craig L Russell added a comment - And I think I missed where you output the java version and the `uname -a` output for the system info.
        Hide
        Craig L Russell added a comment -

        Looks good. Just one comment.

        The name of the file emitted by the SystemCfgSummary program would be better specified as a command line argument instead of always system_config.txt. You might just take the file name instead of the directory name as the first argument, or take two arguments, the directory and file, and default the file if it's missing.

        This does two things: it makes the program more flexible, and it's easier to see from the maven script the name of the file you're creating.

        Show
        Craig L Russell added a comment - Looks good. Just one comment. The name of the file emitted by the SystemCfgSummary program would be better specified as a command line argument instead of always system_config.txt. You might just take the file name instead of the directory name as the first argument, or take two arguments, the directory and file, and default the file if it's missing. This does two things: it makes the program more flexible, and it's easier to see from the maven script the name of the file you're creating.
        Hide
        Michelle Caisse added a comment -

        Created a new java utility class to write all System properties to a file in the logs/<timestamp>/configuration directory. Added some lines in the result goal of maven.xml to invoke the class.

        Also moved <attainGoal name="result"> from the build and two runtck goals to the two privateRuntck goals.

        Show
        Michelle Caisse added a comment - Created a new java utility class to write all System properties to a file in the logs/<timestamp>/configuration directory. Added some lines in the result goal of maven.xml to invoke the class. Also moved <attainGoal name="result"> from the build and two runtck goals to the two privateRuntck goals.

          People

          • Assignee:
            Michelle Caisse
            Reporter:
            Michelle Caisse
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development