Function: projection-ctest-list-artifacts

projection-ctest-list-artifacts is an autoloaded and natively compiled function defined in projection-type-cmake.el.

Signature

(projection-ctest-list-artifacts)

Documentation

List CTest target artifacts.

Source Code

;; Defined in /nix/store/j6y921qbdmdqxjnd43iibapbig3p4hai-emacs-packages-deps/share/emacs/site-lisp/elpa/projection-20260614.1822/projection-type-cmake.el
(defun projection-ctest-list-artifacts ()
  "List CTest target artifacts."
  (let (result)
    (dolist (test-target (alist-get 'tests (projection-cmake-ctest--targets)))
      (let-alist test-target
        (if .command
            (push
             `((name . ,.name)
               (category . "CTest")
               (arg0 . ,(car .command))
               ,@(when-let* ((argv (cdr .command)))
                   `((argv . ,argv)))
               (type . cmake-test)
               (debuggable . t)
               ,@(when-let* ((working-directory
                              (projection-ctest--read-property .properties "WORKING_DIRECTORY")))
                   `((working-directory . ,working-directory)))
               ,@(when-let* ((environment
                              (projection-ctest--read-property .properties "ENVIRONMENT")))
                   (setq environment
                         (cl-loop
                          for env-variable in environment
                          do (setq env-variable (s-split-up-to "=" env-variable 1))
                          collect (cons (car env-variable)
                                        (or (cadr env-variable) ""))))
                   `((environment . ,environment))))
             result)
          (projection--log :warning "CTest target=%S has no defined command.\
 This is known to happen when the test executable hasn't been compiled yet." test-target)
          )))
    (nreverse result)))