PSF: Stabilizing workspace after crash. Valid kernel/skill fixes.
This commit is contained in:
17
projects/org-skill-tdd-runner/src/runner-logic.lisp
Normal file
17
projects/org-skill-tdd-runner/src/runner-logic.lisp
Normal file
@@ -0,0 +1,17 @@
|
||||
(defun run-tests-for-project (project-name)
|
||||
"Executes the standard test suite for the given project using SBCL."
|
||||
(let* ((projects-dir (or (uiop:getenv "PROJECTS_DIR") "projects/"))
|
||||
(project-dir (format nil "~aorg-skill-~a/" projects-dir project-name))
|
||||
(test-file (format nil "~atests/test-suite.lisp" project-dir)))
|
||||
(org-agent:kernel-log "CI - Running tests for ~a..." project-name)
|
||||
(if (uiop:file-exists-p test-file)
|
||||
(multiple-value-bind (output error-output exit-code)
|
||||
(uiop:run-program (list "sbcl" "--batch" "--load" test-file "--eval" "(uiop:quit)")
|
||||
:ignore-error-status t :output :string :error-output :string)
|
||||
(if (= exit-code 0)
|
||||
(org-agent:kernel-log "CI SUCCESS - ~a passed all tests." project-name)
|
||||
(progn
|
||||
(org-agent:kernel-log "CI FAILURE - ~a failed tests with exit code ~a" project-name exit-code)
|
||||
(org-agent:inject-stimulus
|
||||
`(:type :EVENT :payload (:sensor :test-failure :project ,project-name :text ,output :stderr ,error-output))))))
|
||||
(org-agent:kernel-log "CI ERROR - No test suite found for ~a at ~a" project-name test-file))))
|
||||
Reference in New Issue
Block a user