RFC: Adding support for a new tag to a Mauve test tool

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

RFC: Adding support for a new tag to a Mauve test tool

Pavel Tisnovsky
Hi all,

I'd like to add support for a new tag to a Mauve test tool. This tag is named "CompileOptions:"
and could be used to add specific command line options passed to a compiler (it's different
behavior from changing compiler options globally).

Usage (in the test - btw: its compatible with ECJ and OpenJDK too):

// Tags: CompileOptions: -source 1.4

or just:

// CompileOptions: -source 1.4

because the "Tags:" prefix is not checked (it's true for other tags too - I'm not sure if its
a bug or a feature of Mauve test tool :-).

Unified diff for Harness.java is stored in an attachment.

Could anybody look at this change please?

Thank you in advance,
Pavel

Harness.diff (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: RFC: Adding support for a new tag to a Mauve test tool

Pavel Tisnovsky
Andii Hughes wrote:

> On Jan 13, 2012 11:55 AM, "Pavel Tisnovsky" <[hidden email]
> <mailto:[hidden email]>> wrote:
>>
>> Hi all,
>>
>> I'd like to add support for a new tag to a Mauve test tool. This tag
> is named "CompileOptions:"
>> and could be used to add specific command line options passed to a
> compiler (it's different
>> behavior from changing compiler options globally).
>>
>> Usage (in the test - btw: its compatible with ECJ and OpenJDK too):
>>
>> // Tags: CompileOptions: -source 1.4
>>
>> or just:
>>
>> // CompileOptions: -source 1.4
>>
>> because the "Tags:" prefix is not checked (it's true for other tags
> too - I'm not sure if its
>> a bug or a feature of Mauve test tool :-).
>>
>> Unified diff for Harness.java is stored in an attachment.
>>
>> Could anybody look at this change please?
>>
>
> I've no objection to the change as it stands, but I seem to remember
> there already being support for handling different Java versions (at
> least, I remember writing versions in comments).  Have you checked there
> isn't already a way of doing this?

Hi Andrew,

partially yes, it's possible to specify target JDK version in a tag.
For example:
// Tags: JDK1.4

(and I'm glad this tag exists due to changes in standard API)

But this tag is not used by the Harness tool itself. It's supported only
by Ant-related tool which can select (filter/grep) only the tests
with specified JDK versions and compile/run them. But even if the test
is select by this Ant-tool, there's no way (AFAIK) how to specify
command line flags passed to the compiler. But in some (minor) cases
it's useful to be able to specify -source, -target, -bootclasspath or
something similar.

Btw: The mentioned Ant-tool (or are such thing called "plugin"?) is stored
in mauve/gnu/anttask

>
>> Thank you in advance,
>> Pavel
>

Reply | Threaded
Open this post in threaded view
|

Re: RFC: Adding support for a new tag to a Mauve test tool

ahughes-2
On 10:22 Mon 16 Jan     , Pavel Tisnovsky wrote:

> Andii Hughes wrote:
> > On Jan 13, 2012 11:55 AM, "Pavel Tisnovsky" <[hidden email]
> > <mailto:[hidden email]>> wrote:
> >>
> >> Hi all,
> >>
> >> I'd like to add support for a new tag to a Mauve test tool. This tag
> > is named "CompileOptions:"
> >> and could be used to add specific command line options passed to a
> > compiler (it's different
> >> behavior from changing compiler options globally).
> >>
> >> Usage (in the test - btw: its compatible with ECJ and OpenJDK too):
> >>
> >> // Tags: CompileOptions: -source 1.4
> >>
> >> or just:
> >>
> >> // CompileOptions: -source 1.4
> >>
> >> because the "Tags:" prefix is not checked (it's true for other tags
> > too - I'm not sure if its
> >> a bug or a feature of Mauve test tool :-).
> >>
> >> Unified diff for Harness.java is stored in an attachment.
> >>
> >> Could anybody look at this change please?
> >>
> >
> > I've no objection to the change as it stands, but I seem to remember
> > there already being support for handling different Java versions (at
> > least, I remember writing versions in comments).  Have you checked there
> > isn't already a way of doing this?
>
> Hi Andrew,
>
> partially yes, it's possible to specify target JDK version in a tag.
> For example:
> // Tags: JDK1.4
>
> (and I'm glad this tag exists due to changes in standard API)
>
> But this tag is not used by the Harness tool itself. It's supported only
> by Ant-related tool which can select (filter/grep) only the tests
> with specified JDK versions and compile/run them. But even if the test
> is select by this Ant-tool, there's no way (AFAIK) how to specify
> command line flags passed to the compiler. But in some (minor) cases
> it's useful to be able to specify -source, -target, -bootclasspath or
> something similar.
>
> Btw: The mentioned Ant-tool (or are such thing called "plugin"?) is stored
> in mauve/gnu/anttask
>
> >
> >> Thank you in advance,
> >> Pavel
> >
>
Ok, if there are cases other than source/target, then it makes sense to
have a general 'append to command-line' option.  I was just checking we
wouldn't end up with duplicate features.
--
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07

signature.asc (853 bytes) Download Attachment