Megatest

Diff
Login

Differences From Artifact [4cf1c3bb0a]:

To Artifact [0b83b5ae2b]:


1115
1116
1117
1118
1119
1120
1121
1122

1123
1124

1125
1126
1127
1128
1129
1130
1131
1115
1116
1117
1118
1119
1120
1121

1122
1123

1124
1125
1126
1127
1128
1129
1130
1131







-
+

-
+







		 (set! res #t))))
	 (string-split patts ","))
	res)
      #t))

;;======================================================================
;; '(print (string-intersperse (map cadr (hash-table-ref/default (configf:read-config "megatest.config" \#f \#t) "disks" '"'"'("none" ""))) "\n"))'
(define (common:get-disks #!key (configf #f))
(define (common:get-disks configf)
  (hash-table-ref/default 
   (or configf (configf:read-config "megatest.config" #f #t))
   configf ;; (or configf (configf:read-config "megatest.config" #f #t))
   "disks" '("none" "")))

;;======================================================================
;; return first command that exists, else #f
;;
(define (common:which cmds)
  (if (null? cmds)
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234



1235
1236
1237


1238
1239
1240
1241
1242
1243
1244
1225
1226
1227
1228
1229
1230
1231



1232
1233
1234
1235
1236

1237
1238
1239
1240
1241
1242
1243
1244
1245







-
-
-
+
+
+


-
+
+







;; T A R G E T S  ,   S T A T E ,   S T A T U S ,   
;;                    R U N N A M E    A N D   T E S T P A T T
;;======================================================================

;;======================================================================
;; (map print (map car (hash-table->alist (configf:read-config "runconfigs.config" #f #t))))
;;
(define (common:get-runconfig-targets #!key (configf #f))
  (let ((targs       (sort (map car (hash-table->alist
				     (or configf ;; NOTE: There is no value in using runconfig:read here.
(define (common:get-runconfig-targets configf) ;; #!key (configf #f))
  (let ((targs       (sort (map car (hash-table->alist configf
						       #;(or configf ;; NOTE: There is no value in using runconfig:read here.
					 (configf:read-config (conc *toppath* "/runconfigs.config")
						      #f #t)
					 (make-hash-table))))
						       (make-hash-table))
						       ))
			   string<?))
	(target-patt (args:get-arg "-target")))
    (if target-patt
	(filter (lambda (x)
		  (patt-list-match x target-patt))
		targs)
	targs)))
3155
3156
3157
3158
3159
3160
3161
3162

3163
3164
3165
3166
3167
3168
3169
3156
3157
3158
3159
3160
3161
3162

3163
3164
3165
3166
3167
3168
3169
3170







-
+







;; first read ~/views.config if it exists, then read $MTRAH/views.config if it exists
;;
(define (common:load-views-config)
  (let* ((view-cfgdat    (make-hash-table))
	 (home-cfgfile   (conc (get-environment-variable "HOME") "/.mtviews.config"))
	 (mthome-cfgfile (conc *toppath* "/.mtviews.config")))
    (if (common:file-exists? mthome-cfgfile)
	(configf:read-config mthome-cfgfile view-cfgdat #t))
	(configf:read-config mthome-cfgfile view-cfgdat))
    ;; we load the home dir file AFTER the MTRAH file so the user can clobber settings when running the dashboard in read-only areas
    (if (common:file-exists? home-cfgfile)
	(configf:read-config home-cfgfile view-cfgdat #t))
    view-cfgdat))

;;======================================================================
;; H I E R A R C H I C A L   H A S H   T A B L E S