abcl-build: Incremental work on tests

Not any worse than before.
parent 53605b1c
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
;;; Works for: abcl, sbcl, clisp, cmu, lispworks, allegro, openmcl ;;; Works for: abcl, sbcl, clisp, cmu, lispworks, allegro, openmcl
(defsystem abcl-build (defsystem abcl-build
:version "2.0.0" :version "2.0.0"
:description "Build ABCL from a Lisp. Downloads necessary build-time tools to local cache." :description "Build ABCL from a Lisp. Downloads necessary build-time tools to local cache if not available on system."
:in-order-to ((test-op (test-op abcl-build-tests))) :in-order-to ((test-op (test-op abcl-build-tests)))
:components ((:module package :components ((:module package
:pathname "build/" :pathname "build/"
......
...@@ -4,17 +4,24 @@ ...@@ -4,17 +4,24 @@
(defun ant-zip-uri () (defun ant-zip-uri ()
#p"http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.4-bin.zip" #p"http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.4-bin.zip"
#+nil ;; https on OPEN fails; probably attempting to upgrade #+(or) ;; https on OPEN fails; probably attempting to upgrade
#p"https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.4-bin.zip" #p"https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.4-bin.zip"
#+nil ;; need apache-ant-1.9 for JVM version 49.0 #+(or) ;; need apache-ant-1.9 for JVM version 49.0
#p"http://www-eu.apache.org/dist/ant/binaries/apache-ant-1.10.1-bin.zip") #p"http://www-eu.apache.org/dist/ant/binaries/apache-ant-1.10.1-bin.zip")
(defun xdg/ant-executable () (defun xdg/ant-executable ()
(probe-file (let* ((uri (ant-zip-uri))
(localize-executable-name (directory (xdg/abcl-install-root uri))
(merge-pathnames #p"bin/ant" (ant-root-name (let ((name (pathname-name uri)))
(xdg/abcl-install-root (ant-zip-uri)))))) (subseq name 0 (- (length name) (length "-bin")))))
(ant-home (merge-pathnames (make-pathname :directory `(:relative ,ant-root-name))
directory)))
(values
(probe-file
(localize-executable-name
(merge-pathnames #p"bin/ant" ant-home)))
ant-home)))
(defun ant/install () (defun ant/install ()
(unless (xdg/ant-executable) (unless (xdg/ant-executable)
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#:download-and-unzip #:download-and-unzip
#:download #:download
#:xdg/ant-executable
#:with-ensured-ant #:with-ensured-ant
#:ant/install #:ant/install
#:ant/call #:ant/call
......
(in-package :abcl/build/t) (in-package :abcl/build/t)
(prove:plan 2) (if (not (ignore-errors (asdf:find-system :abcl)))
(prove:diag "Testing BUILD-ABCL…") (prove:diag "Unable to find 'abcl.asd'.~&Enable ASDF to find 'abcl.asd' by adding symlink to ~/common-lisp/ to ABCL source directory.")
(prove:ok (prove:subtest "Testing BUILD-ABCL."
(abcl-build:build-abcl)) (prove:plan 2)
(prove:diag "Testing MAKE-DIST…") (prove:ok
(prove:ok (abcl-build:build-abcl)
(abcl-build:make-dist (format nil "test-" (random (expt 2 32))))) "Testing BUILD-ABCL…")
(prove:diag )
#+abcl-build-test-more (prove:ok
(progn (abcl-build:make-dist (format nil "test-" (random (expt 2 32))))
(prove:plan 1) "Testing MAKE-DIST…")
(prove:ok (abcl-build:build-abcl :clean t))) #+abcl-build-test-more
(progn
#+abcl-build-test-more (prove:ok
(progn (abcl-build:build-abcl :clean t)
(prove:plan 1) "Testing BUILD:ABCL clean…"))
(abcl-build:build-abcl :force t)) #+abcl-build-test-more
(prove:ok
(abcl-build:build-abcl :force t)
"Testing BUILD-ABCL force…")))
(prove:finalize) (prove:finalize)
......
...@@ -4,10 +4,12 @@ ...@@ -4,10 +4,12 @@
(prove:diag "Testing private installation of Ant…") (prove:diag "Testing private installation of Ant…")
(prove:ok (build-abcl:ant/install)) (prove:ok (build-abcl:ant/install))
(prove:plan 1) (if (not (ignore-errors (asdf:find-system :abcl)))
(let ((antfile (asdf:system-relative-pathname :abcl "build.xml"))) (prove:diag "Unable to find 'abcl.asd'.~&Enable ASDF to find 'abcl.asd' by adding symlink to ~~/common-lisp/ to ABCL source directory.")
(prove:diag (format nil "Testing invocation of private Ant on main ABCL build artifact at ~&~2,t~a…" (let ((ant-file (asdf:system-relative-pathname :abcl "build.xml")))
antfile)) (prove:plan 1)
(prove:ok (abcl-build:ant/call antfile "abcl.diagnostic"))) (prove:ok
(abcl-build:ant/call ant-file "abcl.diagnostic")
(format nil "Testing invocation of private Ant on main ABCL build artifact at ~&~2,t~a…" ant-file))))
(prove:finalize) (prove:finalize)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment