20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
(use (prefix mtargs args:))
(use mtdebug)
(use (prefix mtconfigf configf:))
;; configure mtdebug ;; TODO: move to megatest.scm with other command line arg processing
(if (args:get-arg "-v") (debug:set-verbose-mode))
(if (args:get-arg "-q") (debug:set-quiet-mode))
(if (args:get-arg "-debug") (debug:set-debug-mode))
(if (args:get-arg "-color")
(case (string->symbol (args:get-arg "-color"))
((y Y yes YES t T) (debug:force-color))
((n N no NO f F) (debug:suppress-color))))
;; configure mtconfigf
(define *default-log-port* (current-error-port))
(let* ((normal-fn debug:print)
(info-fn debug:print-info)
(error-fn debug:print-error)
(default-port *default-log-port*))
(configf:set-debug-printers normal-fn info-fn error-fn default-port))
(define *add-eval-string-check* #f)
(cond
((not *add-eval-string-check*)
(configf:add-eval-string "(import (prefix mtargs args:))
(import mtdebug)
(import (prefix mtconfigf configf:))")
(set! *add-eval-string-check* #t)))
|
|
<
<
<
|
<
|
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
(use (prefix mtargs args:))
(use mtdebug)
(use (prefix mtconfigf configf:))
;; configure mtdebug ;; TODO: move to megatest.scm with other command line arg processing
(if (args:get-arg "-v") (debug:set-verbose-mode))
(if (args:get-arg "-q") (debug:set-quiet-mode))
(if (args:get-arg "-debug") (debug:set-verbosity (args:get-arg "-debug")))
(if (args:get-arg "-color")
(case (string->symbol (args:get-arg "-color"))
((y Y yes YES t T) (debug:force-color))
((n N no NO f F) (debug:suppress-color))))
;; configure mtconfigf
(define *default-log-port* (current-error-port))
(let* ((normal-fn debug:print)
(info-fn debug:print-info)
(error-fn debug:print-error)
(default-port *default-log-port*))
(configf:set-debug-printers normal-fn info-fn error-fn default-port))
(configf:add-eval-string "(import (prefix mtargs args:))
(import mtdebug)
(import (prefix mtconfigf configf:))")
|