harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r591289 - /harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.run.xml
Date Fri, 02 Nov 2007 10:10:39 GMT
Author: varlax
Date: Fri Nov  2 03:10:38 2007
New Revision: 591289

URL: http://svn.apache.org/viewvc?rev=591289&view=rev
Log:
Minor enhancement to regtesting framework: do not require custom launcher for JUnit test with
JNI usage.

Modified:
    harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.run.xml

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.run.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.run.xml?rev=591289&r1=591288&r2=591289&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.run.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.run.xml Fri Nov  2 03:10:38 2007
@@ -41,7 +41,7 @@
              to specify particular tests to execute -->
         <property name="test.case" value="H*"/>
 
-        <for param="reg.test.2launch.src.dir">
+        <for param="reg.test.2launch">
             <!-- Go through directories containing regression tests -->
             <dirset dir="${reg.test.src}" includes="${test.case}">
                 <excludesfile name="${exclude.list}" if="exclude.list"/>
@@ -50,23 +50,27 @@
                 <!-- Set up the property pointing to the natives path -->
                 <var name="reg.test.2launch.native.path" unset="true"/>
                 <pathconvert property="reg.test.2launch.native.path">
-                    <path path="@{reg.test.2launch.src.dir}"/>
+                    <path path="@{reg.test.2launch}"/>
                     <map from="${reg.test.src}" to="${reg.test.native.path}"/>
                 </pathconvert>
                 <if>
-                    <available file="@{reg.test.2launch.src.dir}/run.test.xml"/>
+                    <available file="@{reg.test.2launch}/run.test.xml"/>
                     <then>
                         <!-- Launch the tests with a custom launchers 
                                                 placed near the tests -->
-                        <ant antfile="@{reg.test.2launch.src.dir}/run.test.xml" 
+                        <ant antfile="@{reg.test.2launch}/run.test.xml" 
                             target="run-test" 
                             inheritAll="true" inheritRefs="true"/>
                     </then>
                     <else>
-                        <!-- Execution of unit tests checking for regression -->
+                        <!-- Run standard JUnit tests -->
+                        <condition property="@{reg.test.2launch}.extra.arg" else=""
+                            value="-Djava.library.path=${reg.test.2launch.native.path}">
+                            <available file="${reg.test.2launch.native.path}"/>
+                        </condition>
                         <for param="reg.unit.test.src">
                             <!-- Go through unit tests in the directory -->
-                            <fileset dir="@{reg.test.2launch.src.dir}">
+                            <fileset dir="@{reg.test.2launch}">
                                 <include name="*Test.java"/>
                                 <include name="*Test.j"/>
                             </fileset>
@@ -76,7 +80,8 @@
                                   input="@{reg.unit.test.src}"
                                   regexp=".*H(\d\d*)[/\\](..*)\.j.*" 
                                   replace="${reg.test.package}.h\1.\2"/>
-                                <run-junit-test test="${unit.test.class}"/>
+                                <run-junit-test test="${unit.test.class}"
+                                    vmarg="${@{reg.test.2launch}.extra.arg}"/>
                             </sequential>
                         </for>
                     </else>



Mime
View raw message