From 57129e35ce37754f06d118f129e60dcda6ef240e Mon Sep 17 00:00:00 2001 From: wisberg Date: Thu, 13 Mar 2003 02:54:32 +0000 Subject: upgraded for new resource-copying API's and also testing nested paths and refid's. --- taskdefs/testdata/incTest/incTest.xml | 80 +++++++++++++++++++++++++-- taskdefs/testdata/incTest/readme-incTest.html | 63 ++++++++++++++++----- 2 files changed, 124 insertions(+), 19 deletions(-) diff --git a/taskdefs/testdata/incTest/incTest.xml b/taskdefs/testdata/incTest/incTest.xml index 615cac04d..5e050302c 100644 --- a/taskdefs/testdata/incTest/incTest.xml +++ b/taskdefs/testdata/incTest/incTest.xml @@ -1,6 +1,14 @@ + + + + + + + + @@ -21,16 +29,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sourceroots="${test.dir}/injarSrc/one" + failonerror="true"/> + sourceroots="${test.dir}/injarSrc/two" + failonerror="true"/> - + - diff --git a/taskdefs/testdata/incTest/readme-incTest.html b/taskdefs/testdata/incTest/readme-incTest.html index 70dbd9a37..1098a7dc8 100644 --- a/taskdefs/testdata/incTest/readme-incTest.html +++ b/taskdefs/testdata/incTest/readme-incTest.html @@ -2,17 +2,31 @@ Incremental test of AjcTask Ant task

Incremental test of AjcTask Ant task

-This directory contains files for manually testing the -incremental behavior of the AjcTask Ant task. -It has an Ant script which builds two input jars +This directory contains files for manually testing +two AjcTask Ant task facilities: +
    +
  • incremental builds, using tag file or input stream + (supported directly by the compiler) +
  • +
  • resource copying using input jars or source roots + and output jar or directory + (only supported in the Ant task). +
  • +
+ +incTest.xml +is an Ant script which builds two input jars and runs an incremental test using a tag file.

The results must be verified by hand manually at present; -This test should be updated to run automatically. +This test should be updated to run using JUnit like + + AjcTaskTest.java. +

Sample procedure

This shows how to set up the test and check whether -the incremental tag file and injar-copying features work. +the incremental tag file and resource-copying features work. Throughout, {ant} is assumed to be ../../../lib/ant/bin/ant and the directory is assumed to be this directory, with the Ant build script @@ -49,11 +63,14 @@ The task will do an initial compilation and silently wait. the execution of any static main(String[]) method.

-

  • Also test that the injar files were copied to the output jar. - The non-.class files in injarSrc/ - should be included in the output jar: +
  • Check that the output jar got the injar and src files: +
      jar tf output/outjar.jar

    + The output should list the + non-.class files in injarSrc/ + and the non CVS/.java files in the src/ dir. +

  • To test incremental compiles, edit the aspect src/TraceMains.java @@ -65,18 +82,33 @@ The task will do an initial compilation and silently wait.
  • Test the generated output jar again to see if the changes are reflected in the runtime behavior - and if the non-.class files are being copied correctly. + and if files are being copied correctly.

  • Repeat this process until satisfied. Delete the tagfile to quit:
      rm output/tagfile.txt

  • +
  • Also run the targets test-all +and test-both. +

    +

  • -To test the -incremental option or to test without -copying input jar files or using an output jar, edit the -incTest.xml script and redo the test. +Many combination of the option variants are possible. +Test the relevant ones by editing the +incTest.xml script +and redoing the test. +

    + + + + + + + +
    OptionVariants
    incrementalnone, -incremental, -tagFile
    outputnone (default "."), destDir, output jar
    injarsnone, one, two
    injar copyingoff (default), on
    source resource copyingoff (default), various patterns
    +

    Clean-up

    @@ -84,14 +116,19 @@ Take care to preserve CVS state after running this test. It calls on you to edit checked-in files and generates files to local repository directories. The best thing is to delete the output and injars directories +(using the clean task) and revert to repository forms for sources (unless fixing them).

    Upgrade

    -This needs to be upgraded to run manually. +This needs to be upgraded to run automatically. There is a file/tree-comparison utility to revive from the aspectj-attic which can be used to compare expected and actual results of the jar files. Setting up the tasks to run incrementally might be done using the parallel task, but... +

    +In any case, the nested options tested here should move +to non-incremental JUnit tests. +


    -- cgit v1.2.3