You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by jc...@apache.org on 2010/08/29 16:16:46 UTC
svn commit: r990581 -
/incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/harness/HtmlReport.java
Author: jcosters
Date: Sun Aug 29 14:16:46 2010
New Revision: 990581
URL: http://svn.apache.org/viewvc?rev=990581&view=rev
Log:
RIVER-333: add test environment info (JSK location, harness location, JVM and OS info) to the generated HTML report
Modified:
incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/harness/HtmlReport.java
Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/harness/HtmlReport.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/harness/HtmlReport.java?rev=990581&r1=990580&r2=990581&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/harness/HtmlReport.java (original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/harness/HtmlReport.java Sun Aug 29 14:16:46 2010
@@ -25,6 +25,7 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
+import java.util.Properties;
import java.util.StringTokenizer;
/**
@@ -79,6 +80,7 @@ public class HtmlReport {
if (config.isMaster()) {
printStats();
printTimes();
+ printEnvironment();
}
out.println("</TR>");
@@ -229,6 +231,42 @@ public class HtmlReport {
}
/**
+ * Prints information about the test environment.
+ */
+ private void printEnvironment() throws IOException {
+ String installDir = "com.sun.jini.qa.home";//XXX note 'qa'
+ String jskHome = "com.sun.jini.jsk.home";
+ out.println();
+ out.println("<TD>");
+ out.println("<PRE>Installation directory of the JSK:");
+ out.println(" " + jskHome + "="
+ + config.getStringConfigVal(jskHome, null));
+ out.println("Installation directory of the harness:");
+ out.println(" " + installDir + "="
+ + config.getStringConfigVal(installDir, null));
+ //out.println(" Categories being tested:");
+ //out.println(" categories=" + categoryString);
+ out.println("</PRE>");
+ out.println("</TD>");
+
+ Properties properties = System.getProperties();
+ out.println("<TD>");
+ out.println("<PRE>JVM information:");
+ out.println(" " + properties.getProperty("java.vm.name","unknown")
+ + ", " + properties.getProperty("java.vm.version")
+ + ", " + properties.getProperty("sun.arch.data.model","32")
+ + " bit VM mode");
+ out.println(" " + properties.getProperty("java.vm.vendor",""));
+ out.println("OS information:");
+ out.println(" " + properties.getProperty("os.name","unknown")
+ + ", " + properties.getProperty("os.version")
+ + ", " + properties.getProperty("os.arch"));
+ out.println("</PRE>");
+ out.println("</TD>");
+ out.println();
+ }
+
+ /**
* Prints start, finish, and elapsed times to the report.
*/
private void printTimes() throws IOException {