Overview
Comment: | Basic archiving done |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.60 |
Files: | files | file ages | folders |
SHA1: |
aa5d0defe755a3336d6f0a57310c61cf |
User & Date: | matt on 2014-12-11 00:18:28 |
Other Links: | branch diff | manifest | tags |
Context
2014-12-11
| ||
10:15 | Archiving fixes check-in: ff44bdeb52 user: mrwellan tags: v1.60 | |
00:18 | Basic archiving done check-in: aa5d0defe7 user: matt tags: v1.60 | |
2014-12-10
| ||
22:52 | partial archive working check-in: 92d3c79b3a user: matt tags: v1.60 | |
Changes
Modified archive.scm from [12956fb2bb] to [be69266199].
︙ | ︙ | |||
90 91 92 93 94 95 96 | ;; archive - run bup ;; ;; 1. create the bup dir if not exists ;; 2. start the du of each directory ;; 3. gen index ;; 4. save ;; | | | > > | > < > | | > | > | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | ;; archive - run bup ;; ;; 1. create the bup dir if not exists ;; 2. start the du of each directory ;; 3. gen index ;; 4. save ;; (define (archive:run-bup archive-dir run-id run-name tests) (let* ((bup-exe (or (configf:lookup *configdat* "archive" "bup") "bup")) (linktree (configf:lookup *configdat* "setup" "linktree")) (test-paths (filter string? (map (lambda (test-dat) (let* ((item-path (db:test-get-item-path test-dat)) (test-name (db:test-get-testname test-dat)) (run-id (db:test-get-run_id test-dat)) (target (string-intersperse (map cadr (rmt:get-key-val-pairs run-id)) "/")) (toplevel/children (and (db:test-get-is-toplevel test-dat) (> (rmt:test-toplevel-num-items run-id test-name) 0))) ;; note the trailing slash to get the dir inspite of it being a link (test-path (conc linktree "/" target "/" run-name "/" (runs:make-full-test-name test-name item-path) "/"))) (if (or toplevel/children (not (file-exists? test-path))) #f test-path))) tests))) ;; ((string-intersperse (map cadr (rmt:get-key-val-pairs 1)) "-") (bup-init-params (list "-d" archive-dir "init")) (bup-index-params (append (list "-d" archive-dir "index") test-paths)) (bup-save-params (append (list "-d" archive-dir "save" "--strip-path" linktree "-n" (conc (common:get-testsuite-name) "-" run-id)) test-paths))) (if (not (file-exists? archive-dir)) (create-directory archive-dir #t)) (if (not (file-exists? (conc archive-dir "/HEAD"))) (begin ;; replace this with jobrunner stuff enventually (debug:print-info 0 "Init bup in " archive-dir) (run-n-wait bup-exe params: bup-init-params))) (debug:print-info 0 "Indexing data to be archived") (run-n-wait bup-exe params: bup-index-params) (debug:print-info 0 "Archiving data with bup") (run-n-wait bup-exe params: bup-save-params) #t)) |
Modified nmsg-transport.scm from [2023441101] to [c28712df60].
︙ | ︙ | |||
9 10 11 12 13 14 15 | ;; PURPOSE. (require-extension (srfi 18) extras tcp s11n) (use sqlite3 srfi-1 posix regex regex-case srfi-69 hostinfo md5 message-digest) (import (prefix sqlite3 sqlite3:)) | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ;; PURPOSE. (require-extension (srfi 18) extras tcp s11n) (use sqlite3 srfi-1 posix regex regex-case srfi-69 hostinfo md5 message-digest) (import (prefix sqlite3 sqlite3:)) ;; (use nanomsg) (declare (unit nmsg-transport)) (declare (uses common)) (declare (uses db)) (declare (uses tests)) (declare (uses tasks)) ;; tasks are where stuff is maintained about what is running. |
︙ | ︙ |
Modified runs.scm from [08b0760cef] to [60a135ce85].
︙ | ︙ | |||
1471 1472 1473 1474 1475 1476 1477 | (debug:print 1 "Printing info for run " runkey ", run=" run ", tests=" tests ", header=" header) action) ((run-wait) (debug:print 1 "Waiting for run " runkey ", run=" runnamepatt " to complete")) ((archive) (debug:print 1 "Archiving data for run: " runkey " " (db:get-value-by-header run header "runname")) (set! worker-thread (make-thread (lambda () | | | 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 | (debug:print 1 "Printing info for run " runkey ", run=" run ", tests=" tests ", header=" header) action) ((run-wait) (debug:print 1 "Waiting for run " runkey ", run=" runnamepatt " to complete")) ((archive) (debug:print 1 "Archiving data for run: " runkey " " (db:get-value-by-header run header "runname")) (set! worker-thread (make-thread (lambda () (archive:run-bup (args:get-arg "-archive") run-id run-name tests)) "archive-bup-thread")) (thread-start! worker-thread)) (else (debug:print-info 0 "action not recognised " action))) ;; actions that operate on one test at a time can be handled below ;; |
︙ | ︙ | |||
1565 1566 1567 1568 1569 1570 1571 | (loop (car new-tests)(cdr new-tests))))) ((archive) (if (not toplevel-with-children) (begin (debug:print-info 0 "Estimating disk space usage for " test-fulln) (debug:print-info 0 " " (common:get-disk-space-used run-dir))))) ))) | > | | 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 | (loop (car new-tests)(cdr new-tests))))) ((archive) (if (not toplevel-with-children) (begin (debug:print-info 0 "Estimating disk space usage for " test-fulln) (debug:print-info 0 " " (common:get-disk-space-used run-dir))))) ))) ) (if worker-thread (thread-join! worker-thread)))))) ;; remove the run if zero tests remain (if (eq? action 'remove-runs) (let ((remtests (mt:get-tests-for-run (db:get-value-by-header run header "id") #f '("DELETED") '("n/a") not-in: #t))) (if (null? remtests) ;; no more tests remaining (let* ((dparts (string-split lasttpath "/")) (runpath (conc "/" (string-intersperse (take dparts (- (length dparts) 1)) |
︙ | ︙ |
Modified tests/fullrun/megatest.config from [728fc4014f] to [79a3fa6711].
︙ | ︙ | |||
142 143 144 145 146 147 148 149 150 151 152 153 154 155 | # Server is required - slower but more resistant to Sqlite issues. required yes # Start server when average query takes longer than this # server-query-threshold 55500 server-query-threshold 100 # daemonize yes # hostname #{scheme (get-host-name)} ## disks are: ## name host:/path/to/area ## -or- | > | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | # Server is required - slower but more resistant to Sqlite issues. required yes # Start server when average query takes longer than this # server-query-threshold 55500 server-query-threshold 100 timeout 0.01 # daemonize yes # hostname #{scheme (get-host-name)} ## disks are: ## name host:/path/to/area ## -or- |
︙ | ︙ |
tests/installall/config/megatest.config.dat became a regular file with contents [736a5da885].
tests/installall/config/runconfigs.config.dat became a regular file with contents [3b8f260acb].