@@ -81,11 +81,11 @@ ;; (define (tests:match->sqlqry patterns) (if (string? patterns) (let ((patts (string-split patterns ","))) (if (null? patts) ;;; no pattern(s) means no match, we will do no query - "" + #f (let loop ((patt (car patts)) (tal (cdr patts)) (res '())) ;; (print "loop: patt: " patt ", tal " tal) (let* ((patt-parts (string-match (regexp "^([^\\/]*)(\\/(.*)|)$") patt)) @@ -95,11 +95,12 @@ (item-qry (db:patt->like "item_path" item-patt)) (qry (conc "(" test-qry " AND " item-qry ")"))) ;; (print "tests:match => patt-parts: " patt-parts ", test-patt: " test-patt ", item-patt: " item-patt) (if (null? tal) (string-intersperse (append (reverse res)(list qry)) " OR ") - (loop (car tal)(cdr tal)(cons qry res))))))))) + (loop (car tal)(cdr tal)(cons qry res))))))) + #f)) ;; get the previous record for when this test was run where all keys match but runname ;; returns #f if no such test found, returns a single test record if found (define (test:get-previous-test-run-record db run-id test-name item-path) (let* ((keys (db:get-keys db))