Megatest

Changes On Branch v1.65-forked-launch
Login

Changes In Branch v1.65-forked-launch Excluding Merge-Ins

This is equivalent to a diff from ece2bfcae2 to 0fe0deb194

2018-01-29
12:11
added launch fail detection and fix for test panel crash on missing ld_lib_path issue check-in: fe0ca9de59 user: bjbarcla tags: v1.65
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
14:56
updated testpanel launcher to launch dashboard rather than sourcing cfg.sh then dboard as check-in: 776745031a user: bjbarcla tags: v1.65-catch-failed-launch

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)