You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by cu...@apache.org on 2001/01/19 22:43:13 UTC
cvs commit: xml-xalan/test/java/src/org/apache/qetest/xsl XSLDirectoryIterator.java XSLProcessorTestBase.java
curcuru 01/01/19 13:43:13
Modified: test/java/src/org/apache/qetest/xsl
XSLDirectoryIterator.java XSLProcessorTestBase.java
Log:
Minor updates to better handle diagnostic log names;
condensed and improved exception logging in processOneFile
Revision Changes Path
1.5 +7 -29 xml-xalan/test/java/src/org/apache/qetest/xsl/XSLDirectoryIterator.java
Index: XSLDirectoryIterator.java
===================================================================
RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/xsl/XSLDirectoryIterator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XSLDirectoryIterator.java 2000/12/20 14:10:44 1.4
+++ XSLDirectoryIterator.java 2001/01/19 21:43:12 1.5
@@ -99,7 +99,7 @@
* </ul>
* @todo improve file discovery - file execution paradigm
* @author Shane Curcuru
- * @version $Id: XSLDirectoryIterator.java,v 1.4 2000/12/20 14:10:44 curcuru Exp $
+ * @version $Id: XSLDirectoryIterator.java,v 1.5 2001/01/19 21:43:12 curcuru Exp $
*/
public class XSLDirectoryIterator extends XSLProcessorTestBase
{
@@ -1159,37 +1159,14 @@
processorW.reset();
}
- // Catch SAXExceptions and check if they're expected; restart to be safe
- catch (SAXException sax)
- {
- reporter.logStatusMsg("processSingleFile(" + XSLName
- + ") threw: " + sax.toString());
-
- int retVal = checkExpectedException(sax, XSLName, OutName);
-
- createNewProcessor(); // Should be configurable!
-
- return retVal;
- }
-
- // Catch general Exceptions, check if they're expected, and restart
- catch (Exception e)
- {
- reporter.logStatusMsg("processSingleFile(" + XSLName
- + ") threw: " + e.toString());
-
- int retVal = checkExpectedException(e, XSLName, OutName);
-
- createNewProcessor();
-
- return retVal;
- }
-
+ // Removed: separate (but duplicate) catches for SAXException, Exception
// Catch any Throwable, check if they're expected, and restart
catch (Throwable t)
{
reporter.logStatusMsg("processSingleFile(" + XSLName
+ ") threw: " + t.toString());
+ reporter.logThrowable(reporter.WARNINGMSG, t,
+ "processSingleFile(" + XSLName + ") threw");
int retVal = checkExpectedException(t, XSLName, OutName);
@@ -1410,9 +1387,10 @@
{
if (diagNameMgr == null)
{
-
// Create a new name manager, hardcode the .log extension just because
- diagNameMgr = new OutputNameManager(diagnostics, ".log");
+ // New: put them in outputDir
+ diagNameMgr = new OutputNameManager(outputDir + File.separator
+ + diagnostics, ".log");
}
try
1.8 +1 -35 xml-xalan/test/java/src/org/apache/qetest/xsl/XSLProcessorTestBase.java
Index: XSLProcessorTestBase.java
===================================================================
RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/xsl/XSLProcessorTestBase.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- XSLProcessorTestBase.java 2000/12/27 21:12:23 1.7
+++ XSLProcessorTestBase.java 2001/01/19 21:43:13 1.8
@@ -91,7 +91,7 @@
* <li>runErr</li>
* </ul>
* @author Shane_Curcuru@lotus.com
- * @version $Id: XSLProcessorTestBase.java,v 1.7 2000/12/27 21:12:23 curcuru Exp $
+ * @version $Id: XSLProcessorTestBase.java,v 1.8 2001/01/19 21:43:13 curcuru Exp $
*/
public class XSLProcessorTestBase extends FileBasedTest
{
@@ -326,9 +326,6 @@
reporter.addDefaultLogger(); // add default logger if needed
reporter.testFileInit(testName, testComment);
- // Fixup some paths to be absolute, see method comments for @todo
- fixupPaths();
-
// Create a file-based CheckService for later use
if (fileChecker == null)
{
@@ -695,37 +692,6 @@
return "file:///" + tmp;
}
-
- /**
- * Worker method to fixup pathing for diagnostics.
- * @todo - this is a hack, we may not even need it
- * @author Shane Curcuru
- */
- public void fixupPaths()
- {
-
- // Convert all dir references to absolute ones, to get around
- // potential problems with relative paths and test harnesses
- // that change the current directory
- // Try getCanonicalPath first; otherwise default to getAbsolutePath()
- // @todo also implement logFile
- if (diagnostics != null)
- {
- File tempF = new File(diagnostics);
-
- try
- {
- diagnostics = tempF.getCanonicalPath();
- }
- catch (IOException ioe1)
- {
- diagnostics = tempF.getAbsolutePath();
- }
-
- reporter.logTraceMsg(OPT_DIAGNOSTICS + " reset to absolute: "
- + diagnostics);
- }
- }
/**
* Write a "{TestName}.Pass" or "{TestName}.Not.Pass" file