# HG changeset patch # User Steve Losh # Date 1471729134 0 # Node ID 8897604cb9dd852293b6484d348e775f9c417b7e # Parent cb324d188513d162235e569522a627d68ce71f8e Clean up the test running and makefile diff -r cb324d188513 -r 8897604cb9dd Makefile --- a/Makefile Sat Aug 20 21:28:31 2016 +0000 +++ b/Makefile Sat Aug 20 21:38:54 2016 +0000 @@ -1,9 +1,10 @@ -.PHONY: test pubdocs bench profile test-sbcl test-ccl test-ecl +.PHONY: test pubdocs test-sbcl test-ccl test-ecl sourcefiles = $(shell ffind --full-path --dir src --literal .lisp) docfiles = $(shell ls docs/*.markdown) apidoc = docs/03-reference.markdown +# Testing --------------------------------------------------------------------- test: test-sbcl test-ccl test-ecl test-sbcl: @@ -19,10 +20,12 @@ ros run -L ecl --load test/run.lisp +# Quickutils ------------------------------------------------------------------ src/quickutils.lisp: src/make-quickutils.lisp cd src && sbcl-rlwrap --noinform --load make-quickutils.lisp --eval '(quit)' +# Documentation --------------------------------------------------------------- $(apidoc): $(sourcefiles) docs/api.lisp sbcl-rlwrap --noinform --load docs/api.lisp --eval '(quit)' @@ -36,10 +39,3 @@ rsync --delete -a ./docs/build/ ~/src/sjl.bitbucket.org/bones hg -R ~/src/sjl.bitbucket.org commit -Am 'bones: Update site.' hg -R ~/src/sjl.bitbucket.org push - - -bench: - sbcl-rlwrap --noinform --load examples/bench.lisp --eval '(quit)' - -profile: - sbcl-rlwrap --noinform --load examples/profile.lisp --eval '(quit)' diff -r cb324d188513 -r 8897604cb9dd bones-test.asd --- a/bones-test.asd Sat Aug 20 21:28:31 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -(asdf:defsystem #:bones-test - :description "Test suite for bones." - :author "Steve Losh " - :license "MIT/X11" - :depends-on (#:bones - #:1am) - :serial t - :components ((:file "package-test") - (:module "test" - :serial t - :components ((:file "bones") - (:file "utils") - (:file "circle") - (:file "paip") - (:file "wam") - (:file "99") - (:file "taop"))))) - diff -r cb324d188513 -r 8897604cb9dd bones.asd --- a/bones.asd Sat Aug 20 21:28:31 2016 +0000 +++ b/bones.asd Sat Aug 20 21:38:54 2016 +0000 @@ -12,6 +12,8 @@ #:cl-arrows #:policy-cond) + :in-order-to ((asdf:test-op (asdf:test-op #:bones-test))) + :serial t :components ((:file "src/quickutils") ; quickutils package ordering crap (:file "package") @@ -43,3 +45,28 @@ (:file "ui"))) (:file "bones"))))) +(asdf:defsystem #:bones-test + :name "bones-test" + :description "Test suite for bones." + + :author "Steve Losh " + :license "MIT/X11" + + :depends-on (#:bones + #:1am) + + :perform (asdf:test-op + (op system) + (uiop:symbol-call :bones-test :run-tests)) + + :serial t + :components ((:file "package-test") + (:module "test" + :serial t + :components ((:file "bones") + (:file "utils") + (:file "circle") + (:file "paip") + (:file "wam") + (:file "99") + (:file "taop"))))) diff -r cb324d188513 -r 8897604cb9dd examples/bench.lisp --- a/examples/bench.lisp Sat Aug 20 21:28:31 2016 +0000 +++ b/examples/bench.lisp Sat Aug 20 21:38:54 2016 +0000 @@ -19,11 +19,11 @@ (load "examples/ggp-wam.lisp"))) (defun run-test% () - ; (format t "PAIP (Compiled) --------------------~%") - ; (time (paiprolog-test::dfs-exhaust)) + (format t "PAIP (Compiled) --------------------~%") + (time (paiprolog-test::dfs-exhaust)) - ; (format t "PAIP (Interpreted) -----------------~%") - ; (time (bones.paip::depth-first-search :exhaust t)) + (format t "PAIP (Interpreted) -----------------~%") + (time (bones.paip::depth-first-search :exhaust t)) (format t "WAM --------------------------------~%") (time (bones.wam::depth-first-search :exhaust t))) diff -r cb324d188513 -r 8897604cb9dd test/bones.lisp --- a/test/bones.lisp Sat Aug 20 21:28:31 2016 +0000 +++ b/test/bones.lisp Sat Aug 20 21:38:54 2016 +0000 @@ -1,1 +1,4 @@ (in-package #:bones-test) + +(defun run-tests () + (1am:run)) diff -r cb324d188513 -r 8897604cb9dd test/run.lisp --- a/test/run.lisp Sat Aug 20 21:28:31 2016 +0000 +++ b/test/run.lisp Sat Aug 20 21:38:54 2016 +0000 @@ -2,19 +2,16 @@ (declaim (optimize (debug 3) (safety 3) (speed 0))) - (let ((*standard-output* (make-broadcast-stream)) ; (*error-output* (make-broadcast-stream)) ) + (ql:quickload 'bones) + ;; Recompile to ensure we get the right optimize declarations... (asdf:load-system 'bones :force t) - (ql:quickload "bones-test")) + (ql:quickload 'bones-test)) -(defun done (exit-code) - #+sbcl (sb-ext:exit :code exit-code) - #+ccl (quit exit-code) - #+ecl (quit exit-code)) - - -(time (progn (1am:run) (terpri))) +(time (prog1 + (asdf:test-system 'bones) + (terpri))) (terpri) -(done 0) +(quit)