mcnamara    2004/11/09 10:49:57

  Modified:    test     test.properties build.xml
  Log:
  Add support for testing alternative BSF implementations when testing Xalan 
Java extensions.
  
  Calling the "extensions" target will test Xalan Java extensions using the 
-new- default implementation,
  Jarkata BSF.  Calling "extensions-with-ibm-bsf" will test Xalan Java 
extensions using the IBM BSF
  implementation which has been used in previous releases.
  
  Revision  Changes    Path
  1.112     +6 -0      xml-xalan/test/test.properties
  
  Index: test.properties
  ===================================================================
  RCS file: /home/cvs/xml-xalan/test/test.properties,v
  retrieving revision 1.111
  retrieving revision 1.112
  diff -u -r1.111 -r1.112
  --- test.properties   1 Oct 2004 22:02:54 -0000       1.111
  +++ test.properties   9 Nov 2004 18:49:56 -0000       1.112
  @@ -262,6 +262,12 @@
   extensions.logFile=results-extensions/results.xml
   extensions.testlet=org.apache.qetest.xsl.ExtensionTestlet
   
  +extensions.with-ibm-bsf.inputDir=tests/extensions
  +extensions.with-ibm-bsf.goldDir=tests/extensions-gold
  +extensions.with-ibm-bsf.outputDir=results-extensions-with-ibm-bsf/
  +extensions.with-ibm-bsf.logFile=results-extensions-with-ibm-bsf/results.xml
  +extensions.with-ibm-bsf.testlet=org.apache.qetest.xsl.ExtensionTestlet
  +
   #---- Special: used in conf.xsltc target temporarily ----
   conf.xsltc.inputDir=tests/conf
   conf.xsltc.goldDir=tests/conf-gold
  
  
  
  1.70      +57 -15    xml-xalan/test/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-xalan/test/build.xml,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- build.xml 15 Oct 2004 03:08:36 -0000      1.69
  +++ build.xml 9 Nov 2004 18:49:56 -0000       1.70
  @@ -97,13 +97,21 @@
       <property name="xml-apis.jar" value="${xalan.bin.dir}/xml-apis.jar"/>
       <property name="parserjar" value="${xalan.bin.dir}/xercesImpl.jar"/>
       <property name="bcel.jar" value="${xalan.bin.dir}/BCEL.jar"/>
  -    <property name="bsf.jar" value="${xalan.bin.dir}/bsf.jar"/>
  +
       <!-- JTidy is used by the XSLTC comparator -->
       <property name="jtidy.jar" value="${xalan.bin.dir}/Tidy.jar"/>
  -    <!-- The js.jar is for Javascript extensions tests; you must 
  -         get this .jar yourself.  Feel free to reset the location.
  -    -->
  +    
  +    <!-- The js.jar is for Javascript extensions tests; you must get this 
.jar yourself.  
  +         Feel free to reset the location. -->
       <property name="js.jar" value="../../js.jar"/>
  +    
  +    <!-- The Bean Scripting Framework is required for extensions written in 
languages 
  +         other than Java. Xalan Java will attempt to use the Jakarta BSF 
implementation
  +         by default (see the "extensions" target).  
  +         bsf.jar is no longer distributed with Xalan Java; you must get this 
.jar yourself.  
  +         For more information, see the Apache Jakarta project, 
http://jakarta.apache.org/
  +         Feel free to reset the location.  -->    
  +    <property name="bsf.jar" value="../../bsf.jar"/>
   
       <!-- Documentation-specific files and locations -->
       <property name="stylebook.jar" 
value="${xalan.bin.dir}/stylebook-1.0-b3_xalan-2.jar"/>
  @@ -114,7 +122,6 @@
       <property name="test.xdocs.style" value="${test.xdocs.dir}/style"/>
       <property name="doc.generator" value="org.apache.stylebook.StyleBook"/>
       <path id="test.docs.class.path">
  -        <pathelement location="${bsf.jar}" />
           <pathelement location="${stylebook.jar}" />
           <pathelement location="${doclet.jar}" />
           <pathelement location="${jtidy.jar}" />
  @@ -266,6 +273,18 @@
           </xalantest>
       </target>
   
  +    <target name="run.xalan-extension-test" >
  +        <xalantest test="${testClass}"
  +            testType="${testType}"
  +            classpathref="${xalantest.classpathref}"
  +            bootclasspathref="boot.class.path"
  +            fork="${fork-tests}"
  +            failonerror="${fail-on-error}" >
  +            <sysproperty key="org.apache.xalan.extensions.bsf.BSFManager"
  +                         value="${sysprop.BSFManager}" />
  +        </xalantest>
  +    </target>
  +
       <!-- ================================================================== 
-->
       <!-- Initialize: setup for compiling, doc building, running tests       
-->
       <!-- ================================================================== 
-->
  @@ -503,22 +522,45 @@
       </target>
   
       <!-- ================================================================== 
-->
  -    <!-- Run tests: various extensions tests using driver                    
-->
  +    <!-- Run tests: various extensions tests                                
-->
       <!-- ================================================================== 
-->
  -    <target name="extensions" description="Run various extensions tests 
using driver"
  -        depends="init.test">
  -        <echo message="Executing Xalan various extensions tests using 
driver" />
  +    <target name="extensions" 
  +            description="Run extensions tests.  
  +                         Non-Java extensions will use the Jakarta BSF 
implementation."
  +            depends="init.test">
  +        <echo message="Executing Xalan extensions tests. Non-Java extensions 
will use the Jakarta BSF implementation." />
           <!-- Set the default conformance test driver, user may 
                override; note test.properties:extensions.testlet= 
           -->
           <property name="testClass" 
value="org.apache.qetest.xsl.StylesheetTestletDriver" />
           <property name="testType" value="extensions." />
  -        <antcall target="run.xalantest">
  -            <param name="xalantest.classpathref"
  -                   value="extensions.class.path" />
  +        <antcall target="run.xalan-extension-test">
  +            <param name="xalantest.classpathref" 
value="extensions.class.path" />
  +            <param name="sysprop.BSFManager" 
value="org.apache.bsf.BSFManager" />
           </antcall>
           <property name="scan.outputDir" value="${extensions.outputDir}"/>
  -        <antcall target="scan"/>            
  +        <antcall target="scan"/>
  +        <echo message="If you got ClassNotFound, did you 'build 
extensions.classes' first?" />
  +    </target>
  +
  +    <target name="extensions-with-ibm-bsf" 
  +            description="Run extensions tests. 
  +                         Non-Java extensions will use the IBM BSF 
implementation."
  +            depends="init.test">
  +        <echo message="Executing Xalan extensions tests.  Non-Java 
extensions will use the IBM BSF implementation." />
  +        <!-- Set the default conformance test driver, user may 
  +             override; note test.properties:extensions.testlet= 
  +        -->
  +        <property name="testClass" 
value="org.apache.qetest.xsl.StylesheetTestletDriver" />
  +        <property name="testType" value="extensions.with-ibm-bsf." />
  +        <property name="scan.outputDir" 
value="${extensions.with-ibm-bsf.outputDir}"/>
  +
  +        <antcall target="run.xalan-extension-test">
  +            <param name="extensions.outputDir" 
value="${extensions.with-ibm-bsf.outputDir}" />
  +            <param name="xalantest.classpathref" 
value="extensions.class.path" />
  +            <param name="sysprop.BSFManager" value="com.ibm.bsf.BSFManager" 
/>
  +        </antcall>
  +        <antcall target="scan"/>
           <echo message="If you got ClassNotFound, did you 'build 
extensions.classes' first?" />
       </target>
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to