@@ -3266,13 +3266,13 @@ ;; A routine to map itempaths using a itemmap (define (db:compare-itempaths patha pathb itemmap) (debug:print-info 6 "ITEMMAP is " itemmap) (if itemmap - (let ((path-b-mapped (db:convert-test-itempath pathb itemmap))) - (debug:print-info 6 "ITEMMAP is " itemmap ", path: " pathb ", mapped path: " path-b-mapped) - (equal? patha pathb)) + (let ((pathb-mapped (db:multi-pattern-apply pathb itemmap))) + (debug:print-info 6 "ITEMMAP is " itemmap ", path: " pathb ", mapped path: " pathb-mapped) + (equal? patha pathb-mapped)) (equal? patha pathb))) ;; (let* ((mapparts (string-split itemmap)) ;; (pattern (car mapparts)) ;; (replacement (if (> (length mapparts) 1) (cadr mapparts) ""))) @@ -3281,10 +3281,13 @@ ;; (string-substitute pattern replacement pathb)) ;; (equal? (string-substitute pattern "" patha) ;; (string-substitute pattern "" pathb)))) ;; A routine to convert test/itempath using a itemmap +;; NOTE: to process only an itempath (i.e. no prepended testname) +;; just call db:multi-pattern-apply +;; (define (db:convert-test-itempath path-in itemmap) (debug:print-info 6 "ITEMMAP is " itemmap) (let* ((path-parts (string-split path-in "/")) (test-name (if (null? path-parts) "" (car path-parts))) (item-path (string-intersperse (if (null? path-parts) '() (cdr path-parts)) "/")))