You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@river.apache.org by Tom Hobbs <tv...@googlemail.com> on 2010/11/23 12:01:48 UTC

Setting up River

Hi guys,

I've done a fresh check out and I'm trying to retrace all my steps on
how to get a River development setup ready.  Sadly, I'm failing on a
few steps.  Can anyone refresh my brain?

- Compiler Errors in the IDE
In Eclipse I have to create a new JDK 1.5 system library which doesn't
have any restrictions on the rt.jar.  This is fine, but I get the
following compiler errors in the IDE (note: building River via Ant
works fine, so I suspect this to be just an IDE issue.)

1.  com.sun.jini.tool.ClassServer complains the IOException doesn't
have a IOException(String,Throwable) constructor.  Which it doesn't in
Java 5, but it does in 6.  I thought we were staying in JDK 5 for now?
2.  test/src/net.jini.core.event.RemoteEventTest complains about
MarshalledObject not being generic.  Again this is a 1.5 vs 1.6
problem.

- Cannot run the QA tests
I can run the QA tests by browsing to $RIVER_HOME and executing "ant qa.run"

But I can't run all the tests (or specific ones) from the qa
directory.  I.e. browsing to $RIVER_HOME/qa and executing "ant
harness-runtime run-tests -Drun.tests=all" gives me the following
error:

run-tests:
     [java] Exception in thread "main" java.lang.NoClassDefFoundError: net/jini/
config/ConfigurationException
     [java]     at com.sun.jini.qa.harness.MasterHarness.<init>(MasterHarness.ja
va:209)
     [java]     at com.sun.jini.qa.harness.QARunner.main(QARunner.java:67)
     [java] Caused by: java.lang.ClassNotFoundException: net.jini.config.Configu
rationException
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
<snip>

(This is where I own up to never having had the patience to run all
the QA tests before...)

- Cannot run the jtreg tests
I can't run all the tests (or specific ones) from the qa directory.
I.e. browsing to $RIVER_HOME/qa and executing "ant jtreg-teardown
jtreg" gives me the following error:

    [jtreg] TEST: com/sun/jini/action/catchSecurityException/CatchSecurityExcept
ion.java
    [jtreg] JDK under test: (C:\Progra~1\Java\jdk1.5.0_13)
    [jtreg] java version "1.5.0_13"
    [jtreg] Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05
)
    [jtreg] Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode)
    [jtreg]
    [jtreg]
    [jtreg] ACTION: build -- Failed. Compilation failed: exit code 1
    [jtreg] REASON: User specified action: run build CatchSecurityException
    [jtreg] TIME:   0.563 seconds
    [jtreg] messages:
    [jtreg] command: build CatchSecurityException
    [jtreg] reason: User specified action: run build CatchSecurityException
    [jtreg] elapsed time (seconds): 0.563
<snip more of the same>

This is where I own up (again) to not having tried the jtreg tests
myself for more than a year...

Can anyone point out my obvious mistakes?  Then I can write up the
right way to do it and get it on the website.

Cheers,

Tom

Re: Setting up River

Posted by Jonathan Costers <jo...@googlemail.com>.
2010/11/23 Tom Hobbs <tv...@googlemail.com>

> Thanks for the tip.  I don't think that's the problem.
>
> Probably not in this specific case ... But there are a bunch of tests that
will not work when you have spaces in the JDK path.
The reason for that is that the java.ext.dirs property is being passed from
Ant to the harness (and from harness to tests) ... If your JDK path contains
spaces, than this property will too.
Problem is that when it has spaces it is not correctly passed on.
This will only be a problem for tests that require the jsk-policy.jar.


> I've got the QA tests running, including a specific test.  Hurray!
>
> Excellent.


> I'm working on getting the jtreg tests working now.  I've gotten past
> the first problem, I've tracked it down to the path delimiter in the
> -cpa argument on (about) line 200 of the qa/build.xml.  The build XML
> has ":" but Windows wants ";".  I'm sure I've seen an Ant way to make
> the OS dependent, I'm looking for that now.
>

Using <path> would do that for you.


> Fingers crossed.
>
> On Tue, Nov 23, 2010 at 3:41 PM, Jonathan Costers
> <jo...@googlemail.com> wrote:
> > Hi Tom
> > Try installing your JDK in a path without spaces?
> > Best
> > Jonathan
> >
> > 2010/11/23 Tom Hobbs <tv...@googlemail.com>
> >
> >> Maybe I'm missing a trick here.
> >>
> >> Assume I know nothing - this should not be difficult for you guys...
> >>
> >> Firstly, can I just confirm one thing.  "QA Tests" and "JTREG Tests"
> >> are not the same thing?  Right, there's are two different sets of
> >> tests.  Or is that wrong?  The more I read through the mail archives
> >> the I get confused and the less I'm sure about that which I once
> >> thought I was sure about.  Or something.
> >>
> >> So what I want to do is, on a fresh checkout, write down instructions
> >> on how to get the tests and an IDE working.  So, assume River is
> >> checked out into $RIVER_HOME
> >>
> >> cd $RIVER_HOME
> >> ant qa.run
> >>
> >> The above appears to work just fine.
> >>
> >> Now I want to run a specific test, for example
> >> qa/jtreg/net/jini/url/httpmd/TestEqual.java
> >>
> >> Which gives me the following:
> >> $ ant -Drun.tests=net/jini/url/httpmd/TestEqual.java run-tests
> >> Buildfile: build.xml
> >>
> >> james-brown:
> >>   [delete] Deleting directory
> >> C:\development\projects\River-Fresh\trunk\qa\soul
> >>    [mkdir] Created dir:
> C:\development\projects\River-Fresh\trunk\qa\soul
> >>    [touch] Creating
> >>
> C:\development\projects\River-Fresh\trunk\qa\soul\soul.201011231228007289
> >>
> >> run-tests:
> >>     [java]
> >>     [java] -----------------------------------------
> >>     [java] CONFIGURATION FILE:
> >>     [java]
> >>     [java]
> >>
>  C:\development\projects\River-Fresh\trunk\qa\src\com\sun\jini\test\resources\qaHarness.prop
> >>     [java]
> >>     [java] -----------------------------------------
> >>     [java] SETTING UP THE TEST LIST:
> >>     [java]
> >>      [java] Exception in thread "main"
> >> com.sun.jini.qa.harness.TestException: no jar entry found for
> >> net/jini/url/httpmd/TestEqual.java.td
> >>     [java]     at
> >> com.sun.jini.qa.harness.QAConfig.getComponentURL(QAConfig.java:740)
> >>     [java]     at
> >> com.sun.jini.qa.harness.QAConfig.loadProperties(QAConfig.java:897)
> >>     [java]     at
> >> com.sun.jini.qa.harness.MasterHarness.addTest(MasterHarness.java:324)
> >>     [java]     at
> >> com.sun.jini.qa.harness.MasterHarness.addTests(MasterHarness.java:715)
> >>     [java]     at
> >>
> com.sun.jini.qa.harness.MasterHarness.buildTestList(MasterHarness.java:295)
> >>     [java]     at
> >> com.sun.jini.qa.harness.MasterHarness.<init>(MasterHarness.java:238)
> >>      [java]     at
> com.sun.jini.qa.harness.QARunner.main(QARunner.java:67)
> >>      [java] Java Result: 1
> >>
> >> collect-result:
> >>
> >> BUILD FAILED
> >>
> >> Which I don't find suprising, the comment in the Ant script clearly
> >> gives a ".td" example as the test to run.
> >>
> >> However, I get another classpath-like error, when executing something
> >> sensible, e.g.
> >>
> >> $ ant
> >>
> -Drun.tests=com/sun/jini/test/impl/discoverymanager/RemoveGroupsLocsDiscard.td
> >> run-tests
> >> Buildfile: build.xml
> >>
> >> james-brown:
> >>   [delete] Deleting directory
> >> C:\development\projects\River-Fresh\trunk\qa\soul
> >>    [mkdir] Created dir:
> C:\development\projects\River-Fresh\trunk\qa\soul
> >>    [touch] Creating
> >>
> C:\development\projects\River-Fresh\trunk\qa\soul\soul.201011231242029028
> >>
> >> run-tests:
> >>     [java] Exception in thread "main" java.lang.NoClassDefFoundError:
> >> net/jini/config/ConfigurationException
> >>     [java]     at
> >> com.sun.jini.qa.harness.MasterHarness.<init>(MasterHarness.java:209)
> >>      [java]     at
> com.sun.jini.qa.harness.QARunner.main(QARunner.java:67)
> >>     [java] Caused by: java.lang.ClassNotFoundException:
> >> net.jini.config.ConfigurationException
> >>     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> >>      [java]     at java.security.AccessController.doPrivileged(Native
> >> Method)
> >>     [java]     at
> >> java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> >>     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> >>     [java]     at
> >> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> >>     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> >>     [java]     at
> >> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
> >>     [java]     ... 2 more
> >>     [java] Java Result: 1
> >>
> >> collect-result:
> >>
> >> BUILD FAILED
> >>
> >> Which makes me think that "qa Test" != "jtreg test".  This is
> >> reinforced by looking at the results of a QA build, which don't
> >> mention the word "jtreg" apart from when talking about SVN changes.
> >> E.g.
> >>
> >>
> >>
> https://hudson.apache.org/hudson/view/M-R/view/River/job/River-trunk-QA/58/consoleText
> >>
> >> Or maybe that build is just a bit to old?
> >>
> >> Anyway, so now I want to run the jtreg Ant target in qa/build.xml.  So;
> >>
> >> cd $RIVER_HOME/qa
> >> ant jtreg
> >>
> >> This gives me:
> >>
> >> $ ant jtreg
> -Djtreg.home=C:\development\projects\River-Fresh\trunk\qa\jtreg
> >> Buildfile: build.xml
> >>
> >> jtreg:
> >>
> >> BUILD FAILED
> >> C:\development\projects\River-Fresh\trunk\qa\build.xml:181: taskdef
> >> class com.sun.javatest.regtest.Main$Ant cannot be found
> >>
> >> Until I put my build.properties back in $RIVER_HOME, which looks like
> >> this...
> >>
> >> river.home=C:/development/projects/River
> >> jtreg.home=C:/Java/jtreg
> >> jdk1.5.home=C:/Progra~1/Java/jdk1.5.0_13
> >> jtreg.dir=C:/development/projects/River/qa/jtreg
> >>
> >> Now I'm back to square one, with the same jtreg compilation errors,
> namely;
> >>
> >> $ ant jtreg
> >> Buildfile: build.xml
> >>
> >> jtreg:
> >>     [move] Moving 4 files to
> >> C:\development\projects\River-Fresh\trunk\qa\jtreg\JTlib-tmp
> >>     [move] Moving 1 file to
> >> C:\development\projects\River-Fresh\trunk\qa\jtreg\JTlib-tmp
> >>    [jtreg] --------------------------------------------------
> >>    [jtreg] TEST:
> >> com/sun/jini/action/catchSecurityException/CatchSecurityException.java
> >>     [jtreg] JDK under test: (C:\Progra~1\Java\jdk1.5.0_13)
> >>    [jtreg] java version "1.5.0_13"
> >>    [jtreg] Java(TM) 2 Runtime Environment, Standard Edition (build
> >> 1.5.0_13-b05)
> >>    [jtreg] Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode)
> >>    [jtreg]
> >>    [jtreg]
> >>    [jtreg] ACTION: build -- Failed. Compilation failed: exit code 1
> >>    [jtreg] REASON: User specified action: run build
> CatchSecurityException
> >>     [jtreg] TIME:   0.562 seconds
> >>     [jtreg] messages:
> >>    [jtreg] command: build CatchSecurityException
> >>    [jtreg] reason: User specified action: run build
> CatchSecurityException
> >>     [jtreg] elapsed time (seconds): 0.562
> >>    [jtreg]
> >>    [jtreg] ACTION: compile -- Failed. Compilation failed: exit code 1
> >>    [jtreg] REASON: .class file out of date or does not exist
> >>    [jtreg] TIME:   0.562 seconds
> >>    [jtreg] messages:
> >>    [jtreg] command: compile
> >>
> >>
> C:\development\projects\River-Fresh\trunk\qa\jtreg\com\sun\jini\action\catchSecurityException\CatchSecurityException.java
> >>
> >>    [jtreg] reason: .class file out of date or does not exist
> >>    [jtreg] elapsed time (seconds): 0.562
> >>    [jtreg] STDOUT:
> >>    [jtreg] STDERR:
> >>    [jtreg]
> >>
> C:\development\projects\River-Fresh\trunk\qa\jtreg\com\sun\jini\action\catchSecurityException\CatchSecurityException.java:30:
> >> package com.
> >> sun.jini.action does not exist
> >>    [jtreg] import com.sun.jini.action.GetBooleanAction;
> >>
> >> Which is very similar to what Patricia was describing here:
> >>
> >>
> >>
> http://mail-archives.apache.org/mod_mbox/incubator-river-dev/201007.mbox/%3C4C3C5AD6.6040003@zeus.net.au%3E
> >>
> >> So hopefully, I'm just missing that last piece of the puzzle.
> >>
> >> The problems I'm having are summarised thus:
> >>
> >> 1) Cannot run a specific QA test via "ant run-tests"
> >> 2) Cannot run any jtreg tests
> >>
> >> Patricia, did you ever get to the bottom of the problem you were
> >> facing according to the above mail archive?
> >>
> >> Cheers,
> >>
> >> Tom
> >>
> >>
> >>
> >> On Tue, Nov 23, 2010 at 11:59 AM, Sim IJskes - QCG <si...@qcg.nl> wrote:
> >> > On 11/23/2010 12:46 PM, Tom Hobbs wrote:
> >> >>
> >> >> Thanks Peter.
> >> >>
> >> >> I've already got the following in my $RIVER_HOME/build.properties
> >> >>
> >> >> river.home=C:/development/projects/River
> >> >> jtreg.home=C:/Java/jtreg
> >> >> jdk1.5.home=C:/Progra~1/Java/jdk1.5.0_13
> >> >> jtreg.dir=C:/development/projects/River/qa/jtreg
> >> >>
> >> >> Note: I haven't checked out into a trunk directory, I've checked out
> >> >> the trunk into projects/River
> >> >
> >> > Actually, you dont need any properties that are not in the repo. Look
> at
> >> the
> >> > hudson-qa build, that should completely self bootstrap when checked
> out.
> >> >
> >> >
> >> >
> >>
> >
>

Re: Setting up River

Posted by Tom Hobbs <tv...@googlemail.com>.
Thanks for the tip.  I don't think that's the problem.

I've got the QA tests running, including a specific test.  Hurray!

I'm working on getting the jtreg tests working now.  I've gotten past
the first problem, I've tracked it down to the path delimiter in the
-cpa argument on (about) line 200 of the qa/build.xml.  The build XML
has ":" but Windows wants ";".  I'm sure I've seen an Ant way to make
the OS dependent, I'm looking for that now.

Fingers crossed.

On Tue, Nov 23, 2010 at 3:41 PM, Jonathan Costers
<jo...@googlemail.com> wrote:
> Hi Tom
> Try installing your JDK in a path without spaces?
> Best
> Jonathan
>
> 2010/11/23 Tom Hobbs <tv...@googlemail.com>
>
>> Maybe I'm missing a trick here.
>>
>> Assume I know nothing - this should not be difficult for you guys...
>>
>> Firstly, can I just confirm one thing.  "QA Tests" and "JTREG Tests"
>> are not the same thing?  Right, there's are two different sets of
>> tests.  Or is that wrong?  The more I read through the mail archives
>> the I get confused and the less I'm sure about that which I once
>> thought I was sure about.  Or something.
>>
>> So what I want to do is, on a fresh checkout, write down instructions
>> on how to get the tests and an IDE working.  So, assume River is
>> checked out into $RIVER_HOME
>>
>> cd $RIVER_HOME
>> ant qa.run
>>
>> The above appears to work just fine.
>>
>> Now I want to run a specific test, for example
>> qa/jtreg/net/jini/url/httpmd/TestEqual.java
>>
>> Which gives me the following:
>> $ ant -Drun.tests=net/jini/url/httpmd/TestEqual.java run-tests
>> Buildfile: build.xml
>>
>> james-brown:
>>   [delete] Deleting directory
>> C:\development\projects\River-Fresh\trunk\qa\soul
>>    [mkdir] Created dir: C:\development\projects\River-Fresh\trunk\qa\soul
>>    [touch] Creating
>> C:\development\projects\River-Fresh\trunk\qa\soul\soul.201011231228007289
>>
>> run-tests:
>>     [java]
>>     [java] -----------------------------------------
>>     [java] CONFIGURATION FILE:
>>     [java]
>>     [java]
>>  C:\development\projects\River-Fresh\trunk\qa\src\com\sun\jini\test\resources\qaHarness.prop
>>     [java]
>>     [java] -----------------------------------------
>>     [java] SETTING UP THE TEST LIST:
>>     [java]
>>      [java] Exception in thread "main"
>> com.sun.jini.qa.harness.TestException: no jar entry found for
>> net/jini/url/httpmd/TestEqual.java.td
>>     [java]     at
>> com.sun.jini.qa.harness.QAConfig.getComponentURL(QAConfig.java:740)
>>     [java]     at
>> com.sun.jini.qa.harness.QAConfig.loadProperties(QAConfig.java:897)
>>     [java]     at
>> com.sun.jini.qa.harness.MasterHarness.addTest(MasterHarness.java:324)
>>     [java]     at
>> com.sun.jini.qa.harness.MasterHarness.addTests(MasterHarness.java:715)
>>     [java]     at
>> com.sun.jini.qa.harness.MasterHarness.buildTestList(MasterHarness.java:295)
>>     [java]     at
>> com.sun.jini.qa.harness.MasterHarness.<init>(MasterHarness.java:238)
>>      [java]     at com.sun.jini.qa.harness.QARunner.main(QARunner.java:67)
>>      [java] Java Result: 1
>>
>> collect-result:
>>
>> BUILD FAILED
>>
>> Which I don't find suprising, the comment in the Ant script clearly
>> gives a ".td" example as the test to run.
>>
>> However, I get another classpath-like error, when executing something
>> sensible, e.g.
>>
>> $ ant
>> -Drun.tests=com/sun/jini/test/impl/discoverymanager/RemoveGroupsLocsDiscard.td
>> run-tests
>> Buildfile: build.xml
>>
>> james-brown:
>>   [delete] Deleting directory
>> C:\development\projects\River-Fresh\trunk\qa\soul
>>    [mkdir] Created dir: C:\development\projects\River-Fresh\trunk\qa\soul
>>    [touch] Creating
>> C:\development\projects\River-Fresh\trunk\qa\soul\soul.201011231242029028
>>
>> run-tests:
>>     [java] Exception in thread "main" java.lang.NoClassDefFoundError:
>> net/jini/config/ConfigurationException
>>     [java]     at
>> com.sun.jini.qa.harness.MasterHarness.<init>(MasterHarness.java:209)
>>      [java]     at com.sun.jini.qa.harness.QARunner.main(QARunner.java:67)
>>     [java] Caused by: java.lang.ClassNotFoundException:
>> net.jini.config.ConfigurationException
>>     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>>      [java]     at java.security.AccessController.doPrivileged(Native
>> Method)
>>     [java]     at
>> java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>>     [java]     at
>> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>>     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>>     [java]     at
>> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>>     [java]     ... 2 more
>>     [java] Java Result: 1
>>
>> collect-result:
>>
>> BUILD FAILED
>>
>> Which makes me think that "qa Test" != "jtreg test".  This is
>> reinforced by looking at the results of a QA build, which don't
>> mention the word "jtreg" apart from when talking about SVN changes.
>> E.g.
>>
>>
>> https://hudson.apache.org/hudson/view/M-R/view/River/job/River-trunk-QA/58/consoleText
>>
>> Or maybe that build is just a bit to old?
>>
>> Anyway, so now I want to run the jtreg Ant target in qa/build.xml.  So;
>>
>> cd $RIVER_HOME/qa
>> ant jtreg
>>
>> This gives me:
>>
>> $ ant jtreg -Djtreg.home=C:\development\projects\River-Fresh\trunk\qa\jtreg
>> Buildfile: build.xml
>>
>> jtreg:
>>
>> BUILD FAILED
>> C:\development\projects\River-Fresh\trunk\qa\build.xml:181: taskdef
>> class com.sun.javatest.regtest.Main$Ant cannot be found
>>
>> Until I put my build.properties back in $RIVER_HOME, which looks like
>> this...
>>
>> river.home=C:/development/projects/River
>> jtreg.home=C:/Java/jtreg
>> jdk1.5.home=C:/Progra~1/Java/jdk1.5.0_13
>> jtreg.dir=C:/development/projects/River/qa/jtreg
>>
>> Now I'm back to square one, with the same jtreg compilation errors, namely;
>>
>> $ ant jtreg
>> Buildfile: build.xml
>>
>> jtreg:
>>     [move] Moving 4 files to
>> C:\development\projects\River-Fresh\trunk\qa\jtreg\JTlib-tmp
>>     [move] Moving 1 file to
>> C:\development\projects\River-Fresh\trunk\qa\jtreg\JTlib-tmp
>>    [jtreg] --------------------------------------------------
>>    [jtreg] TEST:
>> com/sun/jini/action/catchSecurityException/CatchSecurityException.java
>>     [jtreg] JDK under test: (C:\Progra~1\Java\jdk1.5.0_13)
>>    [jtreg] java version "1.5.0_13"
>>    [jtreg] Java(TM) 2 Runtime Environment, Standard Edition (build
>> 1.5.0_13-b05)
>>    [jtreg] Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode)
>>    [jtreg]
>>    [jtreg]
>>    [jtreg] ACTION: build -- Failed. Compilation failed: exit code 1
>>    [jtreg] REASON: User specified action: run build CatchSecurityException
>>     [jtreg] TIME:   0.562 seconds
>>     [jtreg] messages:
>>    [jtreg] command: build CatchSecurityException
>>    [jtreg] reason: User specified action: run build CatchSecurityException
>>     [jtreg] elapsed time (seconds): 0.562
>>    [jtreg]
>>    [jtreg] ACTION: compile -- Failed. Compilation failed: exit code 1
>>    [jtreg] REASON: .class file out of date or does not exist
>>    [jtreg] TIME:   0.562 seconds
>>    [jtreg] messages:
>>    [jtreg] command: compile
>>
>> C:\development\projects\River-Fresh\trunk\qa\jtreg\com\sun\jini\action\catchSecurityException\CatchSecurityException.java
>>
>>    [jtreg] reason: .class file out of date or does not exist
>>    [jtreg] elapsed time (seconds): 0.562
>>    [jtreg] STDOUT:
>>    [jtreg] STDERR:
>>    [jtreg]
>> C:\development\projects\River-Fresh\trunk\qa\jtreg\com\sun\jini\action\catchSecurityException\CatchSecurityException.java:30:
>> package com.
>> sun.jini.action does not exist
>>    [jtreg] import com.sun.jini.action.GetBooleanAction;
>>
>> Which is very similar to what Patricia was describing here:
>>
>>
>> http://mail-archives.apache.org/mod_mbox/incubator-river-dev/201007.mbox/%3C4C3C5AD6.6040003@zeus.net.au%3E
>>
>> So hopefully, I'm just missing that last piece of the puzzle.
>>
>> The problems I'm having are summarised thus:
>>
>> 1) Cannot run a specific QA test via "ant run-tests"
>> 2) Cannot run any jtreg tests
>>
>> Patricia, did you ever get to the bottom of the problem you were
>> facing according to the above mail archive?
>>
>> Cheers,
>>
>> Tom
>>
>>
>>
>> On Tue, Nov 23, 2010 at 11:59 AM, Sim IJskes - QCG <si...@qcg.nl> wrote:
>> > On 11/23/2010 12:46 PM, Tom Hobbs wrote:
>> >>
>> >> Thanks Peter.
>> >>
>> >> I've already got the following in my $RIVER_HOME/build.properties
>> >>
>> >> river.home=C:/development/projects/River
>> >> jtreg.home=C:/Java/jtreg
>> >> jdk1.5.home=C:/Progra~1/Java/jdk1.5.0_13
>> >> jtreg.dir=C:/development/projects/River/qa/jtreg
>> >>
>> >> Note: I haven't checked out into a trunk directory, I've checked out
>> >> the trunk into projects/River
>> >
>> > Actually, you dont need any properties that are not in the repo. Look at
>> the
>> > hudson-qa build, that should completely self bootstrap when checked out.
>> >
>> >
>> >
>>
>

Re: Setting up River

Posted by Jonathan Costers <jo...@googlemail.com>.
Hi Tom
Try installing your JDK in a path without spaces?
Best
Jonathan

2010/11/23 Tom Hobbs <tv...@googlemail.com>

> Maybe I'm missing a trick here.
>
> Assume I know nothing - this should not be difficult for you guys...
>
> Firstly, can I just confirm one thing.  "QA Tests" and "JTREG Tests"
> are not the same thing?  Right, there's are two different sets of
> tests.  Or is that wrong?  The more I read through the mail archives
> the I get confused and the less I'm sure about that which I once
> thought I was sure about.  Or something.
>
> So what I want to do is, on a fresh checkout, write down instructions
> on how to get the tests and an IDE working.  So, assume River is
> checked out into $RIVER_HOME
>
> cd $RIVER_HOME
> ant qa.run
>
> The above appears to work just fine.
>
> Now I want to run a specific test, for example
> qa/jtreg/net/jini/url/httpmd/TestEqual.java
>
> Which gives me the following:
> $ ant -Drun.tests=net/jini/url/httpmd/TestEqual.java run-tests
> Buildfile: build.xml
>
> james-brown:
>   [delete] Deleting directory
> C:\development\projects\River-Fresh\trunk\qa\soul
>    [mkdir] Created dir: C:\development\projects\River-Fresh\trunk\qa\soul
>    [touch] Creating
> C:\development\projects\River-Fresh\trunk\qa\soul\soul.201011231228007289
>
> run-tests:
>     [java]
>     [java] -----------------------------------------
>     [java] CONFIGURATION FILE:
>     [java]
>     [java]
>  C:\development\projects\River-Fresh\trunk\qa\src\com\sun\jini\test\resources\qaHarness.prop
>     [java]
>     [java] -----------------------------------------
>     [java] SETTING UP THE TEST LIST:
>     [java]
>      [java] Exception in thread "main"
> com.sun.jini.qa.harness.TestException: no jar entry found for
> net/jini/url/httpmd/TestEqual.java.td
>     [java]     at
> com.sun.jini.qa.harness.QAConfig.getComponentURL(QAConfig.java:740)
>     [java]     at
> com.sun.jini.qa.harness.QAConfig.loadProperties(QAConfig.java:897)
>     [java]     at
> com.sun.jini.qa.harness.MasterHarness.addTest(MasterHarness.java:324)
>     [java]     at
> com.sun.jini.qa.harness.MasterHarness.addTests(MasterHarness.java:715)
>     [java]     at
> com.sun.jini.qa.harness.MasterHarness.buildTestList(MasterHarness.java:295)
>     [java]     at
> com.sun.jini.qa.harness.MasterHarness.<init>(MasterHarness.java:238)
>      [java]     at com.sun.jini.qa.harness.QARunner.main(QARunner.java:67)
>      [java] Java Result: 1
>
> collect-result:
>
> BUILD FAILED
>
> Which I don't find suprising, the comment in the Ant script clearly
> gives a ".td" example as the test to run.
>
> However, I get another classpath-like error, when executing something
> sensible, e.g.
>
> $ ant
> -Drun.tests=com/sun/jini/test/impl/discoverymanager/RemoveGroupsLocsDiscard.td
> run-tests
> Buildfile: build.xml
>
> james-brown:
>   [delete] Deleting directory
> C:\development\projects\River-Fresh\trunk\qa\soul
>    [mkdir] Created dir: C:\development\projects\River-Fresh\trunk\qa\soul
>    [touch] Creating
> C:\development\projects\River-Fresh\trunk\qa\soul\soul.201011231242029028
>
> run-tests:
>     [java] Exception in thread "main" java.lang.NoClassDefFoundError:
> net/jini/config/ConfigurationException
>     [java]     at
> com.sun.jini.qa.harness.MasterHarness.<init>(MasterHarness.java:209)
>      [java]     at com.sun.jini.qa.harness.QARunner.main(QARunner.java:67)
>     [java] Caused by: java.lang.ClassNotFoundException:
> net.jini.config.ConfigurationException
>     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>      [java]     at java.security.AccessController.doPrivileged(Native
> Method)
>     [java]     at
> java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>     [java]     at
> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>     [java]     at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>     [java]     ... 2 more
>     [java] Java Result: 1
>
> collect-result:
>
> BUILD FAILED
>
> Which makes me think that "qa Test" != "jtreg test".  This is
> reinforced by looking at the results of a QA build, which don't
> mention the word "jtreg" apart from when talking about SVN changes.
> E.g.
>
>
> https://hudson.apache.org/hudson/view/M-R/view/River/job/River-trunk-QA/58/consoleText
>
> Or maybe that build is just a bit to old?
>
> Anyway, so now I want to run the jtreg Ant target in qa/build.xml.  So;
>
> cd $RIVER_HOME/qa
> ant jtreg
>
> This gives me:
>
> $ ant jtreg -Djtreg.home=C:\development\projects\River-Fresh\trunk\qa\jtreg
> Buildfile: build.xml
>
> jtreg:
>
> BUILD FAILED
> C:\development\projects\River-Fresh\trunk\qa\build.xml:181: taskdef
> class com.sun.javatest.regtest.Main$Ant cannot be found
>
> Until I put my build.properties back in $RIVER_HOME, which looks like
> this...
>
> river.home=C:/development/projects/River
> jtreg.home=C:/Java/jtreg
> jdk1.5.home=C:/Progra~1/Java/jdk1.5.0_13
> jtreg.dir=C:/development/projects/River/qa/jtreg
>
> Now I'm back to square one, with the same jtreg compilation errors, namely;
>
> $ ant jtreg
> Buildfile: build.xml
>
> jtreg:
>     [move] Moving 4 files to
> C:\development\projects\River-Fresh\trunk\qa\jtreg\JTlib-tmp
>     [move] Moving 1 file to
> C:\development\projects\River-Fresh\trunk\qa\jtreg\JTlib-tmp
>    [jtreg] --------------------------------------------------
>    [jtreg] TEST:
> com/sun/jini/action/catchSecurityException/CatchSecurityException.java
>     [jtreg] JDK under test: (C:\Progra~1\Java\jdk1.5.0_13)
>    [jtreg] java version "1.5.0_13"
>    [jtreg] Java(TM) 2 Runtime Environment, Standard Edition (build
> 1.5.0_13-b05)
>    [jtreg] Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode)
>    [jtreg]
>    [jtreg]
>    [jtreg] ACTION: build -- Failed. Compilation failed: exit code 1
>    [jtreg] REASON: User specified action: run build CatchSecurityException
>     [jtreg] TIME:   0.562 seconds
>     [jtreg] messages:
>    [jtreg] command: build CatchSecurityException
>    [jtreg] reason: User specified action: run build CatchSecurityException
>     [jtreg] elapsed time (seconds): 0.562
>    [jtreg]
>    [jtreg] ACTION: compile -- Failed. Compilation failed: exit code 1
>    [jtreg] REASON: .class file out of date or does not exist
>    [jtreg] TIME:   0.562 seconds
>    [jtreg] messages:
>    [jtreg] command: compile
>
> C:\development\projects\River-Fresh\trunk\qa\jtreg\com\sun\jini\action\catchSecurityException\CatchSecurityException.java
>
>    [jtreg] reason: .class file out of date or does not exist
>    [jtreg] elapsed time (seconds): 0.562
>    [jtreg] STDOUT:
>    [jtreg] STDERR:
>    [jtreg]
> C:\development\projects\River-Fresh\trunk\qa\jtreg\com\sun\jini\action\catchSecurityException\CatchSecurityException.java:30:
> package com.
> sun.jini.action does not exist
>    [jtreg] import com.sun.jini.action.GetBooleanAction;
>
> Which is very similar to what Patricia was describing here:
>
>
> http://mail-archives.apache.org/mod_mbox/incubator-river-dev/201007.mbox/%3C4C3C5AD6.6040003@zeus.net.au%3E
>
> So hopefully, I'm just missing that last piece of the puzzle.
>
> The problems I'm having are summarised thus:
>
> 1) Cannot run a specific QA test via "ant run-tests"
> 2) Cannot run any jtreg tests
>
> Patricia, did you ever get to the bottom of the problem you were
> facing according to the above mail archive?
>
> Cheers,
>
> Tom
>
>
>
> On Tue, Nov 23, 2010 at 11:59 AM, Sim IJskes - QCG <si...@qcg.nl> wrote:
> > On 11/23/2010 12:46 PM, Tom Hobbs wrote:
> >>
> >> Thanks Peter.
> >>
> >> I've already got the following in my $RIVER_HOME/build.properties
> >>
> >> river.home=C:/development/projects/River
> >> jtreg.home=C:/Java/jtreg
> >> jdk1.5.home=C:/Progra~1/Java/jdk1.5.0_13
> >> jtreg.dir=C:/development/projects/River/qa/jtreg
> >>
> >> Note: I haven't checked out into a trunk directory, I've checked out
> >> the trunk into projects/River
> >
> > Actually, you dont need any properties that are not in the repo. Look at
> the
> > hudson-qa build, that should completely self bootstrap when checked out.
> >
> >
> >
>

Re: Setting up River

Posted by Peter Firmstone <ji...@zeus.net.au>.
To run the qa tests:

ant qa.run
cd qa (from the qa directory)
ant run-tests (to run tests specified in your build.properties file)

To run the jtreg tests (separate from the qa harness tests)

 From the qa directory:
ant jtreg

An html report is generated for the jtreg tests, which you'll find in 
the jtreg directory.

Perhaps the jtreg tests should be moved into an upper level directory, 
out of the qa directory to avoid confusion.

Cheers,

Peter.

Tom Hobbs wrote:
> Maybe I'm missing a trick here.
>
> Assume I know nothing - this should not be difficult for you guys...
>
> Firstly, can I just confirm one thing.  "QA Tests" and "JTREG Tests"
> are not the same thing?  Right, there's are two different sets of
> tests.  Or is that wrong?  The more I read through the mail archives
> the I get confused and the less I'm sure about that which I once
> thought I was sure about.  Or something.
>
> So what I want to do is, on a fresh checkout, write down instructions
> on how to get the tests and an IDE working.  So, assume River is
> checked out into $RIVER_HOME
>
> cd $RIVER_HOME
> ant qa.run
>
> The above appears to work just fine.
>
> Now I want to run a specific test, for example
> qa/jtreg/net/jini/url/httpmd/TestEqual.java
>
> Which gives me the following:
> $ ant -Drun.tests=net/jini/url/httpmd/TestEqual.java run-tests
> Buildfile: build.xml
>
> james-brown:
>    [delete] Deleting directory C:\development\projects\River-Fresh\trunk\qa\soul
>     [mkdir] Created dir: C:\development\projects\River-Fresh\trunk\qa\soul
>     [touch] Creating
> C:\development\projects\River-Fresh\trunk\qa\soul\soul.201011231228007289
>
> run-tests:
>      [java]
>      [java] -----------------------------------------
>      [java] CONFIGURATION FILE:
>      [java]
>      [java]    C:\development\projects\River-Fresh\trunk\qa\src\com\sun\jini\test\resources\qaHarness.prop
>      [java]
>      [java] -----------------------------------------
>      [java] SETTING UP THE TEST LIST:
>      [java]
>      [java] Exception in thread "main"
> com.sun.jini.qa.harness.TestException: no jar entry found for
> net/jini/url/httpmd/TestEqual.java.td
>      [java]     at
> com.sun.jini.qa.harness.QAConfig.getComponentURL(QAConfig.java:740)
>      [java]     at
> com.sun.jini.qa.harness.QAConfig.loadProperties(QAConfig.java:897)
>      [java]     at
> com.sun.jini.qa.harness.MasterHarness.addTest(MasterHarness.java:324)
>      [java]     at
> com.sun.jini.qa.harness.MasterHarness.addTests(MasterHarness.java:715)
>      [java]     at
> com.sun.jini.qa.harness.MasterHarness.buildTestList(MasterHarness.java:295)
>      [java]     at
> com.sun.jini.qa.harness.MasterHarness.<init>(MasterHarness.java:238)
>      [java]     at com.sun.jini.qa.harness.QARunner.main(QARunner.java:67)
>      [java] Java Result: 1
>
> collect-result:
>
> BUILD FAILED
>
> Which I don't find suprising, the comment in the Ant script clearly
> gives a ".td" example as the test to run.
>
> However, I get another classpath-like error, when executing something
> sensible, e.g.
>
> $ ant -Drun.tests=com/sun/jini/test/impl/discoverymanager/RemoveGroupsLocsDiscard.td
> run-tests
> Buildfile: build.xml
>
> james-brown:
>    [delete] Deleting directory C:\development\projects\River-Fresh\trunk\qa\soul
>     [mkdir] Created dir: C:\development\projects\River-Fresh\trunk\qa\soul
>     [touch] Creating
> C:\development\projects\River-Fresh\trunk\qa\soul\soul.201011231242029028
>
> run-tests:
>      [java] Exception in thread "main" java.lang.NoClassDefFoundError:
> net/jini/config/ConfigurationException
>      [java]     at
> com.sun.jini.qa.harness.MasterHarness.<init>(MasterHarness.java:209)
>      [java]     at com.sun.jini.qa.harness.QARunner.main(QARunner.java:67)
>      [java] Caused by: java.lang.ClassNotFoundException:
> net.jini.config.ConfigurationException
>      [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>      [java]     at java.security.AccessController.doPrivileged(Native Method)
>      [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>      [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>      [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>      [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>      [java]     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>      [java]     ... 2 more
>      [java] Java Result: 1
>
> collect-result:
>
> BUILD FAILED
>
> Which makes me think that "qa Test" != "jtreg test".  This is
> reinforced by looking at the results of a QA build, which don't
> mention the word "jtreg" apart from when talking about SVN changes.
> E.g.
>
> https://hudson.apache.org/hudson/view/M-R/view/River/job/River-trunk-QA/58/consoleText
>
> Or maybe that build is just a bit to old?
>
> Anyway, so now I want to run the jtreg Ant target in qa/build.xml.  So;
>
> cd $RIVER_HOME/qa
> ant jtreg
>
> This gives me:
>
> $ ant jtreg -Djtreg.home=C:\development\projects\River-Fresh\trunk\qa\jtreg
> Buildfile: build.xml
>
> jtreg:
>
> BUILD FAILED
> C:\development\projects\River-Fresh\trunk\qa\build.xml:181: taskdef
> class com.sun.javatest.regtest.Main$Ant cannot be found
>
> Until I put my build.properties back in $RIVER_HOME, which looks like this...
>
> river.home=C:/development/projects/River
> jtreg.home=C:/Java/jtreg
> jdk1.5.home=C:/Progra~1/Java/jdk1.5.0_13
> jtreg.dir=C:/development/projects/River/qa/jtreg
>
> Now I'm back to square one, with the same jtreg compilation errors, namely;
>
> $ ant jtreg
> Buildfile: build.xml
>
> jtreg:
>      [move] Moving 4 files to
> C:\development\projects\River-Fresh\trunk\qa\jtreg\JTlib-tmp
>      [move] Moving 1 file to
> C:\development\projects\River-Fresh\trunk\qa\jtreg\JTlib-tmp
>     [jtreg] --------------------------------------------------
>     [jtreg] TEST:
> com/sun/jini/action/catchSecurityException/CatchSecurityException.java
>     [jtreg] JDK under test: (C:\Progra~1\Java\jdk1.5.0_13)
>     [jtreg] java version "1.5.0_13"
>     [jtreg] Java(TM) 2 Runtime Environment, Standard Edition (build
> 1.5.0_13-b05)
>     [jtreg] Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode)
>     [jtreg]
>     [jtreg]
>     [jtreg] ACTION: build -- Failed. Compilation failed: exit code 1
>     [jtreg] REASON: User specified action: run build CatchSecurityException
>     [jtreg] TIME:   0.562 seconds
>     [jtreg] messages:
>     [jtreg] command: build CatchSecurityException
>     [jtreg] reason: User specified action: run build CatchSecurityException
>     [jtreg] elapsed time (seconds): 0.562
>     [jtreg]
>     [jtreg] ACTION: compile -- Failed. Compilation failed: exit code 1
>     [jtreg] REASON: .class file out of date or does not exist
>     [jtreg] TIME:   0.562 seconds
>     [jtreg] messages:
>     [jtreg] command: compile
> C:\development\projects\River-Fresh\trunk\qa\jtreg\com\sun\jini\action\catchSecurityException\CatchSecurityException.java
>
>     [jtreg] reason: .class file out of date or does not exist
>     [jtreg] elapsed time (seconds): 0.562
>     [jtreg] STDOUT:
>     [jtreg] STDERR:
>     [jtreg] C:\development\projects\River-Fresh\trunk\qa\jtreg\com\sun\jini\action\catchSecurityException\CatchSecurityException.java:30:
> package com.
> sun.jini.action does not exist
>     [jtreg] import com.sun.jini.action.GetBooleanAction;
>
> Which is very similar to what Patricia was describing here:
>
> http://mail-archives.apache.org/mod_mbox/incubator-river-dev/201007.mbox/%3C4C3C5AD6.6040003@zeus.net.au%3E
>
> So hopefully, I'm just missing that last piece of the puzzle.
>
> The problems I'm having are summarised thus:
>
> 1) Cannot run a specific QA test via "ant run-tests"
> 2) Cannot run any jtreg tests
>
> Patricia, did you ever get to the bottom of the problem you were
> facing according to the above mail archive?
>
> Cheers,
>
> Tom
>
>
>
> On Tue, Nov 23, 2010 at 11:59 AM, Sim IJskes - QCG <si...@qcg.nl> wrote:
>   
>> On 11/23/2010 12:46 PM, Tom Hobbs wrote:
>>     
>>> Thanks Peter.
>>>
>>> I've already got the following in my $RIVER_HOME/build.properties
>>>
>>> river.home=C:/development/projects/River
>>> jtreg.home=C:/Java/jtreg
>>> jdk1.5.home=C:/Progra~1/Java/jdk1.5.0_13
>>> jtreg.dir=C:/development/projects/River/qa/jtreg
>>>
>>> Note: I haven't checked out into a trunk directory, I've checked out
>>> the trunk into projects/River
>>>       
>> Actually, you dont need any properties that are not in the repo. Look at the
>> hudson-qa build, that should completely self bootstrap when checked out.
>>
>>
>>
>>     
>
>   


Re: Setting up River

Posted by Tom Hobbs <tv...@googlemail.com>.
Maybe I'm missing a trick here.

Assume I know nothing - this should not be difficult for you guys...

Firstly, can I just confirm one thing.  "QA Tests" and "JTREG Tests"
are not the same thing?  Right, there's are two different sets of
tests.  Or is that wrong?  The more I read through the mail archives
the I get confused and the less I'm sure about that which I once
thought I was sure about.  Or something.

So what I want to do is, on a fresh checkout, write down instructions
on how to get the tests and an IDE working.  So, assume River is
checked out into $RIVER_HOME

cd $RIVER_HOME
ant qa.run

The above appears to work just fine.

Now I want to run a specific test, for example
qa/jtreg/net/jini/url/httpmd/TestEqual.java

Which gives me the following:
$ ant -Drun.tests=net/jini/url/httpmd/TestEqual.java run-tests
Buildfile: build.xml

james-brown:
   [delete] Deleting directory C:\development\projects\River-Fresh\trunk\qa\soul
    [mkdir] Created dir: C:\development\projects\River-Fresh\trunk\qa\soul
    [touch] Creating
C:\development\projects\River-Fresh\trunk\qa\soul\soul.201011231228007289

run-tests:
     [java]
     [java] -----------------------------------------
     [java] CONFIGURATION FILE:
     [java]
     [java]    C:\development\projects\River-Fresh\trunk\qa\src\com\sun\jini\test\resources\qaHarness.prop
     [java]
     [java] -----------------------------------------
     [java] SETTING UP THE TEST LIST:
     [java]
     [java] Exception in thread "main"
com.sun.jini.qa.harness.TestException: no jar entry found for
net/jini/url/httpmd/TestEqual.java.td
     [java]     at
com.sun.jini.qa.harness.QAConfig.getComponentURL(QAConfig.java:740)
     [java]     at
com.sun.jini.qa.harness.QAConfig.loadProperties(QAConfig.java:897)
     [java]     at
com.sun.jini.qa.harness.MasterHarness.addTest(MasterHarness.java:324)
     [java]     at
com.sun.jini.qa.harness.MasterHarness.addTests(MasterHarness.java:715)
     [java]     at
com.sun.jini.qa.harness.MasterHarness.buildTestList(MasterHarness.java:295)
     [java]     at
com.sun.jini.qa.harness.MasterHarness.<init>(MasterHarness.java:238)
     [java]     at com.sun.jini.qa.harness.QARunner.main(QARunner.java:67)
     [java] Java Result: 1

collect-result:

BUILD FAILED

Which I don't find suprising, the comment in the Ant script clearly
gives a ".td" example as the test to run.

However, I get another classpath-like error, when executing something
sensible, e.g.

$ ant -Drun.tests=com/sun/jini/test/impl/discoverymanager/RemoveGroupsLocsDiscard.td
run-tests
Buildfile: build.xml

james-brown:
   [delete] Deleting directory C:\development\projects\River-Fresh\trunk\qa\soul
    [mkdir] Created dir: C:\development\projects\River-Fresh\trunk\qa\soul
    [touch] Creating
C:\development\projects\River-Fresh\trunk\qa\soul\soul.201011231242029028

run-tests:
     [java] Exception in thread "main" java.lang.NoClassDefFoundError:
net/jini/config/ConfigurationException
     [java]     at
com.sun.jini.qa.harness.MasterHarness.<init>(MasterHarness.java:209)
     [java]     at com.sun.jini.qa.harness.QARunner.main(QARunner.java:67)
     [java] Caused by: java.lang.ClassNotFoundException:
net.jini.config.ConfigurationException
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
     [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
     [java]     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
     [java]     ... 2 more
     [java] Java Result: 1

collect-result:

BUILD FAILED

Which makes me think that "qa Test" != "jtreg test".  This is
reinforced by looking at the results of a QA build, which don't
mention the word "jtreg" apart from when talking about SVN changes.
E.g.

https://hudson.apache.org/hudson/view/M-R/view/River/job/River-trunk-QA/58/consoleText

Or maybe that build is just a bit to old?

Anyway, so now I want to run the jtreg Ant target in qa/build.xml.  So;

cd $RIVER_HOME/qa
ant jtreg

This gives me:

$ ant jtreg -Djtreg.home=C:\development\projects\River-Fresh\trunk\qa\jtreg
Buildfile: build.xml

jtreg:

BUILD FAILED
C:\development\projects\River-Fresh\trunk\qa\build.xml:181: taskdef
class com.sun.javatest.regtest.Main$Ant cannot be found

Until I put my build.properties back in $RIVER_HOME, which looks like this...

river.home=C:/development/projects/River
jtreg.home=C:/Java/jtreg
jdk1.5.home=C:/Progra~1/Java/jdk1.5.0_13
jtreg.dir=C:/development/projects/River/qa/jtreg

Now I'm back to square one, with the same jtreg compilation errors, namely;

$ ant jtreg
Buildfile: build.xml

jtreg:
     [move] Moving 4 files to
C:\development\projects\River-Fresh\trunk\qa\jtreg\JTlib-tmp
     [move] Moving 1 file to
C:\development\projects\River-Fresh\trunk\qa\jtreg\JTlib-tmp
    [jtreg] --------------------------------------------------
    [jtreg] TEST:
com/sun/jini/action/catchSecurityException/CatchSecurityException.java
    [jtreg] JDK under test: (C:\Progra~1\Java\jdk1.5.0_13)
    [jtreg] java version "1.5.0_13"
    [jtreg] Java(TM) 2 Runtime Environment, Standard Edition (build
1.5.0_13-b05)
    [jtreg] Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode)
    [jtreg]
    [jtreg]
    [jtreg] ACTION: build -- Failed. Compilation failed: exit code 1
    [jtreg] REASON: User specified action: run build CatchSecurityException
    [jtreg] TIME:   0.562 seconds
    [jtreg] messages:
    [jtreg] command: build CatchSecurityException
    [jtreg] reason: User specified action: run build CatchSecurityException
    [jtreg] elapsed time (seconds): 0.562
    [jtreg]
    [jtreg] ACTION: compile -- Failed. Compilation failed: exit code 1
    [jtreg] REASON: .class file out of date or does not exist
    [jtreg] TIME:   0.562 seconds
    [jtreg] messages:
    [jtreg] command: compile
C:\development\projects\River-Fresh\trunk\qa\jtreg\com\sun\jini\action\catchSecurityException\CatchSecurityException.java

    [jtreg] reason: .class file out of date or does not exist
    [jtreg] elapsed time (seconds): 0.562
    [jtreg] STDOUT:
    [jtreg] STDERR:
    [jtreg] C:\development\projects\River-Fresh\trunk\qa\jtreg\com\sun\jini\action\catchSecurityException\CatchSecurityException.java:30:
package com.
sun.jini.action does not exist
    [jtreg] import com.sun.jini.action.GetBooleanAction;

Which is very similar to what Patricia was describing here:

http://mail-archives.apache.org/mod_mbox/incubator-river-dev/201007.mbox/%3C4C3C5AD6.6040003@zeus.net.au%3E

So hopefully, I'm just missing that last piece of the puzzle.

The problems I'm having are summarised thus:

1) Cannot run a specific QA test via "ant run-tests"
2) Cannot run any jtreg tests

Patricia, did you ever get to the bottom of the problem you were
facing according to the above mail archive?

Cheers,

Tom



On Tue, Nov 23, 2010 at 11:59 AM, Sim IJskes - QCG <si...@qcg.nl> wrote:
> On 11/23/2010 12:46 PM, Tom Hobbs wrote:
>>
>> Thanks Peter.
>>
>> I've already got the following in my $RIVER_HOME/build.properties
>>
>> river.home=C:/development/projects/River
>> jtreg.home=C:/Java/jtreg
>> jdk1.5.home=C:/Progra~1/Java/jdk1.5.0_13
>> jtreg.dir=C:/development/projects/River/qa/jtreg
>>
>> Note: I haven't checked out into a trunk directory, I've checked out
>> the trunk into projects/River
>
> Actually, you dont need any properties that are not in the repo. Look at the
> hudson-qa build, that should completely self bootstrap when checked out.
>
>
>

Re: Setting up River

Posted by Sim IJskes - QCG <si...@qcg.nl>.
On 11/23/2010 12:46 PM, Tom Hobbs wrote:
> Thanks Peter.
>
> I've already got the following in my $RIVER_HOME/build.properties
>
> river.home=C:/development/projects/River
> jtreg.home=C:/Java/jtreg
> jdk1.5.home=C:/Progra~1/Java/jdk1.5.0_13
> jtreg.dir=C:/development/projects/River/qa/jtreg
>
> Note: I haven't checked out into a trunk directory, I've checked out
> the trunk into projects/River

Actually, you dont need any properties that are not in the repo. Look at 
the hudson-qa build, that should completely self bootstrap when checked out.



Re: Setting up River

Posted by Tom Hobbs <tv...@googlemail.com>.
Thanks Peter.

I've already got the following in my $RIVER_HOME/build.properties

river.home=C:/development/projects/River
jtreg.home=C:/Java/jtreg
jdk1.5.home=C:/Progra~1/Java/jdk1.5.0_13
jtreg.dir=C:/development/projects/River/qa/jtreg

Note: I haven't checked out into a trunk directory, I've checked out
the trunk into projects/River

Also notice: I'm currently running on Windows also...

Maybe I should change that...

Like you suggest, I'm trying to run the qa and jtreg tests on the
command line via Ant.  Out of the box, it's just not working though.

I've been going through this exchange:

http://mail-archives.apache.org/mod_mbox/incubator-river-dev/201007.mbox/%3C4C3C5AD6.6040003@zeus.net.au%3E

But haven't been able to make it work yet.  I want to get to the stage
where I have a fixed list of "From a fresh check-out, do steps, 1/2/3
to run all these bits and pieces."

On Tue, Nov 23, 2010 at 11:34 AM, Peter Firmstone <ji...@zeus.net.au> wrote:
> You need to create a build.properties file in the trunk directory, if you
> haven't already done so, that contains something like:
>
> river.home=/opt/src/river/trunk
> log.config=/home/peter/logging.properties
> debug=true
> debuglevel=lines,source,vars
> run.tests=com/sun/jini/test/impl/start/ServiceStarterCreateBadTransientServiceTest.td
>
> I tend to use an IDE to edit, refactor methods etc, but for compiling,
> running tests and debugging, I use the command line.
>
> But some tips would be to import libraries for ant and junit in the IDE, and
> make sure the qa tests can see the jar files in trunk/lib
>
> Hope this helps a little.
>
> Cheers,
>
> Peter.
>
> Tom Hobbs wrote:
>>
>> Hi guys,
>>
>> I've done a fresh check out and I'm trying to retrace all my steps on
>> how to get a River development setup ready.  Sadly, I'm failing on a
>> few steps.  Can anyone refresh my brain?
>>
>> - Compiler Errors in the IDE
>> In Eclipse I have to create a new JDK 1.5 system library which doesn't
>> have any restrictions on the rt.jar.  This is fine, but I get the
>> following compiler errors in the IDE (note: building River via Ant
>> works fine, so I suspect this to be just an IDE issue.)
>>
>> 1.  com.sun.jini.tool.ClassServer complains the IOException doesn't
>> have a IOException(String,Throwable) constructor.  Which it doesn't in
>> Java 5, but it does in 6.  I thought we were staying in JDK 5 for now?
>> 2.  test/src/net.jini.core.event.RemoteEventTest complains about
>> MarshalledObject not being generic.  Again this is a 1.5 vs 1.6
>> problem.
>>
>> - Cannot run the QA tests
>> I can run the QA tests by browsing to $RIVER_HOME and executing "ant
>> qa.run"
>>
>> But I can't run all the tests (or specific ones) from the qa
>> directory.  I.e. browsing to $RIVER_HOME/qa and executing "ant
>> harness-runtime run-tests -Drun.tests=all" gives me the following
>> error:
>>
>> run-tests:
>>     [java] Exception in thread "main" java.lang.NoClassDefFoundError:
>> net/jini/
>> config/ConfigurationException
>>     [java]     at
>> com.sun.jini.qa.harness.MasterHarness.<init>(MasterHarness.ja
>> va:209)
>>     [java]     at com.sun.jini.qa.harness.QARunner.main(QARunner.java:67)
>>     [java] Caused by: java.lang.ClassNotFoundException:
>> net.jini.config.Configu
>> rationException
>>     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>> <snip>
>>
>> (This is where I own up to never having had the patience to run all
>> the QA tests before...)
>>
>> - Cannot run the jtreg tests
>> I can't run all the tests (or specific ones) from the qa directory.
>> I.e. browsing to $RIVER_HOME/qa and executing "ant jtreg-teardown
>> jtreg" gives me the following error:
>>
>>    [jtreg] TEST:
>> com/sun/jini/action/catchSecurityException/CatchSecurityExcept
>> ion.java
>>    [jtreg] JDK under test: (C:\Progra~1\Java\jdk1.5.0_13)
>>    [jtreg] java version "1.5.0_13"
>>    [jtreg] Java(TM) 2 Runtime Environment, Standard Edition (build
>> 1.5.0_13-b05
>> )
>>    [jtreg] Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode)
>>    [jtreg]
>>    [jtreg]
>>    [jtreg] ACTION: build -- Failed. Compilation failed: exit code 1
>>    [jtreg] REASON: User specified action: run build CatchSecurityException
>>    [jtreg] TIME:   0.563 seconds
>>    [jtreg] messages:
>>    [jtreg] command: build CatchSecurityException
>>    [jtreg] reason: User specified action: run build CatchSecurityException
>>    [jtreg] elapsed time (seconds): 0.563
>> <snip more of the same>
>>
>> This is where I own up (again) to not having tried the jtreg tests
>> myself for more than a year...
>>
>> Can anyone point out my obvious mistakes?  Then I can write up the
>> right way to do it and get it on the website.
>>
>> Cheers,
>>
>> Tom
>>
>>
>
>

Re: Setting up River

Posted by Peter Firmstone <ji...@zeus.net.au>.
You need to create a build.properties file in the trunk directory, if 
you haven't already done so, that contains something like:

river.home=/opt/src/river/trunk
log.config=/home/peter/logging.properties
debug=true
debuglevel=lines,source,vars
run.tests=com/sun/jini/test/impl/start/ServiceStarterCreateBadTransientServiceTest.td

I tend to use an IDE to edit, refactor methods etc, but for compiling, 
running tests and debugging, I use the command line.

But some tips would be to import libraries for ant and junit in the IDE, 
and make sure the qa tests can see the jar files in trunk/lib

Hope this helps a little.

Cheers,

Peter.

Tom Hobbs wrote:
> Hi guys,
>
> I've done a fresh check out and I'm trying to retrace all my steps on
> how to get a River development setup ready.  Sadly, I'm failing on a
> few steps.  Can anyone refresh my brain?
>
> - Compiler Errors in the IDE
> In Eclipse I have to create a new JDK 1.5 system library which doesn't
> have any restrictions on the rt.jar.  This is fine, but I get the
> following compiler errors in the IDE (note: building River via Ant
> works fine, so I suspect this to be just an IDE issue.)
>
> 1.  com.sun.jini.tool.ClassServer complains the IOException doesn't
> have a IOException(String,Throwable) constructor.  Which it doesn't in
> Java 5, but it does in 6.  I thought we were staying in JDK 5 for now?
> 2.  test/src/net.jini.core.event.RemoteEventTest complains about
> MarshalledObject not being generic.  Again this is a 1.5 vs 1.6
> problem.
>
> - Cannot run the QA tests
> I can run the QA tests by browsing to $RIVER_HOME and executing "ant qa.run"
>
> But I can't run all the tests (or specific ones) from the qa
> directory.  I.e. browsing to $RIVER_HOME/qa and executing "ant
> harness-runtime run-tests -Drun.tests=all" gives me the following
> error:
>
> run-tests:
>      [java] Exception in thread "main" java.lang.NoClassDefFoundError: net/jini/
> config/ConfigurationException
>      [java]     at com.sun.jini.qa.harness.MasterHarness.<init>(MasterHarness.ja
> va:209)
>      [java]     at com.sun.jini.qa.harness.QARunner.main(QARunner.java:67)
>      [java] Caused by: java.lang.ClassNotFoundException: net.jini.config.Configu
> rationException
>      [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> <snip>
>
> (This is where I own up to never having had the patience to run all
> the QA tests before...)
>
> - Cannot run the jtreg tests
> I can't run all the tests (or specific ones) from the qa directory.
> I.e. browsing to $RIVER_HOME/qa and executing "ant jtreg-teardown
> jtreg" gives me the following error:
>
>     [jtreg] TEST: com/sun/jini/action/catchSecurityException/CatchSecurityExcept
> ion.java
>     [jtreg] JDK under test: (C:\Progra~1\Java\jdk1.5.0_13)
>     [jtreg] java version "1.5.0_13"
>     [jtreg] Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05
> )
>     [jtreg] Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode)
>     [jtreg]
>     [jtreg]
>     [jtreg] ACTION: build -- Failed. Compilation failed: exit code 1
>     [jtreg] REASON: User specified action: run build CatchSecurityException
>     [jtreg] TIME:   0.563 seconds
>     [jtreg] messages:
>     [jtreg] command: build CatchSecurityException
>     [jtreg] reason: User specified action: run build CatchSecurityException
>     [jtreg] elapsed time (seconds): 0.563
> <snip more of the same>
>
> This is where I own up (again) to not having tried the jtreg tests
> myself for more than a year...
>
> Can anyone point out my obvious mistakes?  Then I can write up the
> right way to do it and get it on the website.
>
> Cheers,
>
> Tom
>
>