Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Add some validation to report-properties

In particular add a check that the :name report-property is
given only simple names and not directories.
  • Loading branch information...
commit 4c8a11ba55d67d300f17e7ec9b7bd20eb5e83a82 1 parent 62a7867
@gwkkwg authored
Showing with 17 additions and 1 deletion.
  1. +17 −1 dev/config.lisp
18 dev/config.lisp
@@ -53,6 +53,12 @@ In all cases, the report will go into
(defgeneric handle-config-preference (name args)
+(defgeneric validate-report-property (name args))
+(defmethod validate-report-property (name args)
+ (declare (ignore name args))
+ t)
(defvar *current-configuration-stream* nil)
(defvar *current-asdf-system-name* nil
@@ -252,7 +258,17 @@ use asdf:test-op or bind *current-asdf-system-name* yourself."))))))
(defmethod handle-config-preference ((name (eql :report-property))
- (setf (test-result-property *test-result* (first args)) (second args)))
+ (let ((name (form-keyword (first args))))
+ (validate-report-property name (second args))
+ (setf (test-result-property *test-result* name) (second args))))
+(defmethod validate-report-property ((name (eql :name)) args)
+ ;; report name
+ (assert (stringp args) nil
+ ":name property must be given a string, was given ~s" args)
+ (assert (null (pathname-directory args)) nil
+ "The :name property must be a simple name (not a directory), use :full-pathname if
+you need more control"))
(defconfig-variable :profiling-threshold *profiling-threshold*)

0 comments on commit 4c8a11b

Please sign in to comment.
Something went wrong with that request. Please try again.