[armedbear-cvs] r12335 - in trunk/abcl: . test/lisp/cl-bench

Mark Evenson mevenson at common-lisp.net
Tue Jan 5 17:15:40 UTC 2010


Author: mevenson
Date: Tue Jan  5 12:15:35 2010
New Revision: 12335

Log:
Initial fix for support for running cl-bench test suite from Ant build via ASDF.

This probably doesn't work on win32 without 'make' in your path.

Running the cl-bench suite now works via the 'test.cl-bench' target if
the test suite has been downloaded from
"http://www.chez.com/emarsden/downloads/cl-bench.tar.gz" and placed in
a sibling directory (#p../cl-bench/) to ABCL root.

Move the cl-bench ASDF description into 'abcl.asd' now that I have
finally understood (?) the correct CLOS method invocation.



Added:
   trunk/abcl/test/lisp/cl-bench/wrapper.lisp
Removed:
   trunk/abcl/test/lisp/cl-bench/cl-bench.asd
Modified:
   trunk/abcl/abcl.asd
   trunk/abcl/build.xml

Modified: trunk/abcl/abcl.asd
==============================================================================
--- trunk/abcl/abcl.asd	(original)
+++ trunk/abcl/abcl.asd	Tue Jan  5 12:15:35 2010
@@ -23,11 +23,12 @@
   :depends-on (:ansi-compiled #+nil :abcl-tests))
 
 (defmethod perform :after ((o load-op) (c (eql (find-system :abcl))))
-  #+nil (asdf:oos 'asdf:test-op :cl-bench :force t)
+  (operate 'load-op :cl-bench :force t)
   (operate 'load-op :abcl-test-lisp :force t)
   (operate 'load-op :ansi-compiled :force t)
   (operate 'load-op :ansi-interpreted :force t))
 
+#+nil
 (defmethod perform :before ((o load-op) (c t))
   (warn "ASDF load-op class is ~A" c))
 
@@ -68,6 +69,16 @@
 (defmethod perform ((o test-op) (c (eql (find-system 'abcl-test-lisp))))
    "Invoke tests with (asdf:oos 'asdf:test-op :abcl-test-lisp)."
    (funcall (intern (symbol-name 'run) :abcl-test)))
+
+(defsystem :cl-bench :components
+  ((:module cl-bench-wrapper :pathname "test/lisp/cl-bench/" :components 
+            ((:file "wrapper")))))
+
+(defmethod perform :before ((o test-op) (c (eql (find-system :cl-bench))))
+  (operate 'load-op :cl-bench :force t))
+
+(defmethod perform ((o test-op) (c (eql (find-system :cl-bench))))
+  (funcall (intern (symbol-name 'run) :abcl.test.cl-bench)))
  
 ;;; Build ABCL from a Lisp.
 ;;; aka the "Lisp-hosted build system"

Modified: trunk/abcl/build.xml
==============================================================================
--- trunk/abcl/build.xml	(original)
+++ trunk/abcl/build.xml	Tue Jan  5 12:15:35 2010
@@ -665,6 +665,22 @@
       <echo>Finished recording test output in ${abcl.test.log.file}.</echo>
     </target>
 
+    <target name="test.cl-bench" depends="abcl.jar">
+      <echo>Recording test output in ${abcl.test.log.file}.</echo>
+      <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/>
+      <java fork="true" dir="${basedir}"
+	    classpathref="abcl.classpath.dist"
+	    classname="org.armedbear.lisp.Main">
+	<arg value="--noinit"/> 
+	<arg value="--eval"/><arg value="(require (quote asdf))"/>
+	<arg value="--eval"/><arg value="(asdf:operate (quote asdf:load-op) :abcl)"/>
+	<arg value="--eval"/><arg value="(asdf:operate (quote asdf:test-op) :cl-bench)"/>
+      </java>
+      <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
+      <echo>Finished recording test output in ${abcl.test.log.file}.</echo>
+    </target>
+
+
     <import file="netbeans-build.xml" optional="true"/> 
 <!--    <import file="j-build.xml" optional="true"/>  -->
     <import file="not.org-build.xml" optional="true"/> 

Added: trunk/abcl/test/lisp/cl-bench/wrapper.lisp
==============================================================================
--- (empty file)
+++ trunk/abcl/test/lisp/cl-bench/wrapper.lisp	Tue Jan  5 12:15:35 2010
@@ -0,0 +1,29 @@
+(defpackage :abcl.test.cl-bench
+  (:use :cl :asdf)
+  (:nicknames "cl-bench")
+  (:export run))
+
+(in-package :abcl.test.cl-bench)
+
+(defparameter *cl-bench-master-source-location*
+  "<http://www.chez.com/emarsden/downloads/cl-bench.tar.gz>")
+
+(defparameter *cl-bench-directory*
+  (merge-pathnames #p"../cl-bench/"
+                   (component-pathname (find-system :abcl))))
+
+(defun run ()
+  (unless (probe-file *cl-bench-directory*)
+    (format t "Failed to find the cl-bench test suite in '~A'. ~
+Please manually download and extract the cl-bench tool suite from ~A to run the tests."
+            *cl-bench-directory*
+            *cl-bench-master-source-location*))
+  (let ((*default-pathname-defaults* *cl-bench-directory*))
+    (if (find :unix *features*)
+        (run-shell-command 
+         (format nil "cd ~A; make clean optimize-files" *cl-bench-directory*))
+        (run-shell-command "cd ~A && make clean optimize-files" *cl-bench-directory*))
+    (load "generate.lisp")
+    (load "do-compilation-script.lisp")
+    (load "do-execute-script.lisp")))
+  




More information about the armedbear-cvs mailing list