default method for test-system?

Faré fahree at gmail.com
Sat Apr 25 18:47:10 UTC 2015


Dear ASDF users,

what about this default method (or something similar) for test-op?

(defmethod perform ((o test-op) (s system))
  (loop :with name = (coerce-name s)
        :for suffix :in '("" "/test" "-test")
        :for test-system-name = (strcat name suffix)
        :for test-system = (find-system test-system-name nil)
        :when test-system :do
          (load-system test-system)
          ;; Would be string-upcase, if not to accommodate for "modern" syntax.
          ;; UIOP probably needs to offer a standard way to abstract over
          ;; the string-upcase vs string-downcase vs neither default.
          (flet ((symbol-namify (x) (string (safe-read-from-string x))))
            (if-let (test-suite (find-symbol* '#:test-suite
(symbol-namify test-system-name) nil))
              (return (funcall test-suite))))
        :finally (error "No tests found for system ~A" name)))

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
If being against something is a phobia, then being for is mania.
Peace and understanding through slurs of mental illness.
Homomania, islamomania, etc.



More information about the asdf-devel mailing list