Megatest

Check-in [0fe0deb194]
Login
Overview
Comment:initial forked launch; broken @ rmt.scm:58: mutex-lock!
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | v1.65-forked-launch
Files: files | file ages | folders
SHA1: 0fe0deb19435d23d4b71a8b359dcaf38963b7e2e
User & Date: bjbarcla on 2018-01-19 18:06:20
Original Comment: initial forked launch; broken @ rmt.scm:58: mutex-lock! -branch v1.65-forked-launch
Other Links: branch diff | manifest | tags
Context
2018-01-19
18:06
initial forked launch; broken @ rmt.scm:58: mutex-lock! Leaf check-in: 0fe0deb194 user: bjbarcla tags: v1.65-forked-launch
17:42
fixed issue in subrun:get-runarea Leaf check-in: ece2bfcae2 user: bjbarcla tags: v1.65-catch-failed-launch
Changes

Modified common.scm from [16edb8a716] to [c4d56030c9].

1186
1187
1188
1189
1190
1191
1192

1193
1194

1195
1196
1197
1198
1199
1200
1201
1186
1187
1188
1189
1190
1191
1192
1193
1194

1195
1196
1197
1198
1199
1200
1201
1202







+

-
+







	    (set! res #t)
	    (if (equal? (getenv "MT_USE_CACHE") "no")
		(set! res #f))))    ;; overrides -no-cache switch
    res))
  
;; force use of server?
;;
(define *common:local-force-server* #f)
(define (common:force-server?)
  (let* ((force-setting (configf:lookup *configdat* "server" "force"))
  (let* ((force-setting (or *common:local-force-server* (configf:lookup *configdat* "server" "force")))
	 (force-type    (if force-setting (string->symbol force-setting) #f))
	 (force-result  (case force-type
			  ((#f)     #f)
			  ((always) #t)
			  ((test)   (if (args:get-arg "-execute") ;; we are in a test
					#t
					#f))

Modified launch.scm from [a20a5610e0] to [7ddd024109].

1314
1315
1316
1317
1318
1319
1320









1321

1322
1323
1324
1325
1326
1327
1328
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329

1330
1331
1332
1333
1334
1335
1336
1337







+
+
+
+
+
+
+
+
+
-
+







;; 1. look though disks list for disk with most space
;; 2. create run dir on disk, path name is meaningful
;; 3. create link from run dir to megatest runs area 
;; 4. remotely run the test on allocated host
;;    - could be ssh to host from hosts table (update regularly with load)
;;    - could be netbatch
;;      (launch-test db (cadr status) test-conf))

(define (launch-test . args)
  (let ((child-pid (process-fork)))
    (if (zero? child-pid)
        (begin
          (set! *common:local-force-server* 'always)
          (apply launch-test-inner args))
        #t)))

(define (launch-test test-id run-id run-info keyvals runname test-conf test-name test-path itemdat params)
(define (launch-test-inner test-id run-id run-info keyvals runname test-conf test-name test-path itemdat params)
  (mutex-lock! *launch-setup-mutex*) ;; setting variables and processing the testconfig is NOT thread-safe, reuse the launch-setup mutex
  (let* ( ;; (lock-key        (conc "test-" test-id))
	;; (got-lock        (let loop ((lock        (rmt:no-sync-get-lock lock-key))
	;; 			     (expire-time (+ (current-seconds) 15))) ;; give up on getting the lock and steal it after 15 seconds
	;; 		    (if (car lock)
	;; 			#t
	;; 			(if (> (current-seconds) expire-time)