18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
;; You should have received a copy of the GNU General Public License
;; along with Megatest. If not, see <http://www.gnu.org/licenses/>.
;; Run like this:
;;
;; ./rununittest.sh server 1;(cd simplerun;megatest -stop-server 0)
(import rmtmod trace http-transportmod http-client apimod dbmod)
(trace-call-sites #t)
(trace
;; db:get-dbdat
;; rmt:find-main-server
;; rmt:send-receive-real
;; sexpr->string
)
|
|
|
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
;; You should have received a copy of the GNU General Public License
;; along with Megatest. If not, see <http://www.gnu.org/licenses/>.
;; Run like this:
;;
;; ./rununittest.sh server 1;(cd simplerun;megatest -stop-server 0)
(import rmtmod trace http-client apimod dbmod)
(trace-call-sites #t)
(trace
;; db:get-dbdat
;; rmt:find-main-server
;; rmt:send-receive-real
;; sexpr->string
)
|
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
(for-each (lambda (tdat)
(test #f tdat (loop-test (rmt:conn-ipaddr *main*)
(rmt:conn-port *main*) tdat)))
(list 'a
'(a "b" 123 1.23 )))
(test #f #t (number? (rmt:send-receive 'ping #f 'hello)))
(trace
;; rmt:send-receive
;; with-input-from-request
;; rmt:get-connection
;; with-input-from-request
)
(define *db* (db:setup #f))
(test #f 'server-started (api:execute-requests *db* 'get-server (list *toppath* ".db/1.db")))
(set! *dbstruct-db* #f)
(test #f 'server-started (rmt:general-open-connection *rmt:remote* *toppath* ".db/1.db"))
(test #f '("SYSTEM" "RELEASE") (rmt:get-keys))
(test #f 1 (rmt:register-run '(("SYSTEM" "a")("RELEASE" "b")) "run1" "new" "n/a" "justme" #f))
;; (delete-file* "logs/1.log")
;; (define run-id 1)
;; (test "setup for run" #t (begin (launch:setup)
;; (string? (getenv "MT_RUN_AREA_HOME"))))
|
|
<
<
<
>
|
>
|
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
(for-each (lambda (tdat)
(test #f tdat (loop-test (rmt:conn-ipaddr *main*)
(rmt:conn-port *main*) tdat)))
(list 'a
'(a "b" 123 1.23 )))
(test #f #t (number? (rmt:send-receive 'ping #f 'hello)))
(trace
rmt:register-server
)
(define *db* (db:setup #f))
(test #f 'server-started (api:execute-requests *db* 'get-server (list *toppath* ".db/1.db")))
(set! *dbstruct-db* #f)
(test #f 'server-started (rmt:general-open-connection *rmt:remote* *toppath* ".db/1.db"))
(thread-sleep! 2)
(test #f 'server-started (rmt:general-open-connection *rmt:remote* *toppath* ".db/1.db"))
(test #f '("SYSTEM" "RELEASE") (rmt:get-keys))
(test #f 1 (rmt:register-run '(("SYSTEM" "a")("RELEASE" "b")) "run1" "new" "n/a" "justme" #f))
;; (delete-file* "logs/1.log")
;; (define run-id 1)
;; (test "setup for run" #t (begin (launch:setup)
;; (string? (getenv "MT_RUN_AREA_HOME"))))
|