harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r932764 - /harmony/enhanced/java/trunk/classlib/make/properties.xml
Date Sat, 10 Apr 2010 17:01:35 GMT
Author: hindessm
Date: Sat Apr 10 17:01:34 2010
New Revision: 932764

URL: http://svn.apache.org/viewvc?rev=932764&view=rev
Log:
Use specific temp directories to avoid leaving mess in /tmp or ~user.
This is just applying a change made to run-hdk-test r830526/r831084
to the second macrodef.  This should fix a number of odd test failures
like the ones from FileHandlerTest.java if you have a file called /tmp/log.

Modified:
    harmony/enhanced/java/trunk/classlib/make/properties.xml

Modified: harmony/enhanced/java/trunk/classlib/make/properties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/make/properties.xml?rev=932764&r1=932763&r2=932764&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/make/properties.xml (original)
+++ harmony/enhanced/java/trunk/classlib/make/properties.xml Sat Apr 10 17:01:34 2010
@@ -842,9 +842,22 @@ Alternatively, you can switch to another
             <property name="test.module.dir" value="${target.dir}/@{module}" />
             <property name="test.excludes.dir" value="${test.module.dir}/excludes" />
             <property name="test.resources.dir" value="${test.module.dir}/resources" />
-            <property name="test.exclude.file" value="${work.dir}/@{module}/test.exclude"
/>
+            <property name="module.work.dir" location="${work.dir}/@{module}" />
+            <property name="test.exclude.file" value="${module.work.dir}/test.exclude"
/>
+
+            <property name="module.temp.dir"
+                      location="${work.dir}/@{module}/temp" />
+            <property name="junit.tempdir"
+                      location="${module.temp.dir}/ant" />
+            <property name="junit.java.io.tmpdir"
+                      location="${module.temp.dir}/tmpdir" />
+            <property name="junit.user.home"
+                      location="${module.temp.dir}/user" />
             
             <mkdir dir="${tests.output}" /> 
+            <mkdir dir="${junit.tempdir}" />
+            <mkdir dir="${junit.java.io.tmpdir}" />
+            <mkdir dir="${junit.user.home}" />
 
             <prepare-exclude-list moduleName="@{module}" dir="${test.excludes.dir}" result="${test.exclude.file}"
/>
             <junit fork="yes" 
@@ -855,9 +868,12 @@ Alternatively, you can switch to another
                    failureproperty="test.failures" 
                    showoutput="on" 
                    dir="${work.dir}/@{module}" 
-                   tempdir="${work.dir}"
+                   tempdir="${junit.tempdir}"
                    jvm="${test.jre.home}/bin/java">
 
+                <jvmarg line="-Djava.io.tmpdir=${junit.java.io.tmpdir}" />
+                <jvmarg line="-Duser.home=${junit.user.home}" />
+
                 <classpath>
                     <fileset dir="${target.dir}">
                         <include name="*.jar" />
@@ -893,6 +909,9 @@ Alternatively, you can switch to another
                 <formatter type="xml" />
             </junit>
 
+            <delete dir="${module.temp.dir}"
+                    includeemptydirs="true" failonerror="false" />
+
             <antcall target="touch-failures-file">
                 <param name="module" value="@{module}" />
             </antcall>



Mime
View raw message