Megatest

Diff
Login

Differences From Artifact [ec07a7aa76]:

To Artifact [30a42f8695]:


102
103
104
105
106
107
108
109





110
111
112
113
114
115
116
102
103
104
105
106
107
108

109
110
111
112
113
114
115
116
117
118
119
120







-
+
+
+
+
+







	  (set-megatest-env-vars db run-id) ;; these may be needed by the launching process
	  (change-directory work-area) 
	  (set-run-config-vars db run-id)
	  ;; environment overrides are done *before* the remaining critical envars.
	  (alist->env-vars env-ovrd)
	  (set-megatest-env-vars db run-id)
	  (set-item-env-vars itemdat)
	  (save-environment-as-files "megatest")
	  (save-environment-as-files "megatest" 
				     flst:      '("DISPLAY")
				     overrides: (if (config-lookup *configdat* "setup" "homedir")
						    (list (list "HOME" (config-lookup *configdat* "setup" "homedir"))
						    (list (list "HOME" work-area)))))
	  (test-set-meta-info db run-id test-name itemdat)
	  (test-set-status! db test-id "REMOTEHOSTSTART" "n/a" (args:get-arg "-m") #f)
	  (if (args:get-arg "-xterm")
	      (set! fullrunscript "xterm")
	      (if (and fullrunscript (not (file-execute-access? fullrunscript)))
		  (system (conc "chmod ug+x " fullrunscript))))
	  ;; We are about to actually kick off the test
352
353
354
355
356
357
358







359
360
361
362
363
364
365
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376







+
+
+
+
+
+
+







  ;; pass on that idea for now.
  (set! *configinfo* (find-and-read-config (if (args:get-arg "-config")(args:get-arg "-config") "megatest.config") environ-patt: "env-override"))
  (set! *configdat*  (if (car *configinfo*)(car *configinfo*) #f))
  (set! *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."))
  ;; here we extract the path to the megatest executable and append it to the path
  (let ((path (pathname-directory (car (argv)))))
    (if path
	(setenv "PATH" (conc
			(get-environment-variable "PATH")
			":"
			(posix-extras#resolve-pathname path)))))
  *toppath*)

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