diff --git a/.gitignore b/.gitignore index 72b0d98..10693f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,13 @@ +# IDE +.DS_Store +.idea +*.log +tmp/ *~ -*.fasl \ No newline at end of file +*#* + +# SBCL +*.fasl + +# Clozure +*.lx64fsl \ No newline at end of file diff --git a/README.org b/README.org index 91b8073..e70f516 100644 --- a/README.org +++ b/README.org @@ -3,7 +3,7 @@ Thespis is a threaded actor library for Common Lisp. -* TODO Installation +* Installation With [[https://ultralisp.org][Ultralisp]] installed: diff --git a/test.lisp b/test/basic.lisp similarity index 93% rename from test.lisp rename to test/basic.lisp index 00dd460..64c3caa 100644 --- a/test.lisp +++ b/test/basic.lisp @@ -1,12 +1,6 @@ -(fiasco:define-test-package #:thespis/test - (:use #:thespis) - (:export #:bruteforce)) -(in-package #:thespis/test) - -(defun bruteforce (&optional (times 1024)) - "Detect rare race conditions by brute force." - (dotimes (i times) - (assert (eql t (fiasco:run-tests :thespis/test))))) +(fiasco:define-test-package #:thespis/test/basic + (:use #:thespis)) +(in-package #:thespis/test/basic) (deftest test-counter () (define-actor counter ((c 0)) (increment) diff --git a/test/fuzz.lisp b/test/fuzz.lisp new file mode 100644 index 0000000..6153658 --- /dev/null +++ b/test/fuzz.lisp @@ -0,0 +1,8 @@ +(fiasco:define-test-package #:thespis/test/fuzz) +(in-package #:thespis/test/fuzz) + +(deftest fuzz-basic-tests (&optional (times 1024)) + "Detect rare race conditions by brute force." + (dotimes (i times) + (let ((*standard-output* (make-broadcast-stream))) + (is (fiasco:run-tests :thespis/test/basic))))) diff --git a/thespis.asd b/thespis.asd index 779ce58..897a5ee 100644 --- a/thespis.asd +++ b/thespis.asd @@ -9,10 +9,14 @@ (asdf:defsystem #:thespis/test :depends-on (#:thespis #:fiasco) - :components ((:file "test")) + :components ((:module "test" + :components ((:file "basic") + (:file "fuzz")))) :perform (asdf:test-op (o c) (multiple-value-bind (stat result) - (uiop:symbol-call :fiasco :run-tests '(:thespis/test)) + (uiop:symbol-call :fiasco :run-tests + '(:thespis/test/basic + :thespis/test/fuzz)) (print result) (assert (eql t stat)))))