ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Glick <Jesse.Gl...@netbeans.com>
Subject [PATCH] CommandLineJavaTest failure (was: Re: junit fails for CommandLineJavaTest)
Date Thu, 25 Jan 2001 08:59:19 GMT
Frank Wierzbicki wrote:
> Looks like junit.jar is in the optional directory but is expected to be in the
> core directory by the test...I guess stuff is currently getting moved
> around?Sorry, I'll look around more before I post next time.

I have a patch for this, attached. It seems that the reorg of the build
scripts and so on broke this test, which assumes that some JARs are in
particular places. The patch still assumes some JARs are in particular
places, just new JARs and new places. Probably it would be better for
the test to make its own JARs to be safe.

Also a second patch for CommandlineJava itself. The test not only
failed, it failed with a commandline like "java -D.... -classpath ''
some.Class ..." (that is, the classpath is the empty string). This was
caused by two JARs being specified for the classpath, neither of which
really existed. The patch includes a -classpath argument in the
commandline only if the classpath will really be nonempty (considering
first whether some entries are bogus).

-Jesse

> --- Frank Wierzbicki <wierzbickif@yahoo.com> wrote:
> > Hi,
> >
> > I'm running on Windows 2000 with cygwin, and when I run the junit tests for
> > ant
> > (the latest from CVS), CommandLineJavaTest fails:  I'm going to look and see
> > if
> > I can figure out why, but I thought someone here might figure it out faster
> > than me.
> >
> > Thanks.
> >
> > Here's the output:
> >
> > Testsuite: org.apache.tools.ant.types.CommandlineJavaTest
> > Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.01 sec
> > Testcase: testGetCommandline took 0.01 sec
> >         FAILED
> > junit.jar contained
> > junit.framework.AssertionFailedError: junit.jar contained
> >         at junit.framework.Assert.fail(Assert.java:143)
> >         at junit.framework.Assert.assert(Assert.java:19)
> >         at
> >
> org.apache.tools.ant.types.CommandlineJavaTest.testGetCommandline(CommandlineJavaTest.jav
> > a:103)

-- 
Jesse Glick   <mailto:Jesse.Glick@netbeans.com>
NetBeans, Open APIs  <http://www.netbeans.org/>
tel (+4202) 3300-9161 Sun Micro x49161 Praha CR
Mime
View raw message