Overview
Comment: | enabled -remove-runs with % wildcards in the target |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | 1.65-remove-runs-wildcard |
Files: | files | file ages | folders |
SHA1: |
69da4691535ad1e9a88bfa18fdd8ea17 |
User & Date: | mmgraham on 2020-10-27 17:01:56 |
Other Links: | branch diff | manifest | tags |
Context
2020-11-02
| ||
15:20 | Merged run removal fix check-in: 9ccc81e58b user: mrwellan tags: v1.65 | |
2020-10-27
| ||
17:01 | enabled -remove-runs with % wildcards in the target Closed-Leaf check-in: 69da469153 user: mmgraham tags: 1.65-remove-runs-wildcard | |
2020-10-23
| ||
16:00 | fixed indentation check-in: 770f557677 user: pjhatwal tags: v1.65 | |
Changes
Modified runs.scm from [d0c781d218] to [198bdf63c7].
︙ | ︙ | |||
2292 2293 2294 2295 2296 2297 2298 | (path-out (conc "/" (string-intersperse (take dparts (- (length dparts) 1)) "/"))) ) path-out ) ) | < < < < < < < < < < < < < < < < < < < | 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 | (path-out (conc "/" (string-intersperse (take dparts (- (length dparts) 1)) "/"))) ) path-out ) ) (define (runs:operate-on action target runnamepatt testpatt #!key (state #f)(status #f)(new-state-status #f)(mode #f)(options '())) (common:clear-caches) ;; clear all caches (let* ((db #f) ;; (tdbdat (tasks:open-db)) (keys (rmt:get-keys)) (rundat (mt:get-runs-by-patt keys runnamepatt target)) (header (vector-ref rundat 0)) |
︙ | ︙ | |||
2548 2549 2550 2551 2552 2553 2554 | (loop new-test-dat tal) (loop (car tal)(append tal (list new-test-dat))))) (begin (let ((rundir (db:test-get-rundir new-test-dat))) (if (and (not (string= rundir "/tmp/badname")) (file-exists? rundir) (substring-index run-name rundir) | | | > > | 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 | (loop new-test-dat tal) (loop (car tal)(append tal (list new-test-dat))))) (begin (let ((rundir (db:test-get-rundir new-test-dat))) (if (and (not (string= rundir "/tmp/badname")) (file-exists? rundir) (substring-index run-name rundir) (tests:glob-like-match (conc "%/" target "/%") rundir) ) (begin (set! lasttpath (db:test-get-rundir new-test-dat)) ;; remember this path for run removal (set! lastrealpath (remove-last-path-directory (resolve-pathname lasttpath))) (hash-table-set! run-paths-hash lastrealpath 1) (runs:remove-test-directory new-test-dat mode) ;; 'remove-all) ) (begin (debug:print 2 *default-log-port* "Not removing directory " rundir " because either it doesn't exist or has a bad name") (debug:print 2 *default-log-port* "Is /tmp/badname: " (string= rundir "/tmp/badname")) (debug:print 2 *default-log-port* "Exists: " (file-exists? rundir)) (debug:print 2 *default-log-port* "Has run-name: " (substring-index run-name rundir)) (debug:print 2 *default-log-port* "Has target: " (tests:glob-like-match (conc "%/" target "/%") rundir)) (debug:print 2 *default-log-port* "Target: " target) ;;PJH remove record from db no need to cleanup directory (case mode ((remove-data-only)(mt:test-set-state-status-by-id (db:test-get-run_id test)(db:test-get-id test) (db:test-get-state test)(db:test-get-status test) #f)) ((archive-remove) (mt:test-set-state-status-by-id (db:test-get-run_id test)(db:test-get-id test) "ARCHIVED" #f #f)) (else (rmt:delete-test-records (db:test-get-run_id test) (db:test-get-id test)))) ) |
︙ | ︙ |