From 447d2410b0bc8bd20795a387181d3674e56e278d Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Thu, 21 Jul 2005 02:37:10 +0000 Subject: [PATCH] print version info once when run w/ 'time 10 test' --- .../src/net/hyperic/sigar/test/SigarTestPrinter.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bindings/java/src/net/hyperic/sigar/test/SigarTestPrinter.java b/bindings/java/src/net/hyperic/sigar/test/SigarTestPrinter.java index ff0bb2c6..b7ac662f 100644 --- a/bindings/java/src/net/hyperic/sigar/test/SigarTestPrinter.java +++ b/bindings/java/src/net/hyperic/sigar/test/SigarTestPrinter.java @@ -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);