From e7a312263a14d8fe60b25c775174331b66431311 Mon Sep 17 00:00:00 2001 From: wisberg Date: Wed, 7 May 2003 04:09:40 +0000 Subject: [PATCH] updated test-writing docs for AJDE fresh incremental builds. --- tests/readme-writing-compiler-tests.html | 57 +++++++++++++++++++++--- 1 file changed, 50 insertions(+), 7 deletions(-) diff --git a/tests/readme-writing-compiler-tests.html b/tests/readme-writing-compiler-tests.html index bf8f35225..44e9d50ca 100644 --- a/tests/readme-writing-compiler-tests.html +++ b/tests/readme-writing-compiler-tests.html @@ -126,7 +126,37 @@ Here's an example that </ajc-test> -Attributes of note for setting up an incremental test: +To understand what's happening in this test would require +looking at the source directory to see which files are tagged +"20" and "30". But before walking through that, there's a +variation of incremental building for AJDE. (The AJDE wrapper +around the ajc compiler can also be driven by the +test harness.) + +

+In AJDE, incremental tests also involve the notion of "fresh builds", +i.e., when the test reuses the same compiler and build configuration +but rebuilds from scratch. In that case, there is still the +question of whether source files should be updated; if not, +the tag can have the special value "same". For example, if +the last example had two more lines: +

+        ...
+        <inc-compile tag="30"/>
+        <run class="Main"/>
+        
+        <inc-compile fresh="true" tag="same"/>
+        <run class="Main"/>
+    </ajc-test>
+
+The test would complete by completely rebuilding the same files +and then running the main class. This option has no effect on +the normal (ajc) compiler, and requires specifying +-ajdeCompiler to the harness or compile step +as an argument. +

+ +To recap the attributes of note for setting up incremental tests:

-Thus, to understand what's happening in an incremental test -requires comparing the tags with the files specified in -the test source directory. -For example, here is a directory layout for the test above: +Now, to get back to the question of +what exactly is happening in an incremental test. To do so, +compare the tags with the files specified in +the test source directory; the tagged files are the updates +for that particular step. (By convention the tags are numeric +and in order, but they need not be.) +For example, here are some sources for the test above:

     {some dir}
         {testDefinition}.xml
@@ -170,7 +212,8 @@ For example, here is a directory layout for the test above:
             Main.java
             NewFile.30.java
 
-The result will be one compile and two re-compiles: +Comparing this with the test specification, you can see +the harness will run one compile and two re-compiles:
  1. Initially compile Main.java and DeleteMe.java
    -- 
    2.39.5