Comment: | Added multi-patt for itemmap |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.60 |
Files: | files | file ages | folders |
SHA1: |
ff97ef884fbbe060c02c900c64d4a5fa |
User & Date: | matt on 2015-08-25 00:30:40 |
Other Links: | branch diff | manifest | tags |
2015-08-25
| ||
09:58 | Bumped version check-in: f07a216e0d user: mrwellan tags: v1.60 | |
00:30 | Added multi-patt for itemmap check-in: ff97ef884f user: matt tags: v1.60 | |
2015-08-21
| ||
11:13 | Don't use bsub check-in: bded91c3b8 user: mrwellan tags: v1.60 | |
Modified db.scm from [8a33d5ef0f] to [770c175ffa].
3274 3275 3276 3277 3278 3279 3280 | (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) | < < < | > > > > | > > > > > > > > | > > > | > > > | 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 | (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* ((path-parts (string-split path-in "/")) (test-name (car path-parts)) (item-path (string-intersperse (cdr path-parts) "/"))) (conc test-name "/" (db:multi-pattern-apply item-path itemmap)))) ;; patterns are: ;; "rx1" "replacement1"\n ;; "rx2" "replacement2" ;; etc. ;; (define (db:multi-pattern-apply item-path itemmap) (let ((all-patts (string-split itemmap "\n"))) (if (null? all-patts) item-path (let loop ((hed (car all-patts)) (tal (cdr all-patts)) (res item-path)) (let* ((parts (string-split hed)) (patt (car parts)) (repl (if (> (length parts) 1)(cadr parts) "")) (newr (string-substitute patt repl res))) (if (null? tal) newr (loop (car tal)(cdr tal) newr))))))) ;; 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 ;; ;; Note: mode 'normal means that tests must be COMPLETED and ok (i.e. PASS, WARN, CHECK, SKIP or WAIVED) |