You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefan Bodewig <bo...@apache.org> on 2012/03/03 06:15:00 UTC

Java5 move and Jenkins

Hi all,

before we can start using Java5 stuff in trunk, we need to disable the
JDK 1.4 build in Jenkins and replace it with a Java5 build (if there
isn't one already).  It may be worthwhile to have a 1.4 build for the
1.8.x branch if we ever intend to create 1.8.4, but this can wait.

Can anybody with proper Jenkins karma for Ant please change the config?

Thanks

        Stefan

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


Re: Java5 move and Jenkins

Posted by Jesse Glick <je...@oracle.com>.
On 03/09/2012 04:16 AM, Nicolas Lalevée wrote:
> As a quick fix I guess we can add in the command line launched by Jenkins a -Djava.io.tmpdir=$WORKSPACE/tmpdir

I guess that would work for the AntUnit tests, so try that. For JUnit tests it would probably have no effect since these run in a forked JVM by default.


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


Re: Java5 move and Jenkins

Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le 18 mars 2012 à 07:40, Stefan Bodewig a écrit :

> On 2012-03-16, Nicolas Lalevée wrote:
> 
>> Le 16 mars 2012 à 06:02, Stefan Bodewig a écrit :
> 
>>> On 2012-03-09, Nicolas Lalevée wrote:
> 
>>>> As a quick fix I guess we can add in the command line launched by
>>>> Jenkins a -Djava.io.tmpdir=$WORKSPACE/tmpdir
> 
>>> Have you changed the configuration to contain that?  If so, it doesn't
>>> look to have had any effect.
> 
>> I forgot about that. Done now.
> 
>> I am not sure yet if it is correctly setup since there are some spaces
>> in the path, will see after the current build.
> 
> I think I have made all tests indendent of java.io.tmpdir now and the
> setting seems to break the Ubuntu builds.  It would be good if you could
> remove that setting again.

removed.
Most of the Jenkins slaves are "offline", we'll see the result when admins have time to bring them up again.

Nicolas


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


Re: Java5 move and Jenkins

Posted by Stefan Bodewig <bo...@apache.org>.
On 2012-03-16, Nicolas Lalevée wrote:

> Le 16 mars 2012 à 06:02, Stefan Bodewig a écrit :

>> On 2012-03-09, Nicolas Lalevée wrote:

>>> As a quick fix I guess we can add in the command line launched by
>>> Jenkins a -Djava.io.tmpdir=$WORKSPACE/tmpdir

>> Have you changed the configuration to contain that?  If so, it doesn't
>> look to have had any effect.

> I forgot about that. Done now.

> I am not sure yet if it is correctly setup since there are some spaces
> in the path, will see after the current build.

I think I have made all tests indendent of java.io.tmpdir now and the
setting seems to break the Ubuntu builds.  It would be good if you could
remove that setting again.

Stefan

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


Re: Java5 move and Jenkins

Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le 16 mars 2012 à 06:02, Stefan Bodewig a écrit :

> On 2012-03-09, Nicolas Lalevée wrote:
> 
>> As a quick fix I guess we can add in the command line launched by
>> Jenkins a -Djava.io.tmpdir=$WORKSPACE/tmpdir
> 
> Have you changed the configuration to contain that?  If so, it doesn't
> look to have had any effect.

I forgot about that. Done now.
I am not sure yet if it is correctly setup since there are some spaces in the path, will see after the current build.

Nicolas


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


Re: Java5 move and Jenkins

Posted by Stefan Bodewig <bo...@apache.org>.
On 2012-03-09, Nicolas Lalevée wrote:

> As a quick fix I guess we can add in the command line launched by
> Jenkins a -Djava.io.tmpdir=$WORKSPACE/tmpdir

Have you changed the configuration to contain that?  If so, it doesn't
look to have had any effect.

Stefan

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


Re: Java5 move and Jenkins

Posted by Nicolas Lalevée <ni...@hibnet.org>.
As a quick fix I guess we can add in the command line launched by Jenkins a -Djava.io.tmpdir=$WORKSPACE/tmpdir

Should I do that or we want to get rid of java.io.tmpdir ?

Nicolas

Le 9 mars 2012 à 05:57, Stefan Bodewig a écrit :

> On 2012-03-09, Jesse Glick wrote:
> 
>> On 03/08/2012 12:04 AM, Stefan Bodewig wrote:
>>> do we have to do anything special to provide the Jenkins build with a
>>> ${java.to.tmpdir} that it actually is allowed to write to?
> 
>> Using ${java.io.tmpdir} from tests is a bit dangerous anyway; the
>> files may rarely or never get cleaned up,
> 
> the tearDown target should take care of that, unless anything kills Ant,
> that is.
> 
>> you need to consider possible race conditions between different jobs
>> running on the same node, etc.
> 
> True.  I guess we never envisoined that.
> 
>> Can the tests be made to use a tempdir inside the ${basedir}
>> somewhere?
> 
> Several JUnit tests use java.io.tempdir (need to grep through it), most
> if not all AntUnit tests import a common file that defines the setUp and
> tearDown targets and properties input and output which the tests use.
> If you change that file (src/tests/antunit/antunit-base.xml) it should
> take effect for a whole bunch of AntUnit tests immediately.
> 
>> By comparison, most NetBeans unit tests use a utility
>> NbTestCase.getWorkDir() [1] which takes a static root
>> (e.g. ${basedir}/build/test/unit/work/) and appends a suffix based on
>> the test suite & case names. For tests needing File access this is
>> very convenient.
> 
> That would work for our JUnit tests, for AntUnit we'd have the build
> file name (the one importing the base file) but not the executing
> target.
> 
> Stefan
> 
>> [1] https://hg.netbeans.org/core-main/raw-file/default/nbjunit/src/org/netbeans/junit/NbTestCase.java
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
> 


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


Re: Java5 move and Jenkins

Posted by Stefan Bodewig <bo...@apache.org>.
On 2012-03-09, Jesse Glick wrote:

> On 03/08/2012 12:04 AM, Stefan Bodewig wrote:
>> do we have to do anything special to provide the Jenkins build with a
>> ${java.to.tmpdir} that it actually is allowed to write to?

> Using ${java.io.tmpdir} from tests is a bit dangerous anyway; the
> files may rarely or never get cleaned up,

the tearDown target should take care of that, unless anything kills Ant,
that is.

> you need to consider possible race conditions between different jobs
> running on the same node, etc.

True.  I guess we never envisoined that.

> Can the tests be made to use a tempdir inside the ${basedir}
> somewhere?

Several JUnit tests use java.io.tempdir (need to grep through it), most
if not all AntUnit tests import a common file that defines the setUp and
tearDown targets and properties input and output which the tests use.
If you change that file (src/tests/antunit/antunit-base.xml) it should
take effect for a whole bunch of AntUnit tests immediately.

> By comparison, most NetBeans unit tests use a utility
> NbTestCase.getWorkDir() [1] which takes a static root
> (e.g. ${basedir}/build/test/unit/work/) and appends a suffix based on
> the test suite & case names. For tests needing File access this is
> very convenient.

That would work for our JUnit tests, for AntUnit we'd have the build
file name (the one importing the base file) but not the executing
target.

Stefan

> [1] https://hg.netbeans.org/core-main/raw-file/default/nbjunit/src/org/netbeans/junit/NbTestCase.java

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


Re: Java5 move and Jenkins

Posted by Jesse Glick <je...@oracle.com>.
On 03/08/2012 12:04 AM, Stefan Bodewig wrote:
> do we have to do anything special to provide the Jenkins build with a
> ${java.to.tmpdir} that it actually is allowed to write to?

Using ${java.io.tmpdir} from tests is a bit dangerous anyway; the files may rarely or never get cleaned up, you need to consider possible race conditions between 
different jobs running on the same node, etc. Can the tests be made to use a tempdir inside the ${basedir} somewhere?

By comparison, most NetBeans unit tests use a utility NbTestCase.getWorkDir() [1] which takes a static root (e.g. ${basedir}/build/test/unit/work/) and appends a suffix 
based on the test suite & case names. For tests needing File access this is very convenient.


[1] https://hg.netbeans.org/core-main/raw-file/default/nbjunit/src/org/netbeans/junit/NbTestCase.java


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


Re: Java5 move and Jenkins

Posted by Stefan Bodewig <bo...@apache.org>.
On 2012-03-07, Jesse Glick wrote:

> On 03/06/2012 12:53 PM, Nicolas Lalevée wrote:
>> [AntUnit] results were not aggregated by Jenkins. I have fixed it.

> Confirmed; #462 shows tons of AntUnit failures. Whoever wrote these
> tests and is still around, consider reviewing them.

I had a quick look, all those tests passed when I tried them on Windows
the last time.  I won't find time to research this before the weekend.

What many tests seem to have in common is that Ant cannot create
temporary files because of "The system cannot find the path specified"
- do we have to do anything special to provide the Jenkins build with a
${java.to.tmpdir} that it actually is allowed to write to?

Stefan

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


Re: Java5 move and Jenkins

Posted by Jesse Glick <je...@oracle.com>.
On 03/06/2012 06:21 PM, Jesse Glick wrote:
> #462 shows tons of AntUnit failures

BTW I disabled email notifications as it looks like we are a long way from fixing all of these tests.



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


Re: Java5 move and Jenkins

Posted by Jesse Glick <je...@oracle.com>.
On 03/06/2012 12:53 PM, Nicolas Lalevée wrote:
> [AntUnit] results were not aggregated by Jenkins. I have fixed it.

Confirmed; #462 shows tons of AntUnit failures. Whoever wrote these tests and is still around, consider reviewing them. (I do not think it is safe to do much of anything 
in trunk until tests are cleaned up.)


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


Re: Java5 move and Jenkins

Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le 6 mars 2012 à 15:38, Jesse Glick a écrit :

> On 03/05/2012 01:33 PM, Jesse Glick wrote:
>> I am looking into some of the test failures.
> 
> I think I have fixed most of the failures, though there are still some things that seem to fail at random, especially on Windows.

great job !

> Two points of confusion:
> 
> 1. All the JDK 1.5 and 1.6 history - including test results - seems to have been deleted, though JDK 1.7 history remains. Anyone know why? Perhaps a bug in the way the build archiver logic works in matrix builds, after a first stable build (#461)? Also the workspace is missing. Note that #461's console reports all six configs being run and ending with SUCCESS.

This is indeed weird, probably a bug...

> 2. I do not see any test results from AntUnit - do these get run but just not reported?

Yep, they were not aggregated by Jenkins. I have fixed it.

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


Re: Java5 move and Jenkins

Posted by Jesse Glick <je...@oracle.com>.
On 03/05/2012 01:33 PM, Jesse Glick wrote:
> I am looking into some of the test failures.

I think I have fixed most of the failures, though there are still some things that seem to fail at random, especially on Windows.

Two points of confusion:

1. All the JDK 1.5 and 1.6 history - including test results - seems to have been deleted, though JDK 1.7 history remains. Anyone know why? Perhaps a bug in the way the 
build archiver logic works in matrix builds, after a first stable build (#461)? Also the workspace is missing. Note that #461's console reports all six configs being run 
and ending with SUCCESS.

2. I do not see any test results from AntUnit - do these get run but just not reported?


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


Re: Java5 move and Jenkins

Posted by Jesse Glick <je...@oracle.com>.
On 03/03/2012 12:51 PM, Nicolas Lalevée wrote:
> So we would have Ant_Nightly which builds the distrib of Ant and gather findbugs warnings, java warnings and TODO/FIXMEs, and we would have the tests run by Ant-Build-Matrix.

Looks like an improvement - thanks for setting this up. I am looking into some of the test failures.


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


Re: Java5 move and Jenkins

Posted by Stefan Bodewig <bo...@apache.org>.
On 2012-03-03, Nicolas Lalevée wrote:

> Le 3 mars 2012 à 06:15, Stefan Bodewig a écrit :

>> Hi all,

>> before we can start using Java5 stuff in trunk, we need to disable the
>> JDK 1.4 build in Jenkins and replace it with a Java5 build (if there
>> isn't one already).  It may be worthwhile to have a 1.4 build for the
>> 1.8.x branch if we ever intend to create 1.8.4, but this can wait.

>> Can anybody with proper Jenkins karma for Ant please change the config?

> done:
> https://builds.apache.org/view/A-F/view/Ant/job/Ant_JDK_1.5/

> And for the build matrix, I removed the build for the JDK 1.4 and I
> have added the JDK 1.7:
> https://builds.apache.org/view/A-F/view/Ant/job/Ant-Build-Matrix/

> It seems the Ant_JDK_1.5 and Ant_JDK_1.5_Test jobs are overlapping
> with what the Ant-Build-Matrix job is doing. I have just triggered
> Ant-Build-Matrix. If it doesn't fail too badly, I'll delete the
> Ant_JDK_1.5* jobs. So we would have Ant_Nightly which builds the
> distrib of Ant and gather findbugs warnings, java warnings and
> TODO/FIXMEs, and we would have the tests run by Ant-Build-Matrix.

Thanks!

        Stefan

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


Re: Java5 move and Jenkins

Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le 3 mars 2012 à 06:15, Stefan Bodewig a écrit :

> Hi all,
> 
> before we can start using Java5 stuff in trunk, we need to disable the
> JDK 1.4 build in Jenkins and replace it with a Java5 build (if there
> isn't one already).  It may be worthwhile to have a 1.4 build for the
> 1.8.x branch if we ever intend to create 1.8.4, but this can wait.
> 
> Can anybody with proper Jenkins karma for Ant please change the config?

done:
https://builds.apache.org/view/A-F/view/Ant/job/Ant_JDK_1.5/

And for the build matrix, I removed the build for the JDK 1.4 and I have added the JDK 1.7:
https://builds.apache.org/view/A-F/view/Ant/job/Ant-Build-Matrix/

It seems the Ant_JDK_1.5 and Ant_JDK_1.5_Test jobs are overlapping with what the Ant-Build-Matrix job is doing. I have just triggered Ant-Build-Matrix. If it doesn't fail too badly, I'll delete the Ant_JDK_1.5* jobs. So we would have Ant_Nightly which builds the distrib of Ant and gather findbugs warnings, java warnings and TODO/FIXMEs, and we would have the tests run by Ant-Build-Matrix.

Nicolas


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