Megatest

Diff
Login

Differences From Artifact [6528b06ddb]:

To Artifact [edf9715f73]:


342
343
344
345
346
347
348
349

350
351
352
353
354
355
356
357
358
359
360
361











362
363
364
365
366
367
368
342
343
344
345
346
347
348

349
350
351
352









353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370







-
+



-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+







	    (debug:print 2 "Output from running " fullrunscript ", pid " (vector-ref exit-info 0) " in work area " 
			 work-area ":\n====\n exit code " (vector-ref exit-info 2) "\n" "====\n")
	    (sqlite3:finalize! db)
	    (if (not (vector-ref exit-info 1))
		(exit 4)))))))

;; set up the very basics needed for doing anything here.
(define (setup-for-run)
(define (setup-for-run toppath)
  ;; would set values for KEYS in the environment here for better support of env-override but 
  ;; have chicken/egg scenario. need to read megatest.config then read it again. Going to 
  ;; pass on that idea for now.
  (find-and-read-config (if (args:get-arg "-config")
			    (args:get-arg "-config") 
			    "megatest.config")
			environ-patt: "env-override"))
        ;; (*configdat*  (if (car *configinfo*)(car *configinfo*) #f))
	;; (*toppath*    (if (car *configinfo*)(cadr *configinfo*) #f)))
    ;; (if *toppath*
    ;;	(setenv "MT_RUN_AREA_HOME" *toppath*) ;; to be deprecated
    ;;	(debug:print 0 "ERROR: failed to find the top path to your run setup."))
  (let ((configdat (find-and-read-config (if (args:get-arg "-config")
					     (args:get-arg "-config") 
					     (conc toppath "/megatest.config"))
					 environ-patt: "env-override")))
    (debug:print 0 "NOTE: handle MT_RUN_AREA_HOME here!")
    configdat))
;; (*configdat*  (if (car *configinfo*)(car *configinfo*) #f))
;; (*toppath*    (if (car *configinfo*)(cadr *configinfo*) #f)))
;; (if *toppath*
;;	(setenv "MT_RUN_AREA_HOME" *toppath*) ;; to be deprecated
;;	(debug:print 0 "ERROR: failed to find the top path to your run setup."))

(define (get-best-disk confdat)
  (let* ((disks    (hash-table-ref/default confdat "disks" #f))
	 (best     #f)
	 (bestsize 0))
    (if disks 
	(for-each