;; SPDX-License-Identifier: EUPL-1.2 ;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs (defpackage :ukkoclot/test/all (:documentation "Main test runner package.") (:use :c2cl :fiveam :ukkoclot/test/rw-lock) (:import-from :bt2 :with-timeout) (:import-from :uiop) (:export #:*should-quit* #:run-tests)) (in-package :ukkoclot/test/all) (defvar *should-quit* nil "Bind as true if `run-tests' should exit the process with 0 or 1. Useful for CI.") ;; TODO: Maybe I should signal on failure instead :thinking: (defun run-tests () "Run all tests" (with-timeout (100) (let ((status (run-all-tests))) (when *should-quit* (format t "~2&BTW Ignore the fatal ERROR condition below") (cond (status (format t "~&!GREAT SUCCESS!~2%") (uiop:quit 0)) (t (format t "~&!!! TESTS R FUCKED MATE !!!~2%") (uiop:quit 1)))))))