Skip to main content

Please revies: test export updates

12 replies [Last post]
Anonymous

Hi All,

I've prepared a suite of updates related to export of Ant build script.
You are welcome to review them:

1. Issue #118: -- Impossible to compile sources of exported tests
In this update the original JAR file is put on classpath for compilation
and preverification. Structure of exported build was lightly improved.

http://fisheye4.cenqua.com/changelog/cqme/branches/users/dtrounine/testE...

2. Issue #122: -- Modification of exported sources makes no effect

http://fisheye4.cenqua.com/changelog/cqme/branches/users/dtrounine/testE...

3. Issue #138 and issue #139 -- Fixed clean target and added rebuild target

http://fisheye4.cenqua.com/changelog/cqme/branches/users/dtrounine/testE...

4. Issue #121 -- Added user friendly message to export build, explaining
how to set platform.active

http://fisheye4.cenqua.com/changelog/cqme/branches/users/dtrounine/testE...

Thanks,
Dmitri.

---------------------------------------------------------------------
To unsubscribe, e-mail: meframework-unsubscribe@cqme.dev.java.net
For additional commands, e-mail: meframework-help@cqme.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Vladimir Sizikov

Dmitri,

On Mon, May 14, 2007 at 07:15:02PM -0700, Dmitri Trounine wrote:
> 4. Issue #121 -- Added user friendly message to export build, explaining
> how to set platform.active
>
> http://fisheye4.cenqua.com/changelog/cqme/branches/users/dtrounine/testE...

The changes look good. I'd only modify the error message a bit:

"Use project properties wizard to select Java ME platform.." --->

"Adjust project properties to specify appropriate Java ME platform...".

The original wording "project properties wizard" is confusing, it
suggests that there is a special wizard, while actually we're just
talking about standard project properties GUI.

Please proceed with the commit, if you agree with the suggested
modification.

So, all 4 proposed changes were reviewed. The 1st, 3rd and 4th are
good to go (with minor modifications). The 2nd change seems to be very
problematic and actually breaks my ability to run exported tests and
introduces some side effects (missing sources in subsequent
tests). Please rework it.

Thanks,
--Vladimir

---------------------------------------------------------------------
To unsubscribe, e-mail: meframework-unsubscribe@cqme.dev.java.net
For additional commands, e-mail: meframework-help@cqme.dev.java.net

Vladimir Sizikov

Dmitri,

On Mon, May 14, 2007 at 07:15:02PM -0700, Dmitri Trounine wrote:
> 3. Issue #138 and issue #139 -- Fixed clean target and added rebuild target
>
> http://fisheye4.cenqua.com/changelog/cqme/branches/users/dtrounine/testE...

Let me first suggest to make fixes as independent from each other as
possible.
For example, this fix is made on top of branch for fix for Issue #122,
and even the bugs are marked as related.

But in fact, these are completely independent bugs and completely
independent bugfixes.

So, I have no obejections against this bugfix. But the bugfix for #122
should be reworked (see my previous message). As you see, there are no
dependencies between the two.

Also, I don't think that we should mark the actual bugs as
dependent. The fact that we fix one after another does not make them
dependent in any way.

Thanks,
--Vladimir

---------------------------------------------------------------------
To unsubscribe, e-mail: meframework-unsubscribe@cqme.dev.java.net
For additional commands, e-mail: meframework-help@cqme.dev.java.net

Vladimir Sizikov

Dmitri,

On Mon, May 14, 2007 at 07:15:02PM -0700, Dmitri Trounine wrote:
> 2. Issue #122: -- Modification of exported sources makes no effect
>
> http://fisheye4.cenqua.com/changelog/cqme/branches/users/dtrounine/testE...

Something is clearly not right with this update.

All the sources are available only for test1 (in Netbeans).

For test2, test3, etc, the sources only for the test itself available
in the NB GUI (project files tree). Sources for
agents/clients/multitest are not present in the GUI.

An attempt to run the test1 (with all the sources present in NB) is
not successful:

I'm unable to run the rebuilt exported tests (from Netbeans): the
phone GUI pops up, but when I click "launch", I get the following
error in the console:

Uncaught exception java/lang/NoClassDefFoundError:
com/sun/tck/midp/javatest/agent/MIDletAgent$1.

One more minor comment. Why toLine() methods aren't static, they don't
depend on the non-static state, right?

Thanks,
--Vladimir

---------------------------------------------------------------------
To unsubscribe, e-mail: meframework-unsubscribe@cqme.dev.java.net
For additional commands, e-mail: meframework-help@cqme.dev.java.net

Dmitri Trounine

Vladimir,

thank you for having taken a look at last updates from me!

First, I should agree, that it was not strongly needed to make the bugs
dependent and inherit one branch from another. I just thought that in
this way it would make easier reviewing them: if you review the last bug
in the chain of dependencies, you have all bugs fixed and you can focus
on what you are reviewing at the moment.

If such approach isn't convenient for you, please don't worry. As you
said, the bug fixes are in fact independent, and when they are ready
I'll make separate commits. And I'll remove dependency info from issue
tracker.

>> 2. Issue #122: -- Modification of exported sources makes no effect
>>
>> http://fisheye4.cenqua.com/changelog/cqme/branches/users/dtrounine/testE...
>>
>
> Something is clearly not right with this update.
>
> All the sources are available only for test1 (in Netbeans).
>
> For test2, test3, etc, the sources only for the test itself available
> in the NB GUI (project files tree). Sources for
> agents/clients/multitest are not present in the GUI.
>
It's an old story about issue #90 (improvement of JarBuilder). Maybe
I'll raise its priority to P2? As I see, this issue is raised in every
review. When I filed it, it was a question of modifying 2 lines without
changing the logic and certainly without changing something public. Now
this update is pending because of major changes in JarBuilder API which
require much review and unit tests...
> An attempt to run the test1 (with all the sources present in NB) is
> not successful:
>
> I'm unable to run the rebuilt exported tests (from Netbeans): the
> phone GUI pops up, but when I click "launch", I get the following
> error in the console:
>
> Uncaught exception java/lang/NoClassDefFoundError:
> com/sun/tck/midp/javatest/agent/MIDletAgent$1.
>
I should test it more, but for instant I didn't observed such failure.
If you still have this exported test project, could you send me a
verbosed log from Ant?
> One more minor comment. Why toLine() methods aren't static, they don't
> depend on the non-static state, right?
>
Right. Will fix.

Thanks,
Dmitri.

---------------------------------------------------------------------
To unsubscribe, e-mail: meframework-unsubscribe@cqme.dev.java.net
For additional commands, e-mail: meframework-help@cqme.dev.java.net

Vladimir Sizikov

Dmitri,

On Tue, May 15, 2007 at 10:17:03AM -0700, Dmitri Trounine wrote:
> First, I should agree, that it was not strongly needed to make the bugs
> dependent and inherit one branch from another. I just thought that in
> this way it would make easier reviewing them: if you review the last bug
> in the chain of dependencies, you have all bugs fixed and you can focus
> on what you are reviewing at the moment.
>
> If such approach isn't convenient for you, please don't worry. As you
> said, the bug fixes are in fact independent, and when they are ready
> I'll make separate commits. And I'll remove dependency info from issue
> tracker.

Thanks! The issue tracker behaves somewhat confusing with dependent
ISSUEs. If issue XXX depends on YYY, and XXX is fixed, it actually not
fully fixed until YYY is marked as fixed in the Issue tracker.

So I"d recommend to use this feature only in case when there are
indeed clear dependencies.

But I agree, this is not a major problem.

> >>2. Issue #122: -- Modification of exported sources makes no effect
> >>
> >>http://fisheye4.cenqua.com/changelog/cqme/branches/users/dtrounine/testExport?cs=876
> >>
> >
> >Something is clearly not right with this update.
> >
> >All the sources are available only for test1 (in Netbeans).
> >
> >For test2, test3, etc, the sources only for the test itself available
> >in the NB GUI (project files tree). Sources for
> >agents/clients/multitest are not present in the GUI.
> >
> It's an old story about issue #90 (improvement of JarBuilder). Maybe
> I'll raise its priority to P2? As I see, this issue is raised in every
> review. When I filed it, it was a question of modifying 2 lines without
> changing the logic and certainly without changing something public. Now
> this update is pending because of major changes in JarBuilder API which
> require much review and unit tests...

Ah, _that_ problem again! I keep forgetting it and bring it over and
over. Sorry! I agree that the priority of that issue should be raised
and the problem should be dealt with, one way or another.

Please work with Stan on this. In fact, why don't you guys just talk,
you're in the same building now. :)

> >I'm unable to run the rebuilt exported tests (from Netbeans): the
> >phone GUI pops up, but when I click "launch", I get the following
> >error in the console:
> >
> >Uncaught exception java/lang/NoClassDefFoundError:
> >com/sun/tck/midp/javatest/agent/MIDletAgent$1.
> >
> I should test it more, but for instant I didn't observed such failure.
> If you still have this exported test project, could you send me a
> verbosed log from Ant?

Sure. I just send it in private email (in order to avoid any exposure
of private info).

Thanks,
--Vladimir

---------------------------------------------------------------------
To unsubscribe, e-mail: meframework-unsubscribe@cqme.dev.java.net
For additional commands, e-mail: meframework-help@cqme.dev.java.net

Dmitri Trounine

Vladimir,

Thank you for the build log. I tried to figure out what was wrong in it
- without success. Looks very strange. So, I'm writing this letter just
to track my progress.

I checked out the code from
https://cqme.dev.java.net/svn/cqme/branches/users/dtrounine/testExport/i...
(rev. 909). Then I built the ME Framework and run the test export with
MIDP TCK. I've exported the same test I seen in your log:
api/java_io/InputStreamReader/index.html#Constructor1
and tried to rebuild and run the exported bundle in NetBeans IDE. And it
worked.

In your log there is a list of files to be included in JAR file (see
around line 487):

com/sun/tck/midp/lib/api/java/io/SystemEncoding/SystemEncoding.class,
com/sun/cldc/communication/Client.class,
com/sun/tck/cldc/lib/Status.class,
com/sun/tck/j2me/services/commService/CommServiceConfig.class,
com/sun/tck/cldc/javatest/agent/CldcAgent.class,
com/sun/tck/midp/lib/api/java/io/EncodingConstant/EncodingConstant.class,
com/sun/tck/cldc/javatest/agent/TestResult.class,
com/sun/tck/midp/javatest/agent/MIDletAgent10.class,
com/sun/tck/midp/javatest/agent/MIDletAgent10$1.class,
com/sun/tck/midp/javatest/agent/MIDletAgent.class,
com/sun/cldc/communication/MultiClient.class,
javasoft/sqe/tests/api/java/io/InputStreamReader/Constructor1Tests.class,
com/sun/cldc/communication/midp/ExportClient.class,
com/sun/tck/cldc/javatest/agent/CldcAgent$1.class,
com/sun/tck/cldc/lib/Test.class,
com/sun/tck/cldc/javatest/util/UTFConverter.class,
com/sun/tck/cldc/lib/MultiTest$SetupException.class,
com/sun/tck/midp/javatest/agent/GenericMIDletAgent.class,
com/sun/tck/cldc/lib/MultiTest.class

In my log, the list contains the same files.
As you can see, com/sun/tck/midp/javatest/agent/MIDletAgent$1.class is
not in the list. And this is ok, because the source of MIDletAgent class
doesn't contain definition of an anonymous class.

Then, my exported test runs, and yours fails. Why it need the mysterious
com/sun/tck/midp/javatest/agent/MIDletAgent$1?...

Vova,

While I continue my investigations, could you send me archived
directory with exported test? The Ant log seems not be enough for
understanding what doesn't work.

Thanks,
Dmitri.

Vladimir Sizikov wrote:
>>> I'm unable to run the rebuilt exported tests (from Netbeans): the
>>> phone GUI pops up, but when I click "launch", I get the following
>>> error in the console:
>>>
>>> Uncaught exception java/lang/NoClassDefFoundError:
>>> com/sun/tck/midp/javatest/agent/MIDletAgent$1.
>>>
>>>
>> I should test it more, but for instant I didn't observed such failure.
>> If you still have this exported test project, could you send me a
>> verbosed log from Ant?
>>
>
> Sure. I just send it in private email (in order to avoid any exposure
> of private info).
>

---------------------------------------------------------------------
To unsubscribe, e-mail: meframework-unsubscribe@cqme.dev.java.net
For additional commands, e-mail: meframework-help@cqme.dev.java.net

Vladimir Sizikov

Dmitri,

Good news, I sorted it all out.

I used MIDP TCK with original sources that come from MIDP TCK (and in
MIDP TCK the MIDletAgent does have an inner class)!

So, the old sources were copied to the export directory. Then they
were compiled, and produced those $1 class files. Then, the "jar"
target updated the original JAR file, but since there is a limitation
on what files to update: ( includes="${class.files}", the
class.files are set in build.properties), the inner classes were not
added to the jar file, hence the error.

You're writing:
> As you can see, com/sun/tck/midp/javatest/agent/MIDletAgent$1.class is
> not in the list. And this is ok, because the source of MIDletAgent class
> doesn't contain definition of an anonymous class.

I'm not sure I agree. The problem I had is one case. Another
case - what if users add inner clasess to the soruces while
modifying them? Then, they will not be able to run the tests.

Another use case - user adds a whole new class. Again, he/she will not
be able to execute such modified tests.

It seems that limitations on the jar update should removed.

What do you think?

Thanks,
--Vladimir

On Wed, May 16, 2007 at 03:12:49PM -0700, Dmitri Trounine wrote:
> Vladimir,
>
> Thank you for the build log. I tried to figure out what was wrong in it
> - without success. Looks very strange. So, I'm writing this letter just
> to track my progress.
>
> I checked out the code from
> https://cqme.dev.java.net/svn/cqme/branches/users/dtrounine/testExport/i...
> (rev. 909). Then I built the ME Framework and run the test export with MIDP
> TCK. I've exported the same test I seen in your log:
> api/java_io/InputStreamReader/index.html#Constructor1
> and tried to rebuild and run the exported bundle in NetBeans IDE. And it
> worked.
>
> In your log there is a list of files to be included in JAR file (see
> around line 487):
>
> com/sun/tck/midp/lib/api/java/io/SystemEncoding/SystemEncoding.class,
> com/sun/cldc/communication/Client.class,
> com/sun/tck/cldc/lib/Status.class,
> com/sun/tck/j2me/services/commService/CommServiceConfig.class,
> com/sun/tck/cldc/javatest/agent/CldcAgent.class,
> com/sun/tck/midp/lib/api/java/io/EncodingConstant/EncodingConstant.class,
> com/sun/tck/cldc/javatest/agent/TestResult.class,
> com/sun/tck/midp/javatest/agent/MIDletAgent10.class,
> com/sun/tck/midp/javatest/agent/MIDletAgent10$1.class,
> com/sun/tck/midp/javatest/agent/MIDletAgent.class,
> com/sun/cldc/communication/MultiClient.class,
> javasoft/sqe/tests/api/java/io/InputStreamReader/Constructor1Tests.class,
> com/sun/cldc/communication/midp/ExportClient.class,
> com/sun/tck/cldc/javatest/agent/CldcAgent$1.class,
> com/sun/tck/cldc/lib/Test.class,
> com/sun/tck/cldc/javatest/util/UTFConverter.class,
> com/sun/tck/cldc/lib/MultiTest$SetupException.class,
> com/sun/tck/midp/javatest/agent/GenericMIDletAgent.class,
> com/sun/tck/cldc/lib/MultiTest.class
>
> In my log, the list contains the same files.
> As you can see, com/sun/tck/midp/javatest/agent/MIDletAgent$1.class is
> not in the list. And this is ok, because the source of MIDletAgent class
> doesn't contain definition of an anonymous class.
>
> Then, my exported test runs, and yours fails. Why it need the mysterious
> com/sun/tck/midp/javatest/agent/MIDletAgent$1?...
>
> Vova,
>
> While I continue my investigations, could you send me archived
> directory with exported test? The Ant log seems not be enough for
> understanding what doesn't work.
>
> Thanks,
> Dmitri.
>
> Vladimir Sizikov wrote:
> >>>I'm unable to run the rebuilt exported tests (from Netbeans): the
> >>>phone GUI pops up, but when I click "launch", I get the following
> >>>error in the console:
> >>>
> >>>Uncaught exception java/lang/NoClassDefFoundError:
> >>>com/sun/tck/midp/javatest/agent/MIDletAgent$1.
> >>>
> >>>
> >>I should test it more, but for instant I didn't observed such failure.
> >>If you still have this exported test project, could you send me a
> >>verbosed log from Ant?
> >>
> >
> >Sure. I just send it in private email (in order to avoid any exposure
> >of private info).
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: meframework-unsubscribe@cqme.dev.java.net
> For additional commands, e-mail: meframework-help@cqme.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: meframework-unsubscribe@cqme.dev.java.net
For additional commands, e-mail: meframework-help@cqme.dev.java.net

Dmitri Trounine

Vladimir,

> I'm not sure I agree. The problem I had is one case. Another
> case - what if users add inner clasess to the soruces while
> modifying them? Then, they will not be able to run the tests.
>
> Another use case - user adds a whole new class. Again, he/she will not
> be able to execute such modified tests.
>
> It seems that limitations on the jar update should removed.
>
> What do you think?
>
Agree. The exported build can work without 'class.files' property. If we
don't use 'class.files' and add all compiled classes to the JAR file in
'jar' target, the fix for issue #22 will be much simplier. I'm going to
rework it and send for review today.
Another concerns is that 'class.files' property became useless, may be
it should not be exported at all? I think I'll remove it. It only
reflects the content of originally exported JAR file, and can be
calculated if needed just by doing 'jar tf original.jar | fgrep .class'

Thanks,
Dmitri

---------------------------------------------------------------------
To unsubscribe, e-mail: meframework-unsubscribe@cqme.dev.java.net
For additional commands, e-mail: meframework-help@cqme.dev.java.net

Dmitri Trounine

Vova, all,

Please review the update: http://fisheye4.cenqua.com/changelog/cqme/?cs=929

I decided to keep the code which calculates the list of classes. It just
works and can be reused in future. Any concerns about this?

Thanks,
Dmitri.
Dmitri Trounine wrote:
> Vladimir,
>
>
>> I'm not sure I agree. The problem I had is one case. Another
>> case - what if users add inner clasess to the soruces while
>> modifying them? Then, they will not be able to run the tests.
>>
>> Another use case - user adds a whole new class. Again, he/she will not
>> be able to execute such modified tests.
>>
>> It seems that limitations on the jar update should removed.
>>
>> What do you think?
>>
> Agree. The exported build can work without 'class.files' property. If
> we don't use 'class.files' and add all compiled classes to the JAR
> file in 'jar' target, the fix for issue #22 will be much simplier. I'm
> going to rework it and send for review today.
> Another concerns is that 'class.files' property became useless, may be
> it should not be exported at all? I think I'll remove it. It only
> reflects the content of originally exported JAR file, and can be
> calculated if needed just by doing 'jar tf original.jar | fgrep .class'
>
> Thanks,
> Dmitri
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: meframework-unsubscribe@cqme.dev.java.net
> For additional commands, e-mail: meframework-help@cqme.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: meframework-unsubscribe@cqme.dev.java.net
For additional commands, e-mail: meframework-help@cqme.dev.java.net

Vladimir Sizikov

Dmitri,

On Thu, May 17, 2007 at 10:36:17AM -0700, Dmitri Trounine wrote:
> Vova, all,
>
> Please review the update: http://fisheye4.cenqua.com/changelog/cqme/?cs=929
>
> I decided to keep the code which calculates the list of classes. It just
> works and can be reused in future. Any concerns about this?

Not much (only one question - any performance impact of this to be
present in the code? I'd really like to minimize speed or memory problems).

But please do make all the related APIs private.
Also, toLine() should be made static in both changed files, right?

After that, feel free to commit.

Thanks,
--Vladimir

> Dmitri Trounine wrote:
> >Vladimir,
> >
> >
> >>I'm not sure I agree. The problem I had is one case. Another
> >>case - what if users add inner clasess to the soruces while
> >>modifying them? Then, they will not be able to run the tests.
> >>
> >>Another use case - user adds a whole new class. Again, he/she will not
> >>be able to execute such modified tests.
> >>
> >>It seems that limitations on the jar update should removed.
> >>
> >>What do you think?
> >>
> >Agree. The exported build can work without 'class.files' property. If
> >we don't use 'class.files' and add all compiled classes to the JAR
> >file in 'jar' target, the fix for issue #22 will be much simplier. I'm
> >going to rework it and send for review today.
> >Another concerns is that 'class.files' property became useless, may be
> >it should not be exported at all? I think I'll remove it. It only
> >reflects the content of originally exported JAR file, and can be
> >calculated if needed just by doing 'jar tf original.jar | fgrep .class'
> >
> >Thanks,
> > Dmitri
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: meframework-unsubscribe@cqme.dev.java.net
> >For additional commands, e-mail: meframework-help@cqme.dev.java.net
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: meframework-unsubscribe@cqme.dev.java.net
> For additional commands, e-mail: meframework-help@cqme.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: meframework-unsubscribe@cqme.dev.java.net
For additional commands, e-mail: meframework-help@cqme.dev.java.net

Dmitri Trounine

Vladimir Sizikov wrote:
> Dmitri,
>
> On Thu, May 17, 2007 at 10:36:17AM -0700, Dmitri Trounine wrote:
>
>> Vova, all,
>>
>> Please review the update: http://fisheye4.cenqua.com/changelog/cqme/?cs=929
>>
>> I decided to keep the code which calculates the list of classes. It just
>> works and can be reused in future. Any concerns about this?
>>
>
> Not much (only one question - any performance impact of this to be
> present in the code? I'd really like to minimize speed or memory problems).
>
>
Profiler says that code contributes 0% to overall CPU usage during full
test export run.
> But please do make all the related APIs private.
> Also, toLine() should be made static in both changed files, right?
>
>
Done.
> After that, feel free to commit.
>
>
Thank you for review.
Dmitri.

---------------------------------------------------------------------
To unsubscribe, e-mail: meframework-unsubscribe@cqme.dev.java.net
For additional commands, e-mail: meframework-help@cqme.dev.java.net

Vladimir Sizikov

Dmitri,

On Mon, May 14, 2007 at 07:15:02PM -0700, Dmitri Trounine wrote:
> 1. Issue #118: -- Impossible to compile sources of exported tests
> In this update the original JAR file is put on classpath for compilation
> and preverification. Structure of exported build was lightly improved.
>
> http://fisheye4.cenqua.com/changelog/cqme/branches/users/dtrounine/testE...

This one looks good.

Will continue to review the others.

Thanks,
--Vladimir

---------------------------------------------------------------------
To unsubscribe, e-mail: meframework-unsubscribe@cqme.dev.java.net
For additional commands, e-mail: meframework-help@cqme.dev.java.net