Megatest

Diff
Login

Differences From Artifact [878464164d]:

To Artifact [99fb9b6d7d]:


256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
      (set! *didsomething* #t)))

;;======================================================================
;; Start the server - can be done in conjunction with -runall or -runtests (one day...)
;;   we start the server if not running else start the client thread
;;======================================================================
(if (args:get-arg "-server")
    (let* ((toppath (setup-for-run))
	   (db      (if toppath (open-db) #f)))
      (debug:print-info 0 "Starting the standalone server")
      (if db 
	  (let* ((th2 (make-thread (lambda ()
				     (server:run (args:get-arg "-server")))))
		 (th3 (make-thread (lambda ()
				     (server:keep-running db)))))
	    (thread-start! th3)
	    (thread-start! th2)
	    (thread-join! th3)
	    (set! *didsomething* #t))
	  (debug:print 0 "ERROR: Failed to setup for megatest")))
    ;; not starting server? then start the client
    (if (server:client-setup)
	(debug:print-info 0 "connected as client")
	(begin
	  (debug:print 0 "ERROR: Failed to connect as client")
	  (exit))))

;;======================================================================
;; Remove old run(s)
;;======================================================================

;; since several actions can be specified on the command line the removal
;; is done first







<
<
<
<
<
<
<
|
<
<
<
<
<
<
|
<
<
<
<







256
257
258
259
260
261
262







263






264




265
266
267
268
269
270
271
      (set! *didsomething* #t)))

;;======================================================================
;; Start the server - can be done in conjunction with -runall or -runtests (one day...)
;;   we start the server if not running else start the client thread
;;======================================================================
(if (args:get-arg "-server")







    (server:launch)






    (server:client-launch))





;;======================================================================
;; Remove old run(s)
;;======================================================================

;; since several actions can be specified on the command line the removal
;; is done first
847
848
849
850
851
852
853




854
855
856
857
858
859
860
	    (current-input-port (make-gnu-readline-port "megatest> "))
	    (repl)))
      (set! *didsomething* #t)))

;;======================================================================
;; Exit and clean up
;;======================================================================





(if (not *didsomething*)
    (debug:print 0 help))

;; (if *runremote* (rpc:close-all-connections!))
    
(if (not (eq? *globalexitstatus* 0))







>
>
>
>







830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
	    (current-input-port (make-gnu-readline-port "megatest> "))
	    (repl)))
      (set! *didsomething* #t)))

;;======================================================================
;; Exit and clean up
;;======================================================================

;; this is the socket if we are a client
(if (socket? *runremote*)
    (close-socket *runremote*))

(if (not *didsomething*)
    (debug:print 0 help))

;; (if *runremote* (rpc:close-all-connections!))
    
(if (not (eq? *globalexitstatus* 0))