[addressing-devel] FuraSrc/Server/ServerTestsuite/src/com/gridsystems/testsuite/serverutils/junit/c
Brought to you by:
nodens2k
From: Gridsystems C. <gsc...@us...> - 2008-09-03 21:27:56
|
Update of /cvsroot/fura/FuraSrc/Server/ServerTestsuite/src/com/gridsystems/testsuite/serverutils/junit/cl In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8372/FuraSrc/Server/ServerTestsuite/src/com/gridsystems/testsuite/serverutils/junit/cl Modified Files: TestRunner.java Log Message: cvssync-20080903232636 Index: TestRunner.java =================================================================== RCS file: /cvsroot/fura/FuraSrc/Server/ServerTestsuite/src/com/gridsystems/testsuite/serverutils/junit/cl/TestRunner.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TestRunner.java 22 Aug 2008 22:16:19 -0000 1.3 --- TestRunner.java 3 Sep 2008 21:27:23 -0000 1.4 *************** *** 34,37 **** --- 34,38 ---- import com.gridsystems.testsuite.serverutils.ServerConfiguration; import com.gridsystems.testsuite.util.Utils; + import com.gridsystems.utils.FileUtils; /** *************** *** 40,44 **** * * @see com.gridsystems.testsuite.junit.cl.TestRunner ! * @author <a href="maito:jt...@gr...">Job Torres</a> * @author jrossello * @version 1.0 --- 41,45 ---- * * @see com.gridsystems.testsuite.junit.cl.TestRunner ! * @author Job Torres * @author jrossello * @version 1.0 *************** *** 239,242 **** --- 240,246 ---- } + // Create zips for server logs files + generateZips(); + // Sends mail if needed sendMail(); *************** *** 625,628 **** --- 629,635 ---- this.sendMail = mailRecipients.size() > 0; } + + // Extra logs properties + this.sendLogs = "true".equals(System.getProperty("testsuite.sendlogs")); } *************** *** 764,766 **** --- 771,803 ---- System.exit(0); } + + /** + * Generate zip files for server logs. + */ + private void generateZips() { + if (this.sendLogs) { + // zip all files in server log path + if (this.serverPath != null) { + try { + String zipName = "serverlog.zip"; + FileUtils.zip(new File(LOGS_DIR + zipName) , + new File(this.serverPath + "/logs"), null); + this.extraLogs.add((String)(LOGS_DIR + zipName)); + } catch (Exception e) { + logger.error("Error zipping log files " + this.serverPath); + } + } + // zip all files in broker log path + if (this.devBrokerPath != null) { + try { + String zipName = "brokerlog.zip"; + FileUtils.zip(new File(LOGS_DIR + zipName) , + new File(this.devBrokerPath + "/logs"), null); + this.extraLogs.add((String)(LOGS_DIR + zipName)); + } catch (Exception e) { + logger.error("Error zipping log files " + this.devBrokerPath); + } + } + } + } } |