set up logging an all sub-system tests
This commit is contained in:
parent
5ed409fe4a
commit
999589a380
7 changed files with 19 additions and 3 deletions
|
@ -74,7 +74,7 @@
|
|||
(actions ctx)))))
|
||||
|
||||
(defun add-service (ctx cfg)
|
||||
(format t "~&add-service: ~s~%" (config:name cfg))
|
||||
;(format t "~&add-service: ~s~%" (config:name cfg))
|
||||
(with-slots (services) ctx
|
||||
(let ((child (funcall (config:setup cfg) cfg)))
|
||||
(when child
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
(if (stringp logfile)
|
||||
(setf logfile (util:path-from-string logfile)))
|
||||
(util:ensure-dir logfile)
|
||||
(format t "~&loglevel: ~s, logfile: ~s~%" loglevel logfile)
|
||||
;(format t "~&loglevel: ~s, logfile: ~s~%" loglevel logfile)
|
||||
(setf params (list :sane loglevel :daily logfile))
|
||||
(if (console cfg)
|
||||
(setf params (cons :console params)))
|
||||
|
|
|
@ -5,6 +5,11 @@
|
|||
|
||||
(config:root :env-keys '(:db-name :db-user :db-password))
|
||||
|
||||
(config:add :logger :class 'logging:config
|
||||
:loglevel :info
|
||||
:logfile (t:test-path "scopes-test.log" "log")
|
||||
:console nil)
|
||||
|
||||
(defvar postgres-connect-args
|
||||
(list :database-name (config:from-env :db-name "cltest")
|
||||
:host "localhost"
|
||||
|
|
|
@ -5,6 +5,11 @@
|
|||
|
||||
(config:root :env-keys '(:db-name))
|
||||
|
||||
(config:add :logger :class 'logging:config
|
||||
:loglevel :info
|
||||
:logfile (t:test-path "scopes-test.log" "log")
|
||||
:console nil)
|
||||
|
||||
(defvar sqlite-connect-args
|
||||
(list :database-name
|
||||
(namestring
|
||||
|
|
|
@ -4,5 +4,10 @@
|
|||
|
||||
(config:root)
|
||||
|
||||
(config:add :logger :class 'logging:config
|
||||
:loglevel :info
|
||||
:logfile (t:test-path "scopes-test.log" "log")
|
||||
:console nil)
|
||||
|
||||
(config:add :test-receiver :setup #'setup)
|
||||
(config:add-action '(:test) #'check-message)
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
(:local-nicknames (:alx :alexandria)
|
||||
(:config :scopes/config)
|
||||
(:core :scopes/core)
|
||||
(:logging :scopes/logging)
|
||||
(:message :scopes/core/message)
|
||||
(:util :scopes/util)
|
||||
(:t :scopes/testing))
|
||||
|
@ -48,7 +49,6 @@
|
|||
|
||||
(defun run ()
|
||||
(let* ((t:*test-suite* (make-instance 'test-suite :name "core")))
|
||||
(log4cl:log-config :sane :daily (t:test-path "scopes-test.log" "log"))
|
||||
(load (t:test-path "config-core" "etc"))
|
||||
(unwind-protect
|
||||
(progn
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
(:use :common-lisp)
|
||||
(:local-nicknames (:config :scopes/config)
|
||||
(:core :scopes/core)
|
||||
(:logging :scopes/logging)
|
||||
(:storage :scopes/storage)
|
||||
(:tracking :scopes/storage/tracking)
|
||||
(:t :scopes/testing))
|
||||
|
|
Loading…
Add table
Reference in a new issue