Skip to content

Commit

Permalink
load depsg
Browse files Browse the repository at this point in the history
  • Loading branch information
albertolerda committed Oct 25, 2023
1 parent c06dc6b commit 2d8321b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
33 changes: 33 additions & 0 deletions load-deps.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
(in-package :common-lisp-user)

(require :asdf)

(declaim (optimize (speed 3) (space 3) (safety 3)))

(asdf:load-system "asdf")

(asdf:initialize-source-registry '(:source-registry (:tree :here) :inherit-configuration))

;;; try to find Quicklisp -- this is a mess because it isn't consistently installed in the
;;; same location.
(if (uiop:find-package* '#:ql nil)
(format t "~&Quicklisp pre-loaded into image.~%")
(let ((ql-filename (uiop:getenv "QUICKLISP_SETUP"))
loaded)
(if ql-filename
(if (probe-file ql-filename)
(let ((result (load ql-filename :if-does-not-exist nil)))
(when result
(format t "~&Have loaded quicklisp setup file ~a.~%" ql-filename)
(setf loaded t)))
(format t "Quicklisp not installed where expected: ~a~%" ql-filename)))
(unless loaded
(let* ((fallback-name "/root/quicklisp/setup.lisp")
(result (load fallback-name :if-does-not-exist nil)))
(when result
(format t "~&Have loaded quicklisp setup file from /root.~%")
(setf loaded t))))
(unless loaded
(format t "~&Unable to find quicklisp.~%")
(uiop:quit 1 t))))

3 changes: 2 additions & 1 deletion run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

sbcl --non-interactive \
--eval '(asdf:load-system :html2clwho/tests)' \
--load 'load-deps.lisp'
--eval '(ql:quickload :html2clwho/tests)' \
--eval '(asdf:load-system :html2clwho)' \
--eval '(uiop:quit (if (html2clwho.test::run-tests) 0 1))'

0 comments on commit 2d8321b

Please sign in to comment.