33
34
35
36
37
38
39
40
41
42
43
44
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
|
(print "start dir: " (current-directory))
(define toppath (current-directory))
(test #f #f (server:check-if-running toppath)) ;; these are used by server:start-and-wait
(test #f #t (list? (server:get-list toppath)))
(let ((servers (server:get-list toppath)))
(print "Known servers: " servers)
(if (not (null? servers))
(begin
(for-each
(lambda (server)
(let ((pid (list-ref server 4)))
(thread-start!
(make-thread
(lambda ()
(print "Attempting to kill server: " server)
(print "Attempting to kill pid " pid)
(system (conc "kill " pid))
(thread-sleep! 2)
(system (conc "kill -9 " pid)))
(conc pid)))))
servers)
(thread-sleep! 2))))
(test #f '() (server:get-best '()))
(test #f #t (string? (server:start-and-wait *toppath*)))
(test "setup for run" #t (begin (launch:setup)
(string? (getenv "MT_RUN_AREA_HOME"))))
(test #f #t (vector? (client:setup toppath)))
(test #f #t (vector? (rmt:get-connection-info toppath))) ;; TODO: push areapath down.
(test #f #t (string? (server:check-if-running ".")))
;; DEF (test #f #f (rmt:send-receive-no-auto-client-setup *runremote* 'get-keys #f '()))
;; DEF (rmt:kill-server run-id)
;; DEF (rmt:start-server run-id)
|
>
>
>
>
>
>
>
>
>
|
>
|
>
|
33
34
35
36
37
38
39
40
41
42
43
44
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
71
72
73
74
75
76
77
78
79
80
|
(print "start dir: " (current-directory))
(define toppath (current-directory))
(test #f #f (server:check-if-running toppath)) ;; these are used by server:start-and-wait
(test #f #t (list? (server:get-list toppath)))
(test #f '() (server:get-best '()))
(test #f #t (common:simple-file-lock-and-wait "test.lock" expire-time: 15))
(test #f "test.lock" (common:simple-file-release-lock "test.lock"))
(test #f #t (server:get-best-guess-address (get-host-name)))
(test #f #t (string? (common:get-homehost)))
;; clean out any old running servers
;;
(let ((servers (server:get-list toppath)))
(print "Known servers: " servers)
(if (not (null? servers))
(begin
(for-each
(lambda (server)
(let ((pid (list-ref server 4)))
(thread-start!
(make-thread
(lambda ()
(print "Attempting to kill server: " server)
(print "Attempting to kill pid " pid)
(system (conc "kill " pid))
(thread-sleep! 2)
(system (conc "kill -9 " pid)))
(conc pid)))))
servers)
(thread-sleep! 2))))
;; let's start up a server the mechanical way
(system "nbfake megatest -server -")
(thread-sleep! 2)
;; (test #f #t (string? (server:start-and-wait *toppath*)))
(test "setup for run" #t (begin (launch:setup)
(string? (getenv "MT_RUN_AREA_HOME"))))
(test #f #t (client:setup-http toppath))
(test #f #t (vector? (client:setup toppath)))
(test #f #t (vector? (rmt:get-connection-info toppath))) ;; TODO: push areapath down.
(test #f #t (string? (server:check-if-running ".")))
;; DEF (test #f #f (rmt:send-receive-no-auto-client-setup *runremote* 'get-keys #f '()))
;; DEF (rmt:kill-server run-id)
;; DEF (rmt:start-server run-id)
|