abcl-build: Incremental work on tests

Not any worse than before.
parent 53605b1c
......@@ -3,7 +3,7 @@
;;; Works for: abcl, sbcl, clisp, cmu, lispworks, allegro, openmcl
(defsystem abcl-build
: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)))
:components ((:module package
:pathname "build/"
......
......@@ -4,17 +4,24 @@
(defun ant-zip-uri ()
#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"
#+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")
(defun xdg/ant-executable ()
(let* ((uri (ant-zip-uri))
(directory (xdg/abcl-install-root uri))
(ant-root-name (let ((name (pathname-name 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"
(xdg/abcl-install-root (ant-zip-uri))))))
(merge-pathnames #p"bin/ant" ant-home)))
ant-home)))
(defun ant/install ()
(unless (xdg/ant-executable)
......
......@@ -31,6 +31,7 @@
#:download-and-unzip
#:download
#:xdg/ant-executable
#:with-ensured-ant
#:ant/install
#:ant/call
......
(in-package :abcl/build/t)
(prove:plan 2)
(prove:diag "Testing BUILD-ABCL…")
(prove:ok
(abcl-build:build-abcl))
(prove:diag "Testing MAKE-DIST…")
(prove:ok
(abcl-build:make-dist (format nil "test-" (random (expt 2 32)))))
#+abcl-build-test-more
(progn
(prove:plan 1)
(prove:ok (abcl-build:build-abcl :clean t)))
#+abcl-build-test-more
(progn
(prove:plan 1)
(abcl-build:build-abcl :force t))
(if (not (ignore-errors (asdf:find-system :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:subtest "Testing BUILD-ABCL."
(prove:plan 2)
(prove:ok
(abcl-build:build-abcl)
"Testing BUILD-ABCL…")
(prove:diag )
(prove:ok
(abcl-build:make-dist (format nil "test-" (random (expt 2 32))))
"Testing MAKE-DIST…")
#+abcl-build-test-more
(progn
(prove:ok
(abcl-build:build-abcl :clean t)
"Testing BUILD:ABCL clean…"))
#+abcl-build-test-more
(prove:ok
(abcl-build:build-abcl :force t)
"Testing BUILD-ABCL force…")))
(prove:finalize)
......
......@@ -4,10 +4,12 @@
(prove:diag "Testing private installation of Ant…")
(prove:ok (build-abcl:ant/install))
(prove:plan 1)
(let ((antfile (asdf:system-relative-pathname :abcl "build.xml")))
(prove:diag (format nil "Testing invocation of private Ant on main ABCL build artifact at ~&~2,t~a…"
antfile))
(prove:ok (abcl-build:ant/call antfile "abcl.diagnostic")))
(if (not (ignore-errors (asdf:find-system :abcl)))
(prove:diag "Unable to find 'abcl.asd'.~&Enable ASDF to find 'abcl.asd' by adding symlink to ~~/common-lisp/ to ABCL source directory.")
(let ((ant-file (asdf:system-relative-pathname :abcl "build.xml")))
(prove:plan 1)
(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)
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