10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
;;======================================================================
;; launch a task - this runs on the originating host, tests themselves
;;
;;======================================================================
(use regex regex-case base64 sqlite3 srfi-18 directory-utils posix-extras z3 call-with-environment-variables csv)
(use typed-records pathname-expand)
(import (prefix base64 base64:))
(import (prefix sqlite3 sqlite3:))
(declare (unit launch))
(declare (uses common))
(declare (uses configf))
|
|
|
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
;;======================================================================
;; launch a task - this runs on the originating host, tests themselves
;;
;;======================================================================
(use regex regex-case base64 sqlite3 srfi-18 directory-utils posix-extras z3 call-with-environment-variables csv)
(use typed-records pathname-expand matchable)
(import (prefix base64 base64:))
(import (prefix sqlite3 sqlite3:))
(declare (unit launch))
(declare (uses common))
(declare (uses configf))
|
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
|
(if (equal? homehost bestadrs) ;; we are likely on the homehost
(debug:print-info 0 *default-log-port* "test " test-name " appears to be running on the homehost " homehost)
(let ((host-port (if serverurl (string-split serverurl ":") #f)))
(if (not *runremote*)(set! *runremote* (make-remote))) ;; init *runremote*
(if (string? homehost)
(if (and host-port
(> (length host-port) 1))
(match-let* (((host port) host-port)
((start-res) (http-transport:client-connect host port))
(ping-res (rmt:login-no-auto-client-setup start-res)))
(if (and start-res
ping-res)
(let ((url (http-transport:server-dat-make-url start-res)))
(remote-conndat-set! *runremote* start-res)
(remote-url-set! *runremote* url)
(debug:print-info 0 *default-log-port* "connected to " url " using CMDINFO data."))
(debug:print-info 0 *default-log-port* "received " host ":" port " for url but could not connect.")
)))))))
;; NFS might not have propagated the directory meta data to the run host - give it time if needed
(let loop ((count 0))
(if (or (file-exists? top-path)
(> count 10))
|
>
|
|
|
|
|
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
|
(if (equal? homehost bestadrs) ;; we are likely on the homehost
(debug:print-info 0 *default-log-port* "test " test-name " appears to be running on the homehost " homehost)
(let ((host-port (if serverurl (string-split serverurl ":") #f)))
(if (not *runremote*)(set! *runremote* (make-remote))) ;; init *runremote*
(if (string? homehost)
(if (and host-port
(> (length host-port) 1))
(let* ((host (car host-port))
(port (cadr host-port))
(start-res (http-transport:client-connect host port))
(ping-res (rmt:login-no-auto-client-setup start-res)))
(if (and start-res
ping-res)
(let ((url (http-transport:server-dat-make-url start-res)))
(remote-conndat-set! *runremote* start-res)
(remote-server-url-set! *runremote* url)
(debug:print-info 0 *default-log-port* "connected to " url " using CMDINFO data."))
(debug:print-info 0 *default-log-port* "received " host ":" port " for url but could not connect.")
)))))))
;; NFS might not have propagated the directory meta data to the run host - give it time if needed
(let loop ((count 0))
(if (or (file-exists? top-path)
(> count 10))
|