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)))))
|
(actions ctx)))))
|
||||||
|
|
||||||
(defun add-service (ctx cfg)
|
(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
|
(with-slots (services) ctx
|
||||||
(let ((child (funcall (config:setup cfg) cfg)))
|
(let ((child (funcall (config:setup cfg) cfg)))
|
||||||
(when child
|
(when child
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
(if (stringp logfile)
|
(if (stringp logfile)
|
||||||
(setf logfile (util:path-from-string logfile)))
|
(setf logfile (util:path-from-string logfile)))
|
||||||
(util:ensure-dir 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))
|
(setf params (list :sane loglevel :daily logfile))
|
||||||
(if (console cfg)
|
(if (console cfg)
|
||||||
(setf params (cons :console params)))
|
(setf params (cons :console params)))
|
||||||
|
|
|
@ -5,6 +5,11 @@
|
||||||
|
|
||||||
(config:root :env-keys '(:db-name :db-user :db-password))
|
(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
|
(defvar postgres-connect-args
|
||||||
(list :database-name (config:from-env :db-name "cltest")
|
(list :database-name (config:from-env :db-name "cltest")
|
||||||
:host "localhost"
|
:host "localhost"
|
||||||
|
|
|
@ -5,6 +5,11 @@
|
||||||
|
|
||||||
(config:root :env-keys '(:db-name))
|
(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
|
(defvar sqlite-connect-args
|
||||||
(list :database-name
|
(list :database-name
|
||||||
(namestring
|
(namestring
|
||||||
|
|
|
@ -4,5 +4,10 @@
|
||||||
|
|
||||||
(config:root)
|
(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 :test-receiver :setup #'setup)
|
||||||
(config:add-action '(:test) #'check-message)
|
(config:add-action '(:test) #'check-message)
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
(:local-nicknames (:alx :alexandria)
|
(:local-nicknames (:alx :alexandria)
|
||||||
(:config :scopes/config)
|
(:config :scopes/config)
|
||||||
(:core :scopes/core)
|
(:core :scopes/core)
|
||||||
|
(:logging :scopes/logging)
|
||||||
(:message :scopes/core/message)
|
(:message :scopes/core/message)
|
||||||
(:util :scopes/util)
|
(:util :scopes/util)
|
||||||
(:t :scopes/testing))
|
(:t :scopes/testing))
|
||||||
|
@ -48,7 +49,6 @@
|
||||||
|
|
||||||
(defun run ()
|
(defun run ()
|
||||||
(let* ((t:*test-suite* (make-instance 'test-suite :name "core")))
|
(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"))
|
(load (t:test-path "config-core" "etc"))
|
||||||
(unwind-protect
|
(unwind-protect
|
||||||
(progn
|
(progn
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
(:use :common-lisp)
|
(:use :common-lisp)
|
||||||
(:local-nicknames (:config :scopes/config)
|
(:local-nicknames (:config :scopes/config)
|
||||||
(:core :scopes/core)
|
(:core :scopes/core)
|
||||||
|
(:logging :scopes/logging)
|
||||||
(:storage :scopes/storage)
|
(:storage :scopes/storage)
|
||||||
(:tracking :scopes/storage/tracking)
|
(:tracking :scopes/storage/tracking)
|
||||||
(:t :scopes/testing))
|
(:t :scopes/testing))
|
||||||
|
|
Loading…
Add table
Reference in a new issue