-
Notifications
You must be signed in to change notification settings - Fork 1
/
tests-server.sbclrc
34 lines (27 loc) · 1.35 KB
/
tests-server.sbclrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
(load "asdf.lisp")
(load ".quicklisp-install/require-quicklisp.lisp")
(push (make-pathname :directory '(:relative ".")) ql:*local-project-directories*)
(push (make-pathname :directory '(:relative "weblocks-selenium-tests-app")) asdf:*central-registry*)
(require :sb-posix)
(setf sb-impl::*default-external-format* :utf-8)
(defvar *port* (parse-integer (nth 1 *posix-argv*)))
(defvar *swank-port* (parse-integer (nth 2 *posix-argv*)))
(ql:quickload :cl-ppcre)
(ql:quickload :weblocks-selenium-tests-app)
(ql:quickload :weblocks-selenium-tests)
(loop for i in (cl-ppcre:split " " (string-trim " " (nth 3 *posix-argv*))) do
(ql:quickload (intern (string-upcase i) "KEYWORD")))
(weblocks-selenium-tests-app:start-weblocks-selenium-tests-app :port *port*)
(when (interactive-stream-p *terminal-io*)
(require :sb-aclrepl)
(ql:quickload :linedit)
(funcall (intern "INSTALL-REPL" :linedit) :wrap-current t))
(swank:create-server :dont-close t :port *swank-port*)
(format t "~C[2J~%" #\Esc)
(format t "Welcome to weblocks~%")
(format t "Weblocks is running on port ~S, and can be access by browsing http://me:~S~%" *port* *port*)
(format t "Please update your hosts file apropriately (add alias \"me\" for 127.0.0.1)~%")
(format t "Swank is running on port ~S~%" *swank-port*)
(format t "Use (quit) to exit REPL")
(in-package :weblocks-selenium-tests)
(defun quit () (sb-ext:exit))