Megatest

Check-in [ae88a2163a]
Login
Overview
Comment:No homehost, the beginning.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.7001-multi-db-nohome
Files: files | file ages | folders
SHA1: ae88a2163a39802b75bd617e78930e65907077d3
User & Date: mrwellan on 2022-05-09 14:41:45
Other Links: branch diff | manifest | tags
Context
2022-05-15
05:06
Merging the v1.7001-multi-db-nohome branch into single commit to rebase forward Closed-Leaf check-in: f5e182b504 user: matt tags: v1.7001-multi-db-nohome-for-rebase
2022-05-09
19:43
common:get-homehost returns '(#f . #f) if there is no homehost file. check-in: 4db396b0c0 user: matt tags: v1.7001-multi-db-nohome
14:41
No homehost, the beginning. check-in: ae88a2163a user: mrwellan tags: v1.7001-multi-db-nohome
14:12
Allow stealing db lock rather than just failing Closed-Leaf check-in: 02526c166e user: mrwellan tags: v1.7001, v1.7001-multi-db-rb01
Changes

Modified server.scm from [6d65c175e8] to [b26c3818fa].

109
110
111
112
113
114
115









116
117
118
119
120
121
122
    ((rpc)  (db:obj->string (vector success/fail query-sig result)))
    ((http) (db:obj->string (vector success/fail query-sig result)))
    ((fs)   result)
    (else 
     (debug:print-error 0 *default-log-port* "unrecognised transport type: " *transport-type*)
     result)))










;; Given an area path,  start a server process    ### NOTE ### > file 2>&1 
;; if the target-host is set 
;; try running on that host
;;   incidental: rotate logs in logs/ dir.
;;
(define  (server:run areapath) ;; areapath is *toppath* for a given testsuite area
  (let* ((curr-host   (get-host-name))







>
>
>
>
>
>
>
>
>







109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
    ((rpc)  (db:obj->string (vector success/fail query-sig result)))
    ((http) (db:obj->string (vector success/fail query-sig result)))
    ((fs)   result)
    (else 
     (debug:print-error 0 *default-log-port* "unrecognised transport type: " *transport-type*)
     result)))

(define (server:what-type-of-invocation)
  (cond
   ((args:get-arg "-run")       "run")
   ((args:get-arg "-server")    "server")
   ((args:get-arg "-execute")   "execute")
   ((or (args:get-arg "-remove-runs")) "run-related")
   ((string-search (car (argv)) "dboard") "dboard")
   (else (conc "other:"(string-intersperse (command-line-arguments) "_")))))

;; Given an area path,  start a server process    ### NOTE ### > file 2>&1 
;; if the target-host is set 
;; try running on that host
;;   incidental: rotate logs in logs/ dir.
;;
(define  (server:run areapath) ;; areapath is *toppath* for a given testsuite area
  (let* ((curr-host   (get-host-name))
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
	 (profile-mode (or (configf:lookup *configdat* "misc" "profilesw")
			   ""))
	 (cmdln (conc (common:get-megatest-exe)
		      " -server " (or target-host "-") (if (equal? (configf:lookup *configdat* "server" "daemonize") "yes")
							   " -daemonize "
							   "")
		      ;; " -log " logfile
		      " -m testsuite:" testsuite
		      " " profile-mode
		      )) ;; (conc " >> " logfile " 2>&1 &")))))
	 (log-rotate  (make-thread common:rotate-logs  "server run, rotate logs thread")) ;; why are we rotating logs here? This is a sensitive location with a lot going on!?
         (load-limit  (configf:lookup-number *configdat* "jobtools" "max-server-start-load" default: 3.0)))
    ;; we want the remote server to start in *toppath* so push there
    (push-directory areapath)
    (debug:print 0 *default-log-port* "INFO: Trying to start server (" cmdln ") ...")







|







140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
	 (profile-mode (or (configf:lookup *configdat* "misc" "profilesw")
			   ""))
	 (cmdln (conc (common:get-megatest-exe)
		      " -server " (or target-host "-") (if (equal? (configf:lookup *configdat* "server" "daemonize") "yes")
							   " -daemonize "
							   "")
		      ;; " -log " logfile
		      " -m testsuite:"testsuite":"(server:what-type-of-invocation)
		      " " profile-mode
		      )) ;; (conc " >> " logfile " 2>&1 &")))))
	 (log-rotate  (make-thread common:rotate-logs  "server run, rotate logs thread")) ;; why are we rotating logs here? This is a sensitive location with a lot going on!?
         (load-limit  (configf:lookup-number *configdat* "jobtools" "max-server-start-load" default: 3.0)))
    ;; we want the remote server to start in *toppath* so push there
    (push-directory areapath)
    (debug:print 0 *default-log-port* "INFO: Trying to start server (" cmdln ") ...")