diff options
-rw-r--r-- | test/tests.lisp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/test/tests.lisp b/test/tests.lisp index 6096bf4..e51aad2 100644 --- a/test/tests.lisp +++ b/test/tests.lisp @@ -66,16 +66,19 @@ "---actual output---" output)))) ;; delete generated .asm .o and executable file - (delete-file (probe-file (change-file-type abs-path "asm"))) - (delete-file (probe-file (change-file-type abs-path "o"))) + (case target + (:nasm (delete-file (probe-file (change-file-type abs-path "asm"))) + (delete-file (probe-file (change-file-type abs-path "o")))) + (:c (delete-file (probe-file (change-file-type abs-path "c"))))) (delete-file (probe-file (drop-file-type abs-path))))) successful)) -(defun run-tests (&optional (ignore-err nil)) +(defun run-tests (&key (ignore-err nil) (target :nasm)) (loop for success? in (mapcar (lambda (file) (if (not ignore-err) - (run-test file) - (ignore-errors (run-test file)))) + (run-test file :target target) + (ignore-errors + (run-test file :target target)))) (remove-if-not (lambda (file) (string= "lorth" (pathname-type file))) (cl-fad:list-directory |