Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] automating ajde tests

I've updated the harness so all the compiler tests can be driven using AJDE, by
implementing an ICommand wrapper for AJDE.  Since AJDE wraps the ajc compiler,
the results should be the same.

One difference is that AJDE can do a fresh rebuild of the same build configuration,
as Jim pointed out:

> The only testing that I've done for incremental compilation is based on the command-line
> compiler where the only way to do a full re-build after the first build is by ending the
> process and starting the compiler again.

This is supported in the harness by enabling "fresh" in an inc-compile step.  You can also
specify the special tag "same" to avoid updating any files.  Here's an example adapted from
tests/ajcHarnessTests.xml that does a compile, incremental compile, and fresh rebuild:

    <ajc-test dir="harness" title="rebuild fresh">
        <compile options="-incremental" sourceroots="sourceroot-inc"/>
        <run class="packageOne.Main"/>
        <inc-compile tag="22"/>
        <run class="packageOne.Main"  options="new-event"/>
        <inc-compile tag="same" fresh="true" />
        <run class="packageOne.Main"  options="new-event"/>
    </ajc-test>

To run the harness with the AJDE compiler, specify -ajdeCompiler.

For more information on this implementation, see the documentation at

   tests/readme-writing-compiler-tests.html

We should consider writing a verifier that checks the structure model
generated during the compile (as we have now for compiler messages and
directory changes).  The current AJDE tests require traversing a model
programmatically, so it's hard to write lots of tests.  It would be better to
write specifications ("expecting after returning advice X on that constructor Y")
so a library could handle the actual navigation (and the changes in the structure
model we expect in the 1.1-1.2 time frame).

If the AJDT folks want to write their own wrapper and drive AJDT using
the harness, check out org.aspectj.testing.ajde.CompileCommand and
let me know...

Wes




Back to the top