Index: common.scm ================================================================== --- common.scm +++ common.scm @@ -1854,17 +1854,17 @@ (unt (caddr match))) (if val (set! time-secs (+ time-secs (* val (case (string->symbol unt) ((s) 1) - ((m) 60) + ((m) 60) ;; minutes ((h) 3600) ((d) 86400) - ((2) 604800) + ((w) 604800) ((M) 2628000) ;; aproximately one month ((y) 31536000) - (else 0)))))))))) + (else #f)))))))))) parts) time-secs)) (define (seconds->hr-min-sec secs) (let* ((hrs (quotient secs 3600)) Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -115,15 +115,15 @@ -run-wait : wait on run specified by target and runname -preclean : remove the existing test directory before running the test -clean-cache : remove the cached megatest.config and runconfigs.config files -no-cache : do not use the cached config files. -one-pass : launch as many tests as you can but do not wait for more to be ready - -remove-keep N action : remove all but N most recent runs per target - * Use -actions print,remove-runs,archive to specify action to take - * Add param -age 120d,3h,20m to apply only to runs older than the + -remove-keep N : remove all but N most recent runs per target; use '-actions, -age, -precmd' + -age : 120d,3h,20m to apply only to runs older than the specified age. NB// M=month, m=minute - * Add -precmd to insert a wrapper command in front of the commands run + -actions : print,remove-runs,archive to specify action to take + -precmd : insert a wrapper command in front of the commands run Selectors (e.g. use for -runtests, -remove-runs, -set-state-status, -list-runs etc.) -target key1/key2/... : run for key1, key2, etc. -reqtarg key1/key2/... : run for key1, key2, etc. but key1/key2 must be in runconfigs -testpatt patt1/patt2,patt3/... : % is wildcard Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -1902,11 +1902,11 @@ (precmd (or (args:get-arg "-precmd") ""))) (print "Actions: " actions) (for-each (lambda (target) (let* ((runs (hash-table-ref runs-ht target)) - (sorted (sort runs (lambda (a b)(> (simple-run-event_time a)(simple-run-event_time b))))) + (sorted (sort runs (lambda (a b)(< (simple-run-event_time a)(simple-run-event_time b))))) (to-remove (let* ((len (length sorted)) (trim-amt (- len num-to-keep))) (if (> trim-amt 0) (take sorted trim-amt) '()))))