]> source.dussan.org Git - aspectj.git/commitdiff
adding ant script to build AspectJ sources using AspectJ as a test
authorwisberg <wisberg>
Tue, 6 May 2003 05:03:38 +0000 (05:03 +0000)
committerwisberg <wisberg>
Tue, 6 May 2003 05:03:38 +0000 (05:03 +0000)
listed test in release-testing.txt
using spaces to avoid tab differences in release-testing.txt

build/readme-build-and-test-aspectj.html
build/release-checklist.txt
tests/product/build-aspectj/build.xml [new file with mode: 0644]

index e7829c6581fa84d178ec9081327fe8a07488a053..6a9880bd78a9524bbb4823ef2722a98d89121dc2 100644 (file)
@@ -307,8 +307,12 @@ For bug fixes, associated tests in
 
 <p>Before a release, run the release tests as described in
   <a href="../tests/readme-release-tests.html">
-           ../tests/readme-release-tests.html</a>.
-                      
+           ../tests/readme-release-tests.html</a>
+  (deprecated? using:
+  <a href="../build/release-checklist.txt">
+           ../build/release-checklist.txt</a>).
+  
+                                 
 <h4>Release completion</h4>
 When the release build is accepted,
 tag the tree with the release version
index 68b77ea41e023c2580c261ed05e1f8cc5374c5cb..47dd2cb1558eeeb7e8bcb70c15fa833b4d1cbbb0 100644 (file)
@@ -8,25 +8,25 @@ save it as part of the release notes on completion.
 Before you begin... you will need:
 ================================================================================
 
-* A JDK v1.4.x         java -fullversion : [                                   ]
-* A JDK v1.3.x      java -fullversion : [                                   ]
-* A 1.1.8 JRE       version :           [                                   ]
-* A Windoze box     OS version :        [                                   ]
-* A Linux box          distribution :      [                                   ]
-* An iMac (nice-to-have) JDK 1.4.x :    [                                   ]
-* Eclipse           version :                  [                                   ]
-
+* A JDK v1.4.x        java -fullversion : [                                   ]
+* A JDK v1.3.x        java -fullversion : [                                   ]
+* A 1.1.8 JRE         version :           [                                   ]
+* A Windoze box       OS version :        [                                   ]
+* A Linux box         distribution :      [                                   ]
+* An iMac (nice-to-have) JDK 1.4.x :      [                                   ]
+* Eclipse            version :            [                                   ]
+  
 * A pair of scissors (get an adult to help you with these)
 * Some sticky-backed plastic
 
-OK, so the last two aren't strictly necessary, but they always seem to come in
+OK, so the last three aren't strictly necessary, but they always seem to come in
 useful on the telly.
 
 Extraction:
 ================================================================================
 
 * Full CVS extract of org.aspectj/modules                               [   ]
-       date and time of extract :          [                                   ]
+    date and time of extract :          [                                   ]
 
 Preparation:
 ================================================================================
@@ -35,7 +35,7 @@ Preparation:
    (e.g. releases/aspectj-1.1rc1)
    
 * Save a copy of this file there as package-and-test-notes.txt          [   ]
-       
+    
 * Edit build/build-properties.xml and set the version properties for this
   release                                                               [   ]
   
@@ -45,7 +45,7 @@ Preparation:
       <property name="build.version.base"  value="1.1"/> 
       <property name="build.version.long"  value="1.1 release candidate 1"/> 
       <property name="build.version.short" value="1.1rc1"/> 
-       
+       
 * Edit org.aspectj.ajdt.core/src/org.aspectj.ajdt.ajc/messages.properties and
   set the version properties for this release                           [   ]
   
@@ -58,15 +58,15 @@ Preparation:
   ### miscellaneous
   misc.usage = AspectJ Compiler 1.1 release candidate 1\n\
   ...
-       
+    
 Build:
 ================================================================================
 
 * Ensure JAVA_HOME is set to point to your 1.3 JDK                      [   ]
-        echo $JAVA_HOME           [                                                ]
-        
-        (even when you "Run Ant..." from eclipse, the value of JAVA_HOME is 
-        used rather than the JRE specified in your Eclipse settings).
+     echo $JAVA_HOME       [                                                ]
+     
+     (even when you "Run Ant..." from eclipse, the value of JAVA_HOME is 
+     used rather than the JRE specified in your Eclipse settings).
 
 * When running ant, use the version in modules/lib/ant,
   i.e., modules/lib/ant/bin/ant                                         [   ]
@@ -74,17 +74,17 @@ Build:
 * Run ant on build/build.xml :
 
     $ cd build
-       $ ant clean                                                                 [   ]
-       $ ant fail-unless-boot-libraries-uptodate                           [   ]
-       $ ant                                                                       [   ]
-       
+    $ ant clean                                                         [   ]
+    $ ant fail-unless-boot-libraries-uptodate                           [   ]
+    $ ant                                                               [   ]
+    
 * Save the build output (console log) as build-<version>.log.txt        [   ]
-       (e.g. build-1.1rc1.log.txt)
-       
+    (e.g. build-1.1rc1.log.txt)
+    
 * Save the built jar to the releases directory                          [   ]
   (releases/aspectj-<version>)
 
-* Verify name is aspectj-<version>.jar                                  [   ]                         
+* Verify name is aspectj-<version>.jar                                  [   ]
 
 
 Pre-installation tests:
@@ -117,20 +117,20 @@ Pre-installation tests:
 
     Do:
 
-       $ {harness} -release -logFail ajcTests.xml                          [   ]
+      $ {harness} -release -logFail ajcTests.xml                        [   ]
   
     -- save results in ajcTests-result-<version>-JDK13.txt              [   ]
-       (e.g. ajcTests-result-1.1rc1-JDK13.txt)
+        (e.g. ajcTests-result-1.1rc1-JDK13.txt)
   
-       -- record any failures (should be none) inline here.
-       
-       $ {harness} -release -logFail -emacssym ajcTests.xml                [   ]
+      -- record any failures (should be none) inline here.
+      
+      $ {harness} -release -logFail -emacssym ajcTests.xml              [   ]
 
     -- save results in ajcTests-result-<version>-emacssym-JDK13.txt     [   ]
-       (e.g. ajcTests-result-1.1rc1-emacssym-JDK13.txt)
+        (e.g. ajcTests-result-1.1rc1-emacssym-JDK13.txt)
   
-       -- record any failures (should be none) inline here.
-                           
+      -- record any failures (should be none) inline here.
+                  
 * run Harness tests on the 1.4 vm:
 
     Where {harness} is
@@ -140,20 +140,20 @@ Pre-installation tests:
 
     Do:
 
-       $ {harness} -release -logFail ajcTests.xml                          [   ]
+      $ {harness} -release -logFail ajcTests.xml                        [   ]
   
     -- save results in ajcTests-result-<version>-JDK14.txt              [   ]
-       (e.g. ajcTests-result-1.1rc1-JDK14.txt)
+        (e.g. ajcTests-result-1.1rc1-JDK14.txt)
   
-       -- record any failures (should be none) inline here.
-       
-       $ {harness} -release -logFail -emacssym ajcTests.xml                [   ]
+      -- record any failures (should be none) inline here.
+      
+      $ {harness} -release -logFail -emacssym ajcTests.xml              [   ]
 
     -- save results in ajcTests-result-<version>-emacssym-JDK14.txt     [   ]
-       (e.g. ajcTests-result-1.1rc1-emacssym-JDK14.txt)
+        (e.g. ajcTests-result-1.1rc1-emacssym-JDK14.txt)
   
-       -- record any failures (should be none) inline here.
-                               
+      -- record any failures (should be none) inline here.
+                      
 * run Harness on ajcTestsFailing.xml
 
     Where {harness} is
@@ -163,26 +163,26 @@ Pre-installation tests:
 
     Do:
 
-       $ {harness} -release -logFail ajcTestsFailing.xml                   [   ]
+      $ {harness} -release -logFail ajcTestsFailing.xml                 [   ]
   
     -- save results in ajcTestsFailing-result-<version>-JDK13.txt       [   ]
-       (e.g. ajcTestsFailing-result-1.1rc1-JDK13.txt)
+        (e.g. ajcTestsFailing-result-1.1rc1-JDK13.txt)
   
-       -- record any failures inline here (should be none. ajcTestsFailing 
-          should be empty for a final release.  Known exceptions are
-          permissible for a non-final release.)
-          
-       
+      -- record any failures inline here (should be none. ajcTestsFailing 
+         should be empty for a final release.  Known exceptions are
+         permissible for a non-final release.)
+         
+      
 Installation & Verification Tests
 ================================================================================
 
 * install from aspectj-<version>.jar as built above
 
-       - verify version number and build date on splash screen             [   ]
-       
-       - save screenshot of splash screen (not essential) as               [   ]
-               Installer-Splash-Screen.bmp (file format may vary)   
-               
+    - verify version number and build date on splash screen             [   ]
+    
+    - save screenshot of splash screen (not essential) as               [   ]
+        Installer-Splash-Screen.bmp (file format may vary)   
+        
 * verify directory structure created ok                                 [   ]
 
 * check version in README-AspectJ.html                                  [   ]
@@ -198,34 +198,34 @@ Installation & Verification Tests
 * from doc/examples, run "ant", verify spacewar builds and runs ok      [   ]
 
 * in doc/examples, build ant targets as follows:
-       - bean                                                              [   ]
-       - intro                                                             [   ]
-       - intro-clone                                                       [   ]
-       - intro-compare                                                     [   ]
-       - intro-hash                                                        [   ]
-       - observer                                                          [   ]
-       - spacewar                                                          [   ]
-       - spacewar-demo                                                     [   ]
-       - telecom                                                           [   ]
-       - telecom-billing                                                   [   ]
-       - telecom-timing                                                    [   ]
-       - tjp                                                               [   ]
-       - tracing-1                                                         [   ]
-       - tracing-2                                                         [   ]
-       - tracing-3                                                         [   ]
-       - tracing-bc                                                        [   ]
-       - tracing-none                                                      [   ]
+    - bean                                                              [   ]
+    - intro                                                             [   ]
+    - intro-clone                                                       [   ]
+    - intro-compare                                                     [   ]
+    - intro-hash                                                        [   ]
+    - observer                                                          [   ]
+    - spacewar                                                          [   ]
+    - spacewar-demo                                                     [   ]
+    - telecom                                                           [   ]
+    - telecom-billing                                                   [   ]
+    - telecom-timing                                                    [   ]
+    - tjp                                                               [   ]
+    - tracing-1                                                         [   ]
+    - tracing-2                                                         [   ]
+    - tracing-3                                                         [   ]
+    - tracing-bc                                                        [   ]
+    - tracing-none                                                      [   ]
 
 * With aspectjtools.jar in the ant/lib directory, also build
-       - tracing-adapter                                                   [   ]
-       - tracing-adapter-ajc                                               [   ]
+    - tracing-adapter                                                   [   ]
+    - tracing-adapter-ajc                                               [   ]
 
 
 * run pre-compiled version of spacewar on a 1.1.8 vm                    [   ]
 
 * verify debug info included in class files
-       - "javap -l org.aspectj.tools.ajc.Main" under jdk 1.4 or later      [   ]
-       
+    - "javap -l org.aspectj.tools.ajc.Main" under jdk 1.4 or later      [   ]
+    
 * verify manual dates correct in docs                                   [   ]
 
 * verify api docs present and correct                                   [   ]
@@ -236,7 +236,10 @@ Product Testing
 These tests are a bit more rigorous and time-consuming. 
 Run at your discretion
 
-* Build AspectJ using AspectJ                                           [   ]
+* Compile AspectJ sources using AspectJ                                 [   ]
+
+  cd tests/product/build-aspectj
+  ant
 
 * Perform steps specified in the Development Guide on AJBrowser         [   ]
 
@@ -260,12 +263,12 @@ Cross-Platform Testing
 Bug database
 ================================================================================
 
-* No P1 or P2 bugs, and no lower bugs that should be P1/P2               [   ]
+* No P1 or P2 bugs, and no lower bugs that should be P1/P2              [   ]
 
-* All fixed bugs verified (at least by fixing developer,                 [   ]
+* All fixed bugs verified (at least by fixing developer,                [   ]
   though preferably with a test case)
 
-* Please comment if there are compiler fixes without test cases          [   ]
+* Please comment if there are compiler fixes without test cases         [   ]
 
 
 Other Release Objectives
@@ -296,6 +299,6 @@ Once developer consensus is reached on the build:
 * post link on download page                                            [   ]
 
 * post announce message to aspectj-users, aspectj-announce,
-       aosd-discuss, aosd-announce                                         [   ]
+    aosd-discuss, aosd-announce                                         [   ]
 
 * buy beer                                                              [   ]
diff --git a/tests/product/build-aspectj/build.xml b/tests/product/build-aspectj/build.xml
new file mode 100644 (file)
index 0000000..e1007c2
--- /dev/null
@@ -0,0 +1,219 @@
+
+<!-- ========================================================================= -->
+<!-- Copyright (c) 2003 Contributors.                                          -->
+<!-- All rights reserved.                                                      -->
+<!-- This program and the accompanying materials are made available            -->
+<!-- under the terms of the Common Public License v1.0                         -->
+<!-- which accompanies this distribution and is available at                   -->
+<!-- http://www.eclipse.org/legal/cpl-v10.html                                 -->
+<!--                                                                           -->
+<!-- Contributors:                                                             -->
+<!--     Isberg     initial implementation                                 -->
+<!-- ========================================================================= -->
+
+<project name="build-aspectj-using-aspectj" default="all" basedir=".">
+
+    <target name="info" >
+      <echo>
+  This script tests the AspectJ tools and runtime
+  by building the AspectJ sources.  When run, this should
+  finish by emitting the ajc help message.
+
+  Relevant targets:
+     all             build and test runtime and tools
+     tools           build output/aspectjtools.jar
+     runtime         build output/aspectjrt.jar
+     build-tools-javac build using javac to output
+
+  Setup:
+
+  Variables ASPECTJ_HOME and ASPECTJ_SRC refer to the 
+  base of an AspectJ install and the modules directory 
+  of the AspectJ source tree.  By default they are
+  
+    ASPECTJ_SRC:  $${basedir}/../..
+    ASPECTJ_HOME: $${basedir}/../../aj-build/dist/tools
+  
+  which assumes the tools dist is built and this
+  runs from modules/tests/product/build-aspectj
+       
+  You can also define the properties to run on any
+  distribution from anywhere:
+       
+    ant -DASPECTJ_HOME=dev/tools/aj -DASPECTJ_SRC=ec
+
+      </echo>
+    </target>
+
+    <!-- ============================================================= -->
+    <!-- setup and cleanup targets                                     -->
+    <!-- ============================================================= -->
+
+    <target name="clean" depends="init"
+     description="clean and create output dir">
+      <delete quiet="on" dir="${output.dir}"/>
+      <mkdir dir="${output.dir}"/>
+    </target>
+
+    <target name="init"  depends="init.variables,init.taskdefs"/>
+
+    <target name="init.variables" 
+     description="init variables">
+     
+      <property name="verbose" value="false"/>
+
+      <!-- build.compiler value to pick up our CompilerAdapter for javac -->
+      <property name="ajc.adapter"
+                  value="org.aspectj.tools.ant.taskdefs.Ajc11CompilerAdapter"/>
+
+      <!-- required directories - run from examples or predefine -->
+      <property name="ASPECTJ_SRC"
+            location="${basedir}/../../.."/> 
+
+      <property name="ASPECTJ_HOME"
+            location="${basedir}/../../../aj-build/dist/tools"/> 
+
+      <property name="aspectj.lib.dir"
+            location="${ASPECTJ_HOME}/lib"/> 
+
+      <!-- required libraries - install or predefine -->
+      <property name="aspectjrt.jar"
+            location="${aspectj.lib.dir}/aspectjrt.jar"/> 
+      <property name="aspectjtools.jar"
+            location="${aspectj.lib.dir}/aspectjtools.jar"/> 
+
+      <!-- created directories -->
+      <property name="output.dir"
+            location="${basedir}/output"/> 
+
+      <!-- checking required libraries -->
+      <available file="${aspectjtools.jar}"
+             property="aspectjtools.jar.available"/>
+      <available file="${aspectjrt.jar}"
+             property="aspectjrt.jar.available"/>
+
+         <property name="aspectj.src"
+                   location="${ASPECTJ_SRC}"/>
+
+         <property name="output.aspectjtools"
+               location="${output.dir}/aspectjtools.jar"/>
+               
+         <property name="output.aspectjrt"
+               location="${output.dir}/aspectjrt.jar"/>
+
+      <available file="${aspectj.src}"
+               property="aspectj.src.available"/>
+               
+               <path id="runtime.roots">
+                       <pathelement path="${aspectj.src}/runtime/src"/>
+               </path>
+               
+               <path id="tools.roots">
+                       <pathelement path="${aspectj.src}/ajbrowser/src"/>
+                       <pathelement path="${aspectj.src}/ajde/src"/>
+                       <pathelement path="${aspectj.src}/asm/src"/>
+                       <pathelement path="${aspectj.src}/bridge/src"/>
+                       <pathelement path="${aspectj.src}/org.aspectj.ajdt.core/src"/>
+                       <pathelement path="${aspectj.src}/taskdefs/src"/>
+                       <pathelement path="${aspectj.src}/util/src"/>
+                       <pathelement path="${aspectj.src}/weaver/src"/>
+               </path>
+               
+               <path id="tools.libs">
+                       <pathelement path="${aspectj.src}/lib/ant/lib/ant.jar"/>
+                       <pathelement path="${aspectj.src}/lib/bcel/bcel.jar"/>
+                       <pathelement path="${aspectj.src}/org.eclipse.jdt.core/jdtcore-for-aspectj.jar"/>
+               </path>
+    </target>
+
+    <target name="init.taskdefs" depends="init.variables, 
+         aspectjtools.jar.available,
+         aspectjrt.jar.available,
+         aspectj.src.available"
+         unless="taskdefs.init">
+      <taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
+          <classpath> 
+            <pathelement path="${aspectjtools.jar}"/> 
+          </classpath>
+      </taskdef>
+         <property name="taskdefs.init" value="true"/>
+    </target>
+
+    <!-- targets to fail unless required libraries available -->
+
+    <target name="aspectjrt.jar.available" depends="init.variables" 
+          unless="aspectjrt.jar.available" >
+      <fail message="expecting aspectjrt.jar at ${aspectjrt.jar}"/>
+    </target>
+
+    <target name="aspectjtools.jar.available" depends="init.variables" 
+          unless="aspectjtools.jar.available" >
+      <fail message="expecting aspectjtools.jar at ${aspectjtools.jar}"/>
+    </target>
+
+    <target name="aspectj.src.available" depends="init.variables" 
+          unless="aspectj.src.available" >
+      <fail message="expecting aspectj sources at ${aspectj.src}"/>
+    </target>
+       
+    <target name="all">
+               <antcall target="clean" />
+               <antcall target="runtime"/>
+               <antcall target="tools"/>
+    </target>
+    
+    <target name="runtime">
+               <antcall target="build-runtime"/>
+               <antcall target="test-runtime"/>
+    </target>
+    
+    <target name="tools">
+               <antcall target="build-tools"/>
+               <antcall target="test-tools"/>
+    </target>
+
+    <target name="build-runtime" depends="init">
+       <iajc outjar="${output.aspectjrt}"
+          classpath="${aspectjrt.jar}"
+          sourcerootsref="runtime.roots"/>
+    </target>
+    
+    <target name="test-runtime" depends="init">
+               <echo message="test-runtime not implemented"/>
+    </target>
+    
+    <target name="build-tools" depends="init">
+       <iajc outjar="${output.aspectjtools}"
+                       verbose="${verbose}"
+                       sourcerootsref="tools.roots"
+                       sourcerootcopyfilter="**/CVS/*,**/*.java,**/*.aj">
+                       <classpath>
+                               <pathelement path="${aspectjrt.jar}"/> <!-- bootstrap problem... -->
+                               <path refid="tools.libs"/>
+                       </classpath>       
+       </iajc>
+    </target>
+
+    <target name="test-tools" depends="init">
+       <java classname="org.aspectj.tools.ajc.Main">
+         <classpath>
+               <path refid="tools.libs"/>
+            <pathelement path="${output.aspectjtools}"/> 
+         </classpath>
+         <arg value="-help"/>
+       </java>
+    </target>
+
+    <target name="build-tools-javac" depends="init">
+       <javac verbose="${verbose}" includes="**/*.java"
+               destdir="${output.dir}">
+               <src>
+                       <path refid="tools.roots"/>
+               </src>
+               <classpath>
+                       <pathelement path="${aspectjrt.jar}"/> 
+                       <path refid="tools.libs"/>
+               </classpath>       
+       </javac>
+    </target>
+</project>