Megatest

Diff
Login

Differences From Artifact [79d9696058]:

To Artifact [0136625b06]:


78
79
80
81
82
83
84




85
86
87
88
89
90
91
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95







+
+
+
+







(use sparse-vectors)

(require-library mutils)

(define *usage-log-file* #f)    ;; put path to file for logging usage in this var in the ~/.megatestrc file
(define *usage-use-seconds* #t) ;; for Epoc seconds in usage logging change this to #t in ~/.megatestrc file

;; 'http or 'tcp
;; (rmt:transport-mode 'tcp)
(rmt:transport-mode 'http)

(dbfile:db-init-proc db:initialize-main-db)

;; load the ~/.megatestrc file, put (use trace)(trace-call-sites #t)(trace function-you-want-to-trace) in this file
;;
(let ((debugcontrolf (conc (get-environment-variable "HOME") "/.megatestrc")))
  (if (common:file-exists? debugcontrolf)
      (load debugcontrolf)))
920
921
922
923
924
925
926
927
928




929
930
931
932
933
934
935
924
925
926
927
928
929
930


931
932
933
934
935
936
937
938
939
940
941







-
-
+
+
+
+







;;   we start the server if not running else start the client thread
;;======================================================================

;; Server? Start up here.
;;
(if (args:get-arg "-server")
    (let ((tl        (launch:setup)))
      ;; (server:launch 0 'http)
      (http-transport:launch)
      (case (rmt:transport-mode)
	((http)(http-transport:launch))
	((tcp) (tt:start-server tl))
	(else (debug:print 0 "ERROR: rmt:transport-mode value not recognised "(rmt:transport-mode))))
      (set! *didsomething* #t)))

;; The adjutant is a bit different, it does NOT run (launch:setup) as it is not necessarily tied to
;; a specific Megatest area. Detail are being hashed out and this may change.
;;
(if (args:get-arg "-adjutant")
    (begin