Megatest

Check-in [931244e94b]
Login
Overview
Comment:Kill any residual servers at the beginning of all-rmt unit test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.65
Files: files | file ages | folders
SHA1: 931244e94b062bb1a9d7af0078fc55465079d14c
User & Date: mrwellan on 2019-08-30 10:59:30
Other Links: branch diff | manifest | tags
Context
2019-09-05
15:29
Added some initial checks at the beginning of all-rmt.scm to gate the more complex tests from simple problems. check-in: 20a8d29b9b user: mrwellan tags: v1.65
2019-08-30
11:39
Fixed missing params check-in: c4b5049ef6 user: mrwellan tags: v1.65-code-cleanup-new
10:59
Kill any residual servers at the beginning of all-rmt unit test. check-in: 931244e94b user: mrwellan tags: v1.65
2019-08-29
10:28
Added dependency between all-rmt and all-api in tests/Makefile check-in: 769eada458 user: mrwellan tags: v1.65
Changes

Modified tests/unittests/all-rmt.scm from [08927c7296] to [89dcfe42a3].

30
31
32
33
34
35
36






















37
38
39
40
41
42
43
44
;;   DEP - function is deprecated, no point in testing
;;   NED - function nested under others, no test needed.
;;   DEF - deferred

(print "start dir: " (current-directory))
       
(define toppath (current-directory))






















(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 ".")))







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|







30
31
32
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
;;   DEP - function is deprecated, no point in testing
;;   NED - function nested under others, no test needed.
;;   DEF - deferred

(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 ".")))