Verified Commit f8dfa8aa authored by Vladimir Sedach's avatar Vladimir Sedach
Browse files

Added script for running tests in multiple implementations using Roswell

parent 3b0dde30
#!/usr/bin/env -S sbcl --script
;;; roughly in order of how long the tests take to run
(defvar implementations '("sbcl-bin" "clisp" "ccl-bin" "allegro" "abcl-bin"
(let ((installed (with-output-to-string (out)
(sb-ext:run-program "ros" '("list" "installed")
:search t :output out))))
(dolist (implementation implementations)
(unless (search implementation installed)
(write-string "Installing ") (write-line implementation)
(sb-ext:run-program "ros" (list "install" implementation)
:search t :output t)
(write-line "Starting tests")
(defvar test-code
"(setq *debugger-hook*
(lambda (condition x)
(declare (ignore x))
(let ((*standard-output* uiop:*stderr*))
(write-string \"Debugger entered with error \")
(princ (type-of condition))
(write-string \": \")
(princ condition)
(uiop:quit 1))))
(ql:quickload \"parenscript.tests\")
(let* ((fiveam:*print-names* nil)
(fiveam:*test-dribble* uiop:*stderr*)
(test-results (fiveam:run
(unless (fiveam:results-status test-results)
(fiveam:explain! test-results)
(uiop:quit 1)))")
;;; make sure ASDF is loading the system from the current directory
(require :sb-posix)
(sb-posix:setenv "CL_SOURCE_REGISTRY"
(directory-namestring *load-truename*)
(dolist (implementation implementations)
(write-string "Running tests in ") (write-string implementation)
(let* ((stderr (make-string-output-stream))
(list "run" "-L" implementation "-e" test-code "-q")
:search t :error stderr))))
(if (/= 0 exit-code)
(progn (write-line ": FAILURE")
(write-string "Error running tests in " *error-output*)
(write-line implementation *error-output*)
(write-string (get-output-stream-string stderr)
(sb-ext:exit :code 1))
(write-line ": SUCCESS"))))
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