print version info once when run w/ 'time 10 test'

This commit is contained in:
Doug MacEachern 2005-07-21 02:37:10 +00:00
parent b8a145e95f
commit 447d2410b0
1 changed files with 9 additions and 0 deletions

View File

@ -20,6 +20,8 @@ public class SigarTestPrinter extends ResultPrinter {
private HashMap failures = new HashMap();
private int maxNameLen = 0;
//just print once if we're run w/ "time 10 test"
private static boolean printedVersion;
private static final String[][] LOG_PROPS = {
{
@ -82,6 +84,13 @@ public class SigarTestPrinter extends ResultPrinter {
}
public void printVersionInfo() {
if (printedVersion) {
return;
}
else {
printedVersion = true;
}
PrintStream writer = getWriter();
Version.printInfo(writer);