On 9/1/06, Andrew Zhang wrote:
On 8/31/06, Mikhail Loenko wrote:
> 2006/8/30, Stepan Mishura :
> > On 8/30/06, Andrew Zhang wrote:
> >
> > > On 8/30/06, Stepan Mishura <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I was browsing thought logging tests and realized that running
> logging
> > > > test
> > > > suite cause updates of tested JRE configuration.
> > > > The ant script changes jre/lib/logging.properties file by:
> > > >
> > > > <target name="copy.resources">
> > > > <copy todir="${hy.jdk}/jre/lib" overwrite="yes"
> flatten="yes">
> > > > <fileset dir="${hy.logging.src.main.java}">
> > > > <include name="**/logging.properties" />
> > > > </fileset>
> > > > </copy>
> > > > </target>
> > > >
> > > > I do believe that we shouldn't do testing in this way - if a test
> > > requires
> > > > special env. configuration(different from JRE's default) the test
> suite
> > > > shouldn't *hack* JRE config files. We should consider dynamic env.
> > > > reconfiguration. For example, for this particular case is there
any
> > > > problem
> > > > with using LogManager.readConfiguration(InputStream) to
reinitialize
> the
> > > > logging properties?
> > >
> > >
> > > Yes, they're different. :-) Static first initialization acts
> differently
> > > from readConfiguration if you take a look at the source code. :)
> >
> >
> > Could you describe in few words what is the difference?
> >
> >
> >
> > > But I do agree that we should not change jre config in this way! I
> > > suggest
> > > solve this problem in following way:
> > > 1. backup jre default logging.properties in ant before running
logging
> > > test.
> > >
> > > 2. copy test logging.properties to jre before running logging test.
> > > 3. restore jre config when logging test ends.
> > >
> > > Make senses?
> >
> >
> > I'd prefer not touch JRE files at all. For example, what if the suite
> run
> > is interrupted in the middle? I'm not quite comfort if Harmony test
> suite
> > touches RI's config files on my local disk.
>
> +1
>
> I'm also not quite comfort if Harmony testsuite touches any files on my
> disk
> out of the sandbox where the project sits.
>
> also I'd not be happy if it formats my disks or sends messages from my
> account.
If Harmony would potientially format my disk, I'll remove it from my disk
right away. :)
Don't hurry! We may provide a test suite with three pop-up windows that
appears one after another:-)
1) These tests may format your disk. Proceed? (Yes/No)
2) Are you sure that you want to run tests tests anyway? (Yes/No)
3) This is your last chance! Cancel? (Yes/No)
Thanks,
Stepan.
Thanks,
> Mikhail
>
> >
> > Thanks,
> > Stepan.
> >
> >
> >
> > > Also keep in mind that the test suite is expected to be run against
> some
> > > > compatible implementation. I think nobody is going to reinstall
> Sun's
> > > JRE
> > > > each time after running Harmony test suite.
> > >
> > >
> > > Agreed. :-)
> > >
> > > --
> > > Andrew Zhang
> > > China Software Development Lab, IBM
> > >
------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]