Skip to content

Commit da9d335

Browse files
committed
fuzz test in CI
1 parent 016b5f3 commit da9d335

File tree

5 files changed

+29
-11
lines changed

5 files changed

+29
-11
lines changed

.gitignore

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
1+
# IDE
2+
.DS_Store
3+
.idea
4+
*.log
5+
tmp/
16
*~
2-
*.fasl
7+
*#*
8+
9+
# SBCL
10+
*.fasl
11+
12+
# Clozure
13+
*.lx64fsl

README.org

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
Thespis is a threaded actor library for Common Lisp.
55

6-
* TODO Installation
6+
* Installation
77

88
With [[https://ultralisp.org][Ultralisp]] installed:
99

test.lisp test/basic.lisp

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
(fiasco:define-test-package #:thespis/test
1+
(fiasco:define-test-package #:thespis/test/basic
22
(:use #:thespis)
33
(:export #:bruteforce))
4-
(in-package #:thespis/test)
5-
6-
(defun bruteforce (&optional (times 1024))
7-
"Detect rare race conditions by brute force."
8-
(dotimes (i times)
9-
(assert (eql t (fiasco:run-tests :thespis/test)))))
4+
(in-package #:thespis/test/basic)
105

116
(deftest test-counter ()
127
(define-actor counter ((c 0)) (increment)

test/fuzz.lisp

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
(fiasco:define-test-package #:thespis/test/fuzz)
2+
(in-package #:thespis/test/fuzz)
3+
4+
(deftest fuzz-basic-tests (&optional (times 1024))
5+
"Detect rare race conditions by brute force."
6+
(dotimes (i times)
7+
(let ((*standard-output* (make-broadcast-stream)))
8+
(is (fiasco:run-tests :thespis/test/basic)))))

thespis.asd

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@
99

1010
(asdf:defsystem #:thespis/test
1111
:depends-on (#:thespis #:fiasco)
12-
:components ((:file "test"))
12+
:components ((:module "test"
13+
:components ((:file "basic")
14+
(:file "fuzz"))))
1315
:perform (asdf:test-op
1416
(o c)
1517
(multiple-value-bind (stat result)
16-
(uiop:symbol-call :fiasco :run-tests '(:thespis/test))
18+
(uiop:symbol-call :fiasco :run-tests
19+
'(:thespis/test/basic
20+
:thespis/test/fuzz))
1721
(print result)
1822
(assert (eql t stat)))))

0 commit comments

Comments
 (0)