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...@locus.apache.org on 2000/12/19 17:49:43 UTC
cvs commit: xml-xalan/test APITest.properties ConformanceTest.bat contribtest.bat runtest.bat traxapitest.bat
curcuru 00/12/19 08:49:42
Modified: test APITest.properties ConformanceTest.bat
contribtest.bat runtest.bat traxapitest.bat
Log:
Update for better support of -crimson first arg
Revision Changes Path
1.3 +1 -1 xml-xalan/test/APITest.properties
Index: APITest.properties
===================================================================
RCS file: /home/cvs/xml-xalan/test/APITest.properties,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- APITest.properties 2000/11/09 22:15:10 1.2
+++ APITest.properties 2000/12/19 16:49:40 1.3
@@ -32,7 +32,7 @@
#---- Choose output: How much/what kinds of info should we log
# Choose output: How much logging info is saved: between 0 (very little) and 99 (lots)
-loggingLevel=50
+loggingLevel=99
# If we should save performance-oriented info in the logfile
perfLogging=true
1.2 +8 -2 xml-xalan/test/ConformanceTest.bat
Index: ConformanceTest.bat
===================================================================
RCS file: /home/cvs/xml-xalan/test/ConformanceTest.bat,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ConformanceTest.bat 2000/12/15 21:43:45 1.1
+++ ConformanceTest.bat 2000/12/19 16:49:40 1.2
@@ -2,10 +2,16 @@
@goto start
@REM Name: ConformanceTest.bat
@REM Author: Shane_Curcuru@lotus.com
+@REM Simple wrapper for runtest.bat to run the 'default'
+@REM Conformance test wrapper, along with any extra args provided
:start
+@REM Pass along -crimson if it's the first arg
+if '%1' == '-crimson' set DASHCRIMSON=-crimson
+if '%1' == '-crimson' shift
set END_PKG=xsl
-@echo Wrapper using 'xsl.ConformanceTest -load ConformanceTest.properties'
-call runtest.bat ConformanceTest -load ConformanceTest.properties %1 %2 %3 %4 %5 %6 %7 %8 %9
+@echo Wrapper using '%DASHCRIMSON% xsl.ConformanceTest -load ConformanceTest.properties arg1 arg2...'
+call runtest.bat %DASHCRIMSON% ConformanceTest -load ConformanceTest.properties %1 %2 %3 %4 %5 %6 %7 %8 %9
set END_PKG=
+set DASHCRIMSON=
:end
1.2 +9 -2 xml-xalan/test/contribtest.bat
Index: contribtest.bat
===================================================================
RCS file: /home/cvs/xml-xalan/test/contribtest.bat,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- contribtest.bat 2000/11/01 23:25:29 1.1
+++ contribtest.bat 2000/12/19 16:49:41 1.2
@@ -2,10 +2,17 @@
@goto start
@REM Name: contribtest.bat
@REM Author: Shane_Curcuru@lotus.com
+@REM Simple wrapper for runtest.bat to run the 'default'
+@REM Conformance test wrapper over the test/contrib
+@REM directory instead, along with any extra args provided
:start
+@REM Pass along -crimson if it's the first arg
+if '%1' == '-crimson' set DASHCRIMSON=-crimson
+if '%1' == '-crimson' shift
set END_PKG=xsl
-@echo Wrapper using 'xsl.ConformanceTest -load ContribTest.properties'
-call runtest.bat ConformanceTest -load ContribTest.properties %1 %2 %3 %4 %5 %6 %7 %8 %9
+@echo Wrapper using '%DASHCRIMSON% xsl.ConformanceTest -load ContribTest.properties'
+call runtest.bat %DASHCRIMSON% ConformanceTest -load ContribTest.properties %1 %2 %3 %4 %5 %6 %7 %8 %9
set END_PKG=
+set DASHCRIMSON=
:end
1.4 +25 -19 xml-xalan/test/runtest.bat
Index: runtest.bat
===================================================================
RCS file: /home/cvs/xml-xalan/test/runtest.bat,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- runtest.bat 2000/11/16 22:42:47 1.3
+++ runtest.bat 2000/12/19 16:49:41 1.4
@@ -6,11 +6,12 @@
@echo runtest.bat - runs Xalan-J test automation
@echo.
@echo Notes/prerequisites:
+@echo Assumes you're in xml-xalan/test
@echo JAVA_OPTS Will be passed to java.exe or jview.exe
@echo EXTRA_CP Will be appended to the classpath
@echo END_PKG Will be the subpackage name after org.apache.qetest
-@echo Special: %1=-jview: Run Microsoft's jview instead of java
-@echo Special: %1=-crimson: Use crimson.jar instead of xerces.jar
+@echo Special: first arg= -jview: Run Microsoft's jview instead of java
+@echo Special: first arg= -crimson: Use crimson.jar instead of xerces.jar
@echo Common args include (from the java file, ignore first two "ERROR" lines):
@REM Call with illegal arg to force Java code to print usage()
java -classpath %CLASSPATH%;testxsl.jar;%JARDIR%\testxsl.jar org.apache.qetest.xsl.XSLProcessorTestBase -load
@@ -25,12 +26,16 @@
if '%1' == '-h' goto usage
if '%1' == '-H' goto usage
if '%1' == '-?' goto usage
+
+@REM Process special first input arguments
+@REM Note jview and crimson can't both be done: write your own batch file
if '%1' == '-jview' goto setjv
if '%1' == '-JVIEW' goto setjv
-@REM Note jview and crimson can't both be done: write your own batch file
+
@REM -crimson: Use crimson.jar instead of xerces.jar
@REM shift to get rid of -crimson arg; just pass rest of args along
-@REM you'll probably want to change JAVA_OPTS with system properties for crimson too!
+set SAVED_JAVA_OPTS=%JAVA_OPTS%
+if '%1' == '-crimson' set JAVA_OPTS=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.DocumentBuilderFactoryImpl -Dorg.xml.sax.driver=org.apache.crimson.jaxp.SAXParserFactoryImpl %JAVA_OPTS%
if '%1' == '-crimson' set PARSER_JAR=crimson.jar
if '%1' == '-crimson' shift
@@ -53,13 +58,15 @@
@REM If PARSER_JAR blank, default to xerces
if "%PARSER_JAR%" == "" set PARSER_JAR=xerces.jar
-@REM If JARDIR blank, use the existing classpath first, so we pick up
-@REM any classes the user may have specified before default ones
-@REM Note that this could cause conflicts if the user only specified
-@REM some of the needed jars in the classpath, and then we add separate
-@REM copies of them later on.
-if "%JARDIR%" == "" echo runtest.bat must have JARDIR set!
-if "%JARDIR%" == "" goto done
+@REM If JARDIR is blank, assume default Xalan-J 2.x locations
+@REM Note that this will probably fail miserably if you're trying
+@REM to test Xalan-J 1.x: in that case, you must set JARDIR
+@REM Note also that this assumes that crimson.jar is co-located
+@REM with the xerces.jar checked into Xalan-J 2.x
+@REM Note also that this assumes that js.jar is in the directory
+@REM above xml-xalan, for lack of a better place
+if "%JARDIR%" == "" echo NOTE! JARDIR is not set, defaulting to Xalan-J 2.x!
+if "%JARDIR%" == "" set TEST_CP=build\testxsl.jar;..\java\bin\%PARSER_JAR%;..\java\build\xalan.jar;..\java\bin\bsf.jar;..\..\js.jar;%CLASSPATH%
@REM If JARDIR set, put those references first then default classpath
if not "%JARDIR%" == "" set TEST_CP=%JARDIR%\testxsl.jar;%JARDIR%\%PARSER_JAR%;%JARDIR%\xalan.jar;%JARDIR%\bsf.jar;%JARDIR%\js.jar;%CLASSPATH%
@@ -67,16 +74,14 @@
@REM Wrappers use EXTRA_CP to add items to our classpath; if set, append
if not "%EXTRA_CP%" == "" set TEST_CP=%TEST_CP%;%EXTRA_CP%
-@REM Wrappers use END_PKG to switch around the end of the packagename; if not set, default it
+@REM Wrappers use END_PKG to switch around the end of the
+@REM packagename; if not set, default it to most common package
if '%END_PKG%' == '' set END_PKG=xsl
-
-@REM If exactly one option passed, assume we run: %JAVA_EXE% TestName -load TestName.prop
-@REM this is a convenience for most tests, if they have a same-named prop file with them
-if "%2" == "" echo "%JAVA_EXE%" %JAVA_OPTS% %CMDCP% "%TEST_CP%" org.apache.qetest.%END_PKG%.%1 -load %1.prop
-if "%2" == "" "%JAVA_EXE%" %JAVA_OPTS% %CMDCP% "%TEST_CP%" org.apache.qetest.%END_PKG%.%1 -load %1.prop
-if "%2" == "" goto done
-@REM Otherwise, assume it's a bare classname to run with extra args
+@REM Assume it's a bare classname to run with extra args
+@REM Note we hackishly force in .END_PKG. here, which is not a great
+@REM idea - we should really allow users to pass a single arg
+@REM that's the lastpkg.ClassName
echo "%JAVA_EXE%" %JAVA_OPTS% %CMDCP% "%TEST_CP%" org.apache.qetest.%END_PKG%.%1 %2 %3 %4 %5 %6 %7 %8 %9
"%JAVA_EXE%" %JAVA_OPTS% %CMDCP% "%TEST_CP%" org.apache.qetest.%END_PKG%.%1 %2 %3 %4 %5 %6 %7 %8 %9
@@ -86,5 +91,6 @@
set JAVA_EXE=
set CMDCP=
set PARSER_JAR=
+set JAVA_OPTS=%SAVED_JAVA_OPTS%
if '%END_PKG%' == 'xsl' set END_PKG=
:end
1.2 +8 -2 xml-xalan/test/traxapitest.bat
Index: traxapitest.bat
===================================================================
RCS file: /home/cvs/xml-xalan/test/traxapitest.bat,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- traxapitest.bat 2000/11/01 23:25:29 1.1
+++ traxapitest.bat 2000/12/19 16:49:41 1.2
@@ -2,10 +2,16 @@
@goto start
@REM Name: traxapitest.bat
@REM Author: Shane_Curcuru@lotus.com
+@REM Simple wrapper for runtest.bat to run various Xalan-J 2.x
+@REM API tests for javax.xml.transform or 'TRAX'
:start
+@REM Pass along -crimson if it's the first arg
+if '%1' == '-crimson' set DASHCRIMSON=-crimson
+if '%1' == '-crimson' shift
set END_PKG=trax
-@echo Wrapper using 'trax.%1 -load APITest.properties'
-call runtest.bat %1 -load APITest.properties %2 %3 %4 %5 %6 %7 %8 %9
+@echo Wrapper using '%DASHCRIMSON% trax.%1 -load APITest.properties'
+call runtest.bat %DASHCRIMSON% %1 -load APITest.properties %2 %3 %4 %5 %6 %7 %8 %9
set END_PKG=
+set DASHCRIMSON=
:end