You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jesse Glick <je...@oracle.com> on 2012/02/23 22:09:13 UTC

AntUnit test failures

I get a bunch of test failures in trunk using

$ ant -lib lib/optional/ant-antunit-1.2.jar antunit-tests

under JDK 7u3, Ubuntu. Are these tests normally expected to pass?


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


Re: AntUnit test failures

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

> ...though it hangs in taskdefs/exec/apply-test.xml:

I've never seen it hang but some of the exec tests fail for me regularly
as well (as they occasionaly do on Gump).

Stefan

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


Re: AntUnit test failures

Posted by Jesse Glick <je...@oracle.com>.
...though it hangs in taskdefs/exec/apply-test.xml:

apply-test.antunit:
Build File: .../src/tests/antunit/taskdefs/exec/apply-test.xml
...
"main" prio=10 tid=0x091c7c00 nid=0x24e0 in Object.wait() [0xf6947000]
    java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0xdc91bc58> (a java.lang.UNIXProcess)
	at java.lang.Object.wait(Object.java:503)
	at java.lang.UNIXProcess.waitFor(UNIXProcess.java:210)
	- locked <0xdc91bc58> (a java.lang.UNIXProcess)
	at org.apache.tools.ant.taskdefs.Execute.waitFor(Execute.java:586)
	at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:516)
	at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:631)
	at org.apache.tools.ant.taskdefs.ExecuteOn.runParallel(ExecuteOn.java:717)
	at org.apache.tools.ant.taskdefs.ExecuteOn.runExec(ExecuteOn.java:480)
	at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:392)
	at org.apache.tools.ant.Target.performTasks(Target.java:413)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
	at org.apache.ant.antunit.AntUnitScriptRunner.runTarget(AntUnitScriptRunner.java:224)
	at org.apache.ant.antunit.AntUnitScriptRunner.runSuite(AntUnitScriptRunner.java:303)
	at org.apache.ant.antunit.AntUnit.doFile(AntUnit.java:268)
	at org.apache.ant.antunit.AntUnit.doResourceCollection(AntUnit.java:247)
	at org.apache.ant.antunit.AntUnit.execute(AntUnit.java:218)
...


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


Re: AntUnit test failures

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

> On 02/24/2012 12:12 AM, Stefan Bodewig wrote:
>> It is supposed to be used via ./build.sh antunit-tests.

> Ah. But when I do that, I get failures that I do not get when I use
> ./dist/bin/ant -lib lib/optional antunit-tests, e.g.:

> Build File: .../src/tests/antunit/bugfixes/br50866/br50866-test.xml
> Tests run: 1, Failures: 0, Errors: 2, Time elapsed: 0.055 sec
> Target: testinclude  caused an ERROR
> 	Message: Target "middle.common" does not exist in the project "br50866". It is used from target "testinclude".
> 	took 0.005 sec

I don't see these on any of my machines.

>> I'm not sure how build.xml could detect you were not using the
>> current trunk version of Ant or some older build with the same
>> version.

> I think it can and will try to fix it to do so in the trunk.

Seen it, looks good.

Thanks

        Stefan

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


Re: AntUnit test failures

Posted by Jesse Glick <je...@oracle.com>.
On 02/24/2012 12:12 AM, Stefan Bodewig wrote:
> It is supposed to be used via ./build.sh antunit-tests.

Ah. But when I do that, I get failures that I do not get when I use ./dist/bin/ant -lib lib/optional antunit-tests, e.g.:

Build File: .../src/tests/antunit/bugfixes/br50866/br50866-test.xml
Tests run: 1, Failures: 0, Errors: 2, Time elapsed: 0.055 sec
Target: testinclude  caused an ERROR
	Message: Target "middle.common" does not exist in the project "br50866". It is used from target "testinclude".
	took 0.005 sec
  caused an ERROR
	Message: Target "middle.common" does not exist in the project "br50866". It is used from target "testinclude".
Build File: .../src/tests/antunit/bugfixes/bugzilla-43324-stackoverflow-test.xml
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.033 sec
Target: testnested took 0.003 sec
  caused an ERROR
	at line 38, column 29
	Message: Unable to delete directory 
/tmp/testinput/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base/A/base

BTW this script also fails when run from another dir - which is a useful thing to do sometimes, as it finds things which rely on the CWD (as I did yesterday).

> I'm not sure
> how build.xml could detect you were not using the current trunk version
> of Ant or some older build with the same version.

I think it can and will try to fix it to do so in the trunk.


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


Re: AntUnit test failures

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

> On 02/23/2012 04:09 PM, Jesse Glick wrote:
>> $ ant -lib lib/optional/ant-antunit-1.2.jar antunit-tests

> Never mind, just figured out that you need to use

> $ ./dist/bin/ant ...

> to actually test trunk code! Maybe build.xml should detect this
> somehow and warn you (though of course it would be better if it
> automatically ran the right copy of Ant).

It is supposed to be used via ./build.sh antunit-tests.  I'm not sure
how build.xml could detect you were not using the current trunk version
of Ant or some older build with the same version.

Stefan

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


Re: AntUnit test failures

Posted by Jesse Glick <je...@oracle.com>.
On 02/23/2012 04:09 PM, Jesse Glick wrote:
> $ ant -lib lib/optional/ant-antunit-1.2.jar antunit-tests

Never mind, just figured out that you need to use

$ ./dist/bin/ant ...

to actually test trunk code! Maybe build.xml should detect this somehow and warn you (though of course it would be better if it automatically ran the right copy of Ant).


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