Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -3273,10 +3273,24 @@ (equal? (string-substitute pattern replacement patha) (string-substitute pattern replacement pathb)) (equal? (string-substitute pattern "" patha) (string-substitute pattern "" pathb)))) (equal? patha pathb))) + +;; A routine to convert test/itempath using a itemmap +(define (db:convert-test-itempath path-in itemmap) + (debug:print-info 6 "ITEMMAP is " itemmap) + (let* ((mapparts (string-split itemmap)) + (pattern (car mapparts)) + (replacement (if (> (length mapparts) 1) (cadr mapparts) "")) + (path-parts (string-split path-in "/")) + (test-name (car path-parts)) + (item-path (string-intersperse (cdr path-parts) "/"))) + (conc test-name "/" + (if replacement + (string-substitute pattern replacement item-path) + (string-substitute pattern "" path-in))))) ;; the new prereqs calculation, looks also at itempath if specified ;; all prereqs must be met: ;; if prereq test with itempath='' is COMPLETED and PASS, WARN, CHECK, or WAIVED then prereq is met ;; if prereq test with itempath=ref-item-path and COMPLETED with PASS, WARN, CHECK, or WAIVED then prereq is met Index: multi-dboard.scm ================================================================== --- multi-dboard.scm +++ multi-dboard.scm @@ -773,12 +773,10 @@ (make-hash-table) ;; tab-id -> areaname ))) (hash-table-set! *windows* window-id data) (iup:show (dashboard:main-panel data window-id)) (iup:main-loop))) - - ;; ease debugging by loading ~/.dashboardrc (let ((debugcontrolf (conc (get-environment-variable "HOME") "/.dashboardrc"))) (if (file-exists? debugcontrolf) (load debugcontrolf))) Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -422,11 +422,12 @@ (debug:print-info 0 "New test patts: " new-test-patts ", prev test patts: " test-patts) (set! required-tests (cons (conc waiton "/") required-tests)) (set! test-patts new-test-patts)) (begin (debug:print-info 0 "Adding non-itemized test " waiton " to required-tests") - (set! required-tests (cons waiton required-tests))))) + (set! required-tests (cons waiton required-tests)) + (set! test-patts new-test-patts)))) (begin (debug:print-info 0 "No testconfig info yet for " waiton ", setting up to re-process it") (set! tal (append (cons waiton tal)(list hed))))) ;; (cons (conc waiton "/") required-tests)) ;; NOPE: didn't work. required needs to be plain test names. Try tacking on to test-patts Index: tests.scm ================================================================== --- tests.scm +++ tests.scm @@ -78,11 +78,12 @@ ;; (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 ((newpatt (conc test-a "/" (substring x test-b-len (string-length 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)))) Index: tests/dep-tests/tests/genlib/testconfig ================================================================== --- tests/dep-tests/tests/genlib/testconfig +++ tests/dep-tests/tests/genlib/testconfig @@ -3,6 +3,6 @@ [itemstable] VIEWTYPE layout schematic [requirements] waiton #{get #{getenv DEPS} genlib} - +itemmap /.* Index: tests/dep-tests/tests/test1/testconfig ================================================================== --- tests/dep-tests/tests/test1/testconfig +++ tests/dep-tests/tests/test1/testconfig @@ -2,6 +2,6 @@ [include #{getenv MT_RUN_AREA_HOME}/common_itemstable.testconfig] [requirements] waiton #{get #{getenv DEPS} test1} - +itemmap /.*