You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Simon Willnauer <si...@googlemail.com> on 2012/06/21 13:08:37 UTC

control test temp dir used in common-build.xml

hey folks,

I'd like to control the tempDir used to execute junit tests from the
outside. Any objections to the patch below?


diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index 47d5013..2c8f144 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -95,6 +95,7 @@
   <property name="tests.verbose" value="false"/>
   <property name="tests.infostream" value="${tests.verbose}"/>
   <property name="tests.heapsize" value="512M"/>
+       <property name="tests.tempDir" value="${build.dir}/test"/>

   <!-- Override these in your local properties to your desire. -->
   <!-- Show simple class names (no package) in test suites. -->
@@ -705,7 +706,7 @@
     <attribute name="junit.output.dir" default="${junit.output.dir}"/>
     <attribute name="junit.classpath" default="junit.classpath"/>
     <attribute name="testsDir" default="${build.dir}/classes/test"/>
-    <attribute name="tempDir" default="${build.dir}/test"/>
+    <attribute name="tempDir" default="${tests.tempDir}"/>
     <attribute name="threadNum" default="1"/>
     <attribute name="tests.nightly" default="${tests.nightly}"/>
     <attribute name="tests.weekly" default="${tests.weekly}"/>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: control test temp dir used in common-build.xml

Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
> ${tempDir}/S0/someindex
> I am running multiple instance of a test on the same checkout and that
> somethimes fails there for some reason I am controlling java.io.tmpDir too

Yep, this will be a problem if you're running two parallel "ant test"
thingies. All the other intermediate junit4 files are prefixed with a
pretty unique timestamp but forked jvm subfolders are not. I was
debating whether they should be a longer while and came to a
conclusion that shorter paths will be easier to digest (and
interpret).

D.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: control test temp dir used in common-build.xml

Posted by Simon Willnauer <si...@googlemail.com>.
On Thu, Jun 21, 2012 at 1:12 PM, Dawid Weiss
<da...@cs.put.poznan.pl> wrote:
> I don't mind but why do we need a specific property (other than Java's
> default temporary file location property)? Perhaps it'd be better to
> just use that?

tests create directories in that one currently something like
${tempDir}/S0/someindex
I am running multiple instance of a test on the same checkout and that
somethimes fails there for some reason
I am controlling java.io.tmpDir too

simon
>
> Dawid
>
> On Thu, Jun 21, 2012 at 1:08 PM, Simon Willnauer
> <si...@googlemail.com> wrote:
>> hey folks,
>>
>> I'd like to control the tempDir used to execute junit tests from the
>> outside. Any objections to the patch below?
>>
>>
>> diff --git a/lucene/common-build.xml b/lucene/common-build.xml
>> index 47d5013..2c8f144 100644
>> --- a/lucene/common-build.xml
>> +++ b/lucene/common-build.xml
>> @@ -95,6 +95,7 @@
>>   <property name="tests.verbose" value="false"/>
>>   <property name="tests.infostream" value="${tests.verbose}"/>
>>   <property name="tests.heapsize" value="512M"/>
>> +       <property name="tests.tempDir" value="${build.dir}/test"/>
>>
>>   <!-- Override these in your local properties to your desire. -->
>>   <!-- Show simple class names (no package) in test suites. -->
>> @@ -705,7 +706,7 @@
>>     <attribute name="junit.output.dir" default="${junit.output.dir}"/>
>>     <attribute name="junit.classpath" default="junit.classpath"/>
>>     <attribute name="testsDir" default="${build.dir}/classes/test"/>
>> -    <attribute name="tempDir" default="${build.dir}/test"/>
>> +    <attribute name="tempDir" default="${tests.tempDir}"/>
>>     <attribute name="threadNum" default="1"/>
>>     <attribute name="tests.nightly" default="${tests.nightly}"/>
>>     <attribute name="tests.weekly" default="${tests.weekly}"/>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: control test temp dir used in common-build.xml

Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
I don't mind but why do we need a specific property (other than Java's
default temporary file location property)? Perhaps it'd be better to
just use that?

Dawid

On Thu, Jun 21, 2012 at 1:08 PM, Simon Willnauer
<si...@googlemail.com> wrote:
> hey folks,
>
> I'd like to control the tempDir used to execute junit tests from the
> outside. Any objections to the patch below?
>
>
> diff --git a/lucene/common-build.xml b/lucene/common-build.xml
> index 47d5013..2c8f144 100644
> --- a/lucene/common-build.xml
> +++ b/lucene/common-build.xml
> @@ -95,6 +95,7 @@
>   <property name="tests.verbose" value="false"/>
>   <property name="tests.infostream" value="${tests.verbose}"/>
>   <property name="tests.heapsize" value="512M"/>
> +       <property name="tests.tempDir" value="${build.dir}/test"/>
>
>   <!-- Override these in your local properties to your desire. -->
>   <!-- Show simple class names (no package) in test suites. -->
> @@ -705,7 +706,7 @@
>     <attribute name="junit.output.dir" default="${junit.output.dir}"/>
>     <attribute name="junit.classpath" default="junit.classpath"/>
>     <attribute name="testsDir" default="${build.dir}/classes/test"/>
> -    <attribute name="tempDir" default="${build.dir}/test"/>
> +    <attribute name="tempDir" default="${tests.tempDir}"/>
>     <attribute name="threadNum" default="1"/>
>     <attribute name="tests.nightly" default="${tests.nightly}"/>
>     <attribute name="tests.weekly" default="${tests.weekly}"/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org