Megatest

Diff
Login

Differences From Artifact [45bbca6979]:

To Artifact [3f7ba45550]:


728
729
730
731
732
733
734


735
736


737
738
739
740
741
742
743
744
745

746

747
748
749
750
751

752
753
754
755
756
757
758
728
729
730
731
732
733
734
735
736


737
738
739
740
741
742
743
744
745
746
747
748

749
750
751
752
753

754
755
756
757
758
759
760
761







+
+
-
-
+
+









+
-
+




-
+







	     (getenv "MT_RUNNAME")   "/"
	     (getenv "MT_TEST_NAME") "/"
	     (if (or (getenv "MT_ITEMPATH")
		     (not (string=? "" (getenv "MT_ITEMPATH"))))
		 (conc "/" (getenv "MT_ITEMPATH"))))))

(define (tests:get-testconfig test-name test-registry system-allowed #!key (force-create #f))
  (let* ((treg              (or test-registry
				(tests:get-all)))
  (let* ((test-path         (hash-table-ref/default 
			     test-registry test-name 
	 (test-path         (hash-table-ref/default 
			     treg test-name 
			     (conc *toppath* "/tests/" test-name)))
	 (test-configf (conc test-path "/testconfig"))
	 (testexists   (and (file-exists? test-configf)(file-read-access? test-configf)))
	 (cache-path   (tests:get-test-path-from-environment))
	 (cache-exists (and cache-path 
			    (not force-create)  ;; if force-create then pretend there is no cache to read
			    (file-exists? (conc cache-path "/.testconfig"))))
	 (cache-file   (conc cache-path "/.testconfig"))
	 (tcfg         (if testexists
			   (or (and (not force-create)
			   (or (and cache-exists
				    cache-exists
				    (handle-exceptions
				     exn
				     (begin
				       (debug:print 0 "WARNING: Failed to read " cache-file) 
				       #f)
				       (make-hash-table)) ;; better to return a hash and keep going - I think
				     (configf:read-alist cache-file)))
			       (read-config test-configf #f system-allowed environ-patt: (if system-allowed
											     "pre-launch-env-vars"
											     #f)))
			   #f)))
    (hash-table-set! *testconfigs* test-name tcfg)
    (if (and testexists