Commit e91c4595 authored by Daniel Kochmański's avatar Daniel Kochmański

utility: add option to run test group or one test

CLOS requires :depends-on (TODO)
parent 8890db36
Pipeline #98 skipped
......@@ -5,7 +5,7 @@
:author "Eric Marsden"
:maintainer "Daniel 'jackdaniel' Kochmański"
:license "Public Domain"
:depends-on (#:trivial-garbage)
:depends-on (#:alexandria #:trivial-garbage)
:serial t
:components ((:file "package")
(:file "cl-bench")
......
......@@ -2,5 +2,7 @@
(defpackage #:cl-bench
(:use #:cl)
(:export #:bench-run
(:import-from #:alexandria #:ensure-list)
(:export #:bench-run-1
#:bench-run
#:defbench))
......@@ -96,6 +96,18 @@
(progn ,@body)
(bench-report-footer))))
(setf (fdefinition 'filter) #'remove-if-not)
(defun bench-run-1 (&key names groups
&aux
(names (ensure-list names))
(groups (ensure-list groups)))
(let ((*benchmarks* (union
(filter (lambda (%) (member % names)) *benchmarks* :key #'benchmark-name)
(filter (lambda (%) (member % groups)) *benchmarks* :key #'benchmark-group))))
(when *benchmarks*
(print *benchmarks*)
(bench-run))))
(defun bench-run ()
(with-open-file (f (benchmark-report-file)
......
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