Megatest

Diff
Login

Differences From Artifact [7ecf995af8]:

To Artifact [b3a1138ee1]:


1205
1206
1207
1208
1209
1210
1211
1212




























1213
1214
1215
1216
1217
1218
1219
			 cache-file
			 (file-write-access? cache-path))
		    (let ((tpath (conc cache-path "/.testconfig")))
		      (debug:print-info 1 *default-log-port* "Caching testconfig for " test-name " in " tpath)
                      (if (not (common:in-running-test?))
                          (configf:write-alist tcfg tpath))))
		tcfg))))))
  




























;; sort tests by priority and waiton
;; Move test specific stuff to a test unit FIXME one of these days
(define (tests:sort-by-priority-and-waiton test-records)
  (if (eq? (hash-table-size test-records) 0)
      '()
      (let* ((mungepriority (lambda (priority)
			      (if priority







|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
			 cache-file
			 (file-write-access? cache-path))
		    (let ((tpath (conc cache-path "/.testconfig")))
		      (debug:print-info 1 *default-log-port* "Caching testconfig for " test-name " in " tpath)
                      (if (not (common:in-running-test?))
                          (configf:write-alist tcfg tpath))))
		tcfg))))))

;; forced read and write of cache of testconfig for the exection of the test
;;
(define (tests:forced-get-testconfig  test-name item-path)
  (let* ((cache-path   (tests:get-test-path-from-environment))
	 (cache-file   (and cache-path (conc cache-path "/.testconfig")))
	 (test-full-name (if (and item-path (not (string-null? item-path)))
                             (conc test-name "/" item-path)
                             test-name)))
    ;; no cached data available
    (let* ((treg         (tests:get-all)) ;; we need the tests info from all the possible tests paths
	   (test-path    (or (hash-table-ref/default treg test-name #f)
			     (conc *toppath* "/tests/" test-name)))
	   (test-configf (conc test-path "/testconfig"))
	   (testexists   (file-read-access? test-configf))
	   (tcfg         (if testexists
			     (read-config test-configf #f #t ;; system-allowed
					  environ-patt: "pre-launch-env-vars"
					  )
			     #f)))
      (if tcfg (hash-table-set! tcfg "have fulldata" #t)) ;; mark this as fully read data
      (if tcfg (hash-table-set! *testconfigs* test-full-name tcfg))
      (if (and testexists
	       (file-write-access? cache-path))
	  (let ((tpath (conc cache-path "/.testconfig")))
	    (debug:print-info 1 *default-log-port* "Caching testconfig for " test-name " in " tpath)
	    (configf:write-alist tcfg tpath)))
      tcfg)))

;; sort tests by priority and waiton
;; Move test specific stuff to a test unit FIXME one of these days
(define (tests:sort-by-priority-and-waiton test-records)
  (if (eq? (hash-table-size test-records) 0)
      '()
      (let* ((mungepriority (lambda (priority)
			      (if priority