Changeset 29265 in project


Ignore:
Timestamp:
06/28/13 02:22:03 (8 years ago)
Author:
Ivan Raikov
Message:

testdrive: small improvements to make-report-page script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/testdrive/trunk/make-report-page.scm

    r29025 r29265  
    2323  (make-pathname "/model-ci" (report-date path)))
    2424
     25(define (safe-take lst n)
     26  (let ((len (length lst)))
     27    (if (>= n len) lst
     28        (take lst n))))
    2529
    2630(begin
     
    2933        (reports-dir (car args))))
    3034 
    31   (let ((reports
    32          (sort
    33           (find-files (reports-dir) test: report-regex)
    34           (lambda (t1 t2)
    35             (string> (report-date t1)
    36                      (report-date t2))))))
     35  (let* ((all-reports
     36          (sort
     37           (find-files (reports-dir) test: report-regex)
     38           (lambda (t1 t2)
     39             (string> (report-date t1)
     40                      (report-date t2)))))
     41         (reports (safe-take all-reports 30))
     42         )
    3743
    3844    (pp reports (current-error-port))
Note: See TracChangeset for help on using the changeset viewer.