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-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
;;
|
|
|
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
1572
1573
1574
1575
1576
1577
1578
1579
|
(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)))))
)))
)))))
;; 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))
|
>
|
|
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))
|