create new package scopes/csys: new communication system implementation
This commit is contained in:
parent
5872c25129
commit
445c5a5c3b
5 changed files with 84 additions and 0 deletions
17
csys/csys.lisp
Normal file
17
csys/csys.lisp
Normal file
|
@ -0,0 +1,17 @@
|
|||
;;;; cl-scopes/csys - concurrent cybernetic communication systems
|
||||
|
||||
(defpackage :scopes/csys
|
||||
(:use :common-lisp)
|
||||
(:local-nicknames (:actor :scopes/core/actor)
|
||||
(:async :scopes/util/async)
|
||||
(:config :scopes/config)
|
||||
(:core :scopes/core)
|
||||
(:message :scopes/core/message)
|
||||
(:shape :scopes/shape)
|
||||
(:util :scopes/util)
|
||||
(:alx :alexandria))
|
||||
(:export #:*dispatcher*))
|
||||
|
||||
(in-package :scopes/csys)
|
||||
|
||||
(defvar *dispatcher* nil)
|
|
@ -17,6 +17,7 @@
|
|||
"core/actor" "core/message"
|
||||
"forge/forge" "logging"
|
||||
"util/async" "util/util"))
|
||||
(:file "csys/csys" :depends-on ("core/core"))
|
||||
(:file "core/message" :depends-on ("core/actor" "shape/shape"))
|
||||
(:file "forge/forge" :depends-on ("util/iter" "util/util"))
|
||||
(:file "logging" :depends-on ("config" "util/util"))
|
||||
|
|
20
scopes-csys.asd
Normal file
20
scopes-csys.asd
Normal file
|
@ -0,0 +1,20 @@
|
|||
;;;; cl-scopes/scopes-csys.asd
|
||||
|
||||
(in-package #:asdf-user)
|
||||
|
||||
(defsystem :scopes-csys
|
||||
:author "cyberconcepts.org Team <team@cyberconcepts.org>"
|
||||
:license "MIT"
|
||||
:version "0.0.1"
|
||||
:homepage "https://www.cyberconcepts.org"
|
||||
:description "Concurrent cybernetic communications systems."
|
||||
:depends-on (:scopes-core)
|
||||
:components ((:file "csys/csys"))
|
||||
:long-description "scopes/csys: Concurrent cybernetic communications systems."
|
||||
:in-order-to ((test-op (test-op "scopes-csys/test"))))
|
||||
|
||||
(defsystem :scopes-csys/test
|
||||
:depends-on (:scopes-csys)
|
||||
:components ((:file "test/test-csys"))
|
||||
:perform (test-op (o c)
|
||||
(symbol-call :scopes/test-csys :run)))
|
12
test/etc/config-csys.lisp
Normal file
12
test/etc/config-csys.lisp
Normal file
|
@ -0,0 +1,12 @@
|
|||
;;;; cl-scopes/test/etc/config-csys - configuration for `scopes-csys` tests
|
||||
|
||||
(in-package :scopes/test-csys)
|
||||
|
||||
(config:root)
|
||||
|
||||
(config:add :logger :class 'logging:config
|
||||
:loglevel (config:from-env :loglevel :info)
|
||||
:logfile (t:test-path "scopes-test.log" "log")
|
||||
:console nil)
|
||||
|
||||
|
34
test/test-csys.lisp
Normal file
34
test/test-csys.lisp
Normal file
|
@ -0,0 +1,34 @@
|
|||
;;;; cl-scopes/test-csys - testing for the scopes-csys system.
|
||||
|
||||
(defpackage :scopes/test-csys
|
||||
(:use :common-lisp)
|
||||
(:local-nicknames (:alx :alexandria)
|
||||
(:actor :scopes/core/actor)
|
||||
(:async :scopes/util/async)
|
||||
(:config :scopes/config)
|
||||
(:core :scopes/core)
|
||||
(:csys :scopes/csys)
|
||||
(:logging :scopes/logging)
|
||||
(:message :scopes/core/message)
|
||||
(:shape :scopes/shape)
|
||||
(:util :scopes/util)
|
||||
(:t :scopes/testing))
|
||||
(:export #:run)
|
||||
(:import-from :scopes/testing #:deftest #:== #:!=))
|
||||
|
||||
(in-package :scopes/test-csys)
|
||||
|
||||
;;;; test runner
|
||||
|
||||
(defun run ()
|
||||
(async:init)
|
||||
(let* ((t:*test-suite* (make-instance 't:test-suite :name "csys")))
|
||||
(load (t:test-path "config-csys" "etc"))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(test-basic))
|
||||
(async:finish)
|
||||
(t:show-result))))
|
||||
|
||||
(deftest test-basic ()
|
||||
(== csys:*dispatcher* nil))
|
Loading…
Add table
Reference in a new issue