Megatest

Diff
Login

Differences From Artifact [073256ec29]:

To Artifact [958ed9b034]:


301
302
303
304
305
306
307





308

309
310
311
312
313
314
315
301
302
303
304
305
306
307
308
309
310
311
312

313
314
315
316
317
318
319
320







+
+
+
+
+
-
+








;;======================================================================
;; 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? Start up here.
    ;;
    (let ((tl        (setup-for-run))
	  (transport (or (configf:lookup *configdat* "setup" "transport")
    (let ((transport (args:get-arg "-transport" "http")))
			 (args:get-arg "-transport" "http"))))
      (debug:print 2 "Launching server using transport " transport)
      (server:launch (string->symbol transport)))

    ;; Not a server? This section will decide how to communicate
    ;;
    (if (not (null? (lset-intersection 
		     equal?
428
429
430
431
432
433
434

435

436
437
438
439
440
441
442
433
434
435
436
437
438
439
440

441
442
443
444
445
446
447
448







+
-
+







       ((string=? (args:get-arg "-dumpmode") "json")
	(json-write data))
       (else
	(debug:print 0 "ERROR: -dumpmode of " (args:get-arg "-dumpmode") " not recognised")))
      (set! *didsomething* #t)))

(if (args:get-arg "-show-config")
    (let ((tl   (setup-for-run))
    (let ((data *configdat*)) ;; (read-config "megatest.config" #f #t)))
	  (data *configdat*)) ;; (read-config "megatest.config" #f #t)))
      ;; keep this one local
      (cond 
       ((not (args:get-arg "-dumpmode"))
	(pp (hash-table->alist data)))
       ((string=? (args:get-arg "-dumpmode") "json")
	(json-write data))
       (else