Index: archive.scm ================================================================== --- archive.scm +++ archive.scm @@ -94,10 +94,11 @@ ;; 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")) + (compress (or (configf:lookup *configdat* "archive" "compress") "9")) (linktree (configf:lookup *configdat* "setup" "linktree")) (test-paths (filter string? (map (lambda (test-dat) (let* ((item-path (db:test-get-item-path test-dat)) @@ -115,20 +116,20 @@ 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" + (bup-save-params (append (list "-d" archive-dir "save" (conc "--strip-path=" linktree) "-n" ;; (conc "-" compress) or (conc "--compress=" compress) (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))) + (run-n-wait bup-exe params: bup-init-params))) ;; print-cmd: "Running: "))) (debug:print-info 0 "Indexing data to be archived") - (run-n-wait bup-exe params: bup-index-params) + (run-n-wait bup-exe params: bup-index-params) ;; print-cmd: "Running: ") (debug:print-info 0 "Archiving data with bup") - (run-n-wait bup-exe params: bup-save-params) + (run-n-wait bup-exe params: bup-save-params) ;; print-cmd: "Running: ") #t)) Index: process.scm ================================================================== --- process.scm +++ process.scm @@ -101,11 +101,20 @@ (append result (list curr))) result)))) ;; here is an example line where the shell is sh or bash ;; "find / -print 2&>1 > findall.log" -(define (run-n-wait cmdline #!key (params #f)) +(define (run-n-wait cmdline #!key (params #f)(print-cmd #f)) + (if print-cmd + (debug:print 0 + (if (string? print-cmd) + print-cmd + "") + cmdline + (if params + (string-intersperse params " ") + ""))) (let ((pid (if params (process-run cmdline params) (process-run cmdline)))) (let loop ((i 0)) (let-values (((pid-val exit-status exit-code) (process-wait pid #t)))