Coverage report: /home/ellis/comp/core/lib/cli/tools/rust.lisp

KindCoveredAll%
expression051 0.0
branch04 0.0
Key
Not instrumented
Conditionalized out
Executed
Not executed
 
Both branches taken
One branch taken
Neither branch taken
1
 ;;; cli/tools/rust.lisp --- Rust Tools
2
 
3
 ;; 
4
 
5
 ;;; Code:
6
 (in-package :cli/tools/rust)
7
 
8
 (define-cli-tool :cargo (&rest args)
9
   (let ((proc (sb-ext:run-program *cargo* (or args nil) :output t)))
10
     (unless (eq 0 (sb-ext:process-exit-code proc))
11
       (cargo-error "CARGO command failed: ~A ~A" *cargo* (or args "")))))
12
 
13
 (define-cli-tool :rustup (&rest args)
14
   (let ((proc (sb-ext:run-program *rustup* (or args nil) :output t)))
15
     (unless (eq 0 (sb-ext:process-exit-code proc))
16
       (cargo-error "RUSTUP command failed: ~A ~A" *rustup* (or args "")))))
17
 
18
 (defun cargo-install (crate &key force git path)
19
   (let ((args `(,@(etypecase crate
20
                     (string `(,crate))
21
                     (symbol `(,(string-downcase crate)))
22
                     (list crate))
23
                 ,@(when force '("--force"))
24
                 ,@(when git `("--git" ,git))
25
                 ,@(when path `("--path" ,path)))))
26
     (apply 'run-cargo "install" args)))
27
 
28
 (defun cargo-clean (&rest args)
29
   (apply 'run-cargo "clean" args))