86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
;;
;; test-a is waiting on test-b so we need to create a pattern for test-b given test-a and itemmap
(define (tests:extend-test-patts test-patt test-b test-a itemmap)
(let* ((patts (string-split test-patt ","))
(test-b-len (+ (string-length test-b) 1))
(patts-b (map (lambda (x)
(let* ((modpatt (if itemmap (db:convert-test-itempath x itemmap) x))
(newpatt (conc test-a "/," test-a "/" (substring modpatt test-b-len (string-length modpatt)))))
;; (print "in map, x=" x ", newpatt=" newpatt)
newpatt))
(filter (lambda (x)
(eq? (substring-index (conc test-b "/") x) 0))
patts))))
(string-intersperse (delete-duplicates (append patts (if (null? patts-b)
(list (conc test-a "/%"))
|
>
|
|
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
;;
;; test-a is waiting on test-b so we need to create a pattern for test-b given test-a and itemmap
(define (tests:extend-test-patts test-patt test-b test-a itemmap)
(let* ((patts (string-split test-patt ","))
(test-b-len (+ (string-length test-b) 1))
(patts-b (map (lambda (x)
(let* ((modpatt (if itemmap (db:convert-test-itempath x itemmap) x))
(newpatt (conc test-a "/" (substring modpatt test-b-len (string-length modpatt)))))
;; (conc test-a "/," test-a "/" (substring modpatt test-b-len (string-length modpatt)))))
;; (print "in map, x=" x ", newpatt=" newpatt)
newpatt))
(filter (lambda (x)
(eq? (substring-index (conc test-b "/") x) 0))
patts))))
(string-intersperse (delete-duplicates (append patts (if (null? patts-b)
(list (conc test-a "/%"))
|
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
|
;; (tests:match test-patts testname #f))
;; (map (lambda (testp)
;; (last (string-split testp "/")))
;; tests)))))
(define (tests:get-testconfig test-name test-registry system-allowed)
(let* ((test-path (hash-table-ref/default test-registry test-name (conc *toppath* "/tests/" test-name)))
(test-configf (conc test-path "/testconfig"))
(testexists (and (file-exists? test-configf)(file-read-access? test-configf)))
(tcfg (if testexists
(read-config test-configf #f system-allowed environ-patt: (if system-allowed
"pre-launch-env-vars"
#f))
#f)))
|
>
>
|
|
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
|
;; (tests:match test-patts testname #f))
;; (map (lambda (testp)
;; (last (string-split testp "/")))
;; tests)))))
(define (tests:get-testconfig test-name test-registry system-allowed)
(let* ((test-path (hash-table-ref/default
test-registry test-name
(conc *toppath* "/tests/" test-name)))
(test-configf (conc test-path "/testconfig"))
(testexists (and (file-exists? test-configf)(file-read-access? test-configf)))
(tcfg (if testexists
(read-config test-configf #f system-allowed environ-patt: (if system-allowed
"pre-launch-env-vars"
#f))
#f)))
|