Changeset 11596


Ignore:
Timestamp:
01/27/09 18:29:01 (13 years ago)
Author:
Mark Evenson
Message:

Invocation of ASDF tests from Lisp via instructions at top of 'abcl.asd' works.

Optimized 'build.xml' run time for typical (repeated) usage scenarios:

o downloading of 'junit.jar' based on presence on filesystem.
o rebuilding of 'abcl.jar' based on explicit check via Ant

Removed automatic execution of ABCL-TESTS based on load.

Ant 'abcl.test' target not working in all situations. Needs further
debugging. Workaround: use the Lisp-based ASDF test entry point for now.

ANSI-TESTS-COMPILED ANSI-TESTS-INTERPRETED need a sibling directory
containing the GCL ANSI tests from
<svn://common-lisp.net/project/ansi-test/svn/trunk/ansi-tests>. They
complain semi-intellibly if not found.

Location:
trunk/abcl
Files:
2 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/abcl.asd

    r11576 r11596  
    11;;; -*- Mode: LISP; Syntax: COMMON-LISP -*-
    22;;; $Id$
     3
     4;;;; To run:
     5;;;;   
     6#|
     7cmd$ abcl
     8CL-USER(1): (progn (require 'asdf)
     9                   (asdf:oos 'asdf:load-op :abcl)
     10                   (asdf:oos 'asdf:test-op :ansi-test-compiled :force t))
     11|#
    312
    413(require 'asdf)
     
    918;;; Wrapper for all ABCL ASDF definitions.
    1019(defsystem :abcl
    11   :version "0.2.0")
     20  :version "0.3.0")
    1221
    1322(defmethod perform :after ((o load-op) (c (eql (find-system 'abcl))))
     
    2130;;; A collection of test suites for ABCL.
    2231(defsystem :test-abcl
     32  :version "0.3"
     33  :depends-on (:ansi-test-compiled :abcl-tests))
    2334
    24   :version "0.3"
    25   :depends-on (:ansi-test-compiled :ansi-test-interpreted))
    26 
    27 (defmethod perform :after ((o test-op) (c (eql (find-system 'test-abcl))))
    28   (asdf:oos 'asdf:load-op :ansi-test-interpreted :force t)
     35(defmethod perform :after ((o load-op) (c (eql (find-system 'test-abcl))))
     36  #+nil (asdf:oos 'asdf:test-op :cl-bench :force t)
     37  #+nil (asdf:oos 'asdf:test-op :abcl-tests :force t)
     38  #+nil (asdf:oos 'asdf:test-op :ansi-test-interpreted :force t)
    2939  (asdf:oos 'asdf:load-op :ansi-test-compiled :force t))
    3040
     
    3646(defsystem :ansi-test-compiled :version "0.1" :depends-on (ansi-test))
    3747
    38 
    3948(defsystem :abcl-tests
    40   :version "1.0"
    41   :components
    42     ((:module rt :serial t  :pathname "test/lisp/abcl/" :components
    43         ((:file "rt-package") (:file "rt") (:file "test-utilities")))
    44      (:module tests :depends-on (rt)
    45         :pathname "test/lisp/abcl/" :components
    46         ((:file "compiler-tests")
    47          (:file "condition-tests")
    48          (:file "file-system-tests")
    49 #+nil        (:file "math-tests")
    50          (:file "java-tests")
    51          (:file "misc-tests")
    52          (:file "pathname-tests")))))
    53 
    54 (defmethod perform ((o test-op) (c (eql (find-system 'abcl-tests))))
    55   "Invoke tests with:  (asdf:operate 'asdf:test-op :abcl-tests)."
    56   (funcall (intern (symbol-name 'do-tests) :test)))
    57 
     49   :version "1.0"
     50   :components
     51     ((:module rt :serial t  :pathname "test/lisp/abcl/" :components
     52        ((:file "rt-package") (:file "rt") (:file "test-utilities")))
     53      (:module tests :depends-on (rt)
     54        :pathname "test/lisp/abcl/" :components
     55        ((:file "compiler-tests")
     56         (:file "condition-tests")
     57         (:file "file-system-tests")
     58 #+nil         (:file "math-tests")
     59         (:file "java-tests")
     60         (:file "misc-tests")
     61         (:file "pathname-tests")))))
     62 
     63 (defmethod perform ((o test-op) (c (eql (find-system 'abcl-tests))))
     64   "Invoke tests with:  (asdf:oos 'asdf:test-op :abcl-tests :force t)."
     65   ;;; FIXME needs ASDF:OOS to be invoked with :FORCE t
     66   (funcall (intern (symbol-name 'do-tests) :test)))
     67 
    5868(defmethod perform ((o test-op) (c (eql (find-system 'ansi-test-interpreted))))
     69   "Invoke tests with:  (asdf:oos 'asdf:test-op :abcl-tests :force t)."
     70   ;;; FIXME needs ASDF:OOS to be invoked with :FORCE t
    5971  (funcall (intern (symbol-name 'run) :abcl.tests.ansi-tests)
    6072     :compile-tests nil))
    6173
    6274(defmethod perform ((o test-op) (c (eql (find-system 'ansi-test-compiled))))
     75  "Invoke tests with:  (asdf:oos 'asdf:test-op :abcl-test-compiled :force t)."
    6376  (funcall (intern (symbol-name 'run) :abcl.tests.ansi-tests)
    6477     :compile-tests t))
  • trunk/abcl/build.xml

    r11590 r11596  
    142142      depends="abcl.init"
    143143      unless="abcl.jsr-223.p">
    144       <echo>Notice: JSR-223 support won't be built since it is not supported, neither natively by your JVM nor by libraries in the CLASSPATH.</echo>
     144      <echo>
     145  Notice: JSR-223 support won't be built since it is not
     146          supported, neither natively by your JVM nor by
     147    libraries in the CLASSPATH.
     148      </echo>
    145149    </target>
    146150
     
    233237    </target>
    234238
    235     <target name="abcl.jar" depends="abcl.stamp">
     239    <target name="abcl.jar.uptodate" depends="abcl.compile">
     240      <uptodate property="abcl.jar.uptodate.p" targetfile="${abcl.jar.path}">
     241  <srcfiles dir="${build.classes.dir}">
     242    <patternset refid="abcl.objects"/>
     243  </srcfiles>
     244      </uptodate>
     245    </target>
     246
     247    <target name="abcl.jar" depends="abcl.stamp,abcl.jar.uptodate"
     248      unless="abcl.jar.uptodate.p">
    236249      <mkdir dir="${dist.dir}"/>
    237250      <loadfile property="abcl.version"
     
    434447    </path>
    435448
    436     <target name="abcl.test.pre-compile">
     449    <target name="abcl.test.pre-compile" depends="abcl.ext"/>
     450
     451    <target name="abcl.ext.p">
     452      <!--XXX generalize over enumeration of all contributions to abcl.ext -->
     453      <available file="${junit-4.5.path}" property="abcl.ext.p"/>
     454    </target>
     455    <target name="abcl.ext" depends="abcl.ext.p" unless="abcl.ext.p">
     456
    437457      <mkdir dir="${abcl.ext.dir}"/>
    438458      <get src="http://downloads.sourceforge.net/junit/junit-4.5.jar?modtime=1218209625"
    439459     usetimestamp="true"
    440     dest="${junit-4.5.path}"/>
     460     dest="${junit-4.5.path}"/>
    441461    </target>
    442462 
    443     <target name="abcl.test.compile" depends="abcl.test.pre-compile,abcl.compile">
     463    <target name="abcl.test.compile"
     464      depends="abcl.test.pre-compile,abcl.compile">
    444465      <mkdir dir="${abcl.test.classes.dir}"/>
    445466      <javac destdir="${abcl.test.classes.dir}"
     
    457478    </path>
    458479
    459     <target name="abcl.test" depends="abcl.test.java,abcl.test.lisp"/>
     480    <target name="abcl.test"
     481      depends="abcl.test.java,abcl.test.lisp"/>
    460482 
    461483    <target name="abcl.test.java" depends="abcl.test.compile">
     
    467489    </target>
    468490
    469     <target name="abcl.test.lisp" depends="abcl.test.lisp.asdf"/>
    470 
    471     <target name="abcl.test.lisp.asdf" depends="abcl.jar,abcl.test.ansi.interpreted">
     491    <target name="abcl.test.lisp"
     492      depends="abcl.test.lisp.asdf"/>
     493
     494    <target name="abcl.test.lisp.asdf"
     495      depends="abcl.jar,abcl.test.ansi.compiled">
    472496    </target>
    473497
     
    478502  <arg value="--noinit"/>
    479503  <arg value="--load"/>
    480   <arg line="${basedir}/scripts/ansi-tests-interpreted.lisp"/>
    481       </java>
    482     </target>
     504  <arg line="${basedir}/test/lisp/ansi/ansi-tests-interpreted.lisp"/>
     505      </java>
     506    </target>
     507
     508    <property name="abcl.test.log.file"
     509        value="abcl.test.ansi.compiled.${version.src}"/>
    483510
    484511    <target name="abcl.test.ansi.compiled">
     512      <echo>Recording test output in ${abcl.test.log.file}.</echo>
     513      <record name="${abcl.test.log.file}" emacsmode="true" action="start"/>
    485514      <java fork="true" dir="${basedir}"
    486515      classpathref="abcl.classpath.dist"
     
    488517  <arg value="--noinit"/>
    489518  <arg value="--load"/>
    490   <arg line="${basedir}/scripts/ansi-tests-compiled.lisp "/>
    491       </java>
    492     </target>
    493 
     519  <arg line="${basedir}/test/lisp/ansi/ansi-tests-compiled.lisp "/>
     520      </java>
     521      <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
     522      <echo>Finished ecording test output in ${abcl.test.log.file}.</echo>
     523
     524    </target>
    494525
    495526    <import file="netbeans-build.xml" optional="true"/>
  • trunk/abcl/test/lisp/abcl/compiler-tests.lisp

    r11576 r11596  
    432432  :results #.most-positive-java-long)
    433433
    434 (do-tests)
  • trunk/abcl/test/lisp/abcl/condition-tests.lisp

    r11576 r11596  
    311311      (write-to-string c :escape nil)))
    312312  "The bear is armed.")
    313 
    314 (do-tests)
  • trunk/abcl/test/lisp/abcl/file-system-tests.lisp

    r11576 r11596  
    514514       )))
    515515  t t t t)
    516 
    517 (do-tests)
  • trunk/abcl/test/lisp/abcl/java-tests.lisp

    r11576 r11596  
    434434  t)
    435435
    436 (do-tests)
    437 
    438436;;#+allegro
    439437;;(jlinker-end)
  • trunk/abcl/test/lisp/abcl/math-tests.lisp

    r11576 r11596  
    464464  (signals-error (read-from-string "1.0f-1000") 'reader-error)
    465465  t)
    466 
    467 (do-tests)
  • trunk/abcl/test/lisp/abcl/misc-tests.lisp

    r11576 r11596  
    9999  (1 2)
    100100  19)
    101 
    102 (do-tests)
  • trunk/abcl/test/lisp/abcl/pathname-tests.lisp

    r11576 r11596  
    16551655           #+windows "\\foo")
    16561656  t)
    1657 
    1658 (do-tests)
  • trunk/abcl/test/lisp/ansi/package.lisp

    r11537 r11596  
    1717  "Run the ANSI-TESTS suite, found in *ANSI-TESTS-DIRECTORY*.
    1818Possibly running the compiled version of the tests if COMPILE-TESTS is non-NIL."
    19   (let ((original-pathname-defaults *default-pathname-defaults*)
     19  (let* ((original-pathname-defaults *default-pathname-defaults*)
    2020  (ansi-tests-directory *ansi-tests-directory*)
    21   (boot-file (if compile-tests "compileit.lsp" "doit.lsp")))
     21  (boot-file (if compile-tests "compileit.lsp" "doit.lsp"))
     22  (message (format nil "Invocation of '~A' in ~A"
     23             boot-file ansi-tests-directory)))
    2224    (handler-case
    2325  (progn
     
    2527     (merge-pathnames ansi-tests-directory
    2628          *default-pathname-defaults*))
    27     (warn
    28      (format nil "Speculative invocation of '~A' in ~A follows."
    29        boot-file
    30        ansi-tests-directory))
    31 ;; XXX -- what to invoke on win32?
    32 ;;    (run-shell-command "make clean" :directory ansi-tests-directory)
    33     (time (load boot-file)))
     29    (format t "--->  ~A begins.~%" message)
     30    (format t "Invoking ABCL hosted on ~A ~A.~%"
     31      (software-type) (software-version))
     32    (if (find :unix *features*)
     33        (run-shell-command "cd ~A; make clean" ansi-tests-directory)
     34        ;; XXX -- what to invoke on win32?  Please verify
     35        (run-shell-command
     36         (format nil ("~A~%~A")
     37           (format nil "cd ~A" *ansi-tests-directory*)
     38           (format nil "erase *.cls *.abcl"))))
     39    (time (load boot-file))
     40    (format t "<--- ~A ends.~%" message))
    3441      (file-error (e)
    3542    (error
Note: See TracChangeset for help on using the changeset viewer.