@@ -101,10 +101,12 @@ (define *last-db-update-time* 0) (define *please-update-buttons* #t) (define *db-file-path* (conc *toppath* "/megatest.db")) +(define *tests-sort-reverse* #f) + (define *verbosity* (cond ((args:get-arg "-debug")(string->number (args:get-arg "-debug"))) ((args:get-arg "-v") 2) ((args:get-arg "-q") 0) (else 1))) @@ -221,11 +223,11 @@ (set! maxtests (length tests))) ;(if (not (null? tests)) (set! result (cons (vector run tests key-vals) result)))); ) runs) (set! *header* header) - (set! *allruns* result) + (set! *allruns* (if *tests-sort-reverse* (reverse result) result)) (debug:print 6 "*allruns* has " (length *allruns*) " runs") ;; (set! *tot-run-count* (+ 1 (length *allruns*))) maxtests)) *num-tests*))) ;; FIXME, naughty coding eh? @@ -469,11 +471,12 @@ #:action (lambda (obj unk val) (set! *last-db-update-time* 0) (update-search "item-name" val))))) (iup:vbox (iup:hbox - (iup:button "Sort Order" #:acton (lambda (obj)(toggle-sort-order)))) + (iup:button "Sort" #:acton (lambda (obj) + (set! *tests-sort-order* (not *tests-sort-order*))))) (iup:hbox (iup:button "Quit" #:action (lambda (obj)(sqlite3:finalize! *db*)(exit))) (iup:button "Monitor" #:action (lambda (obj)(system (conc (car (argv))" -guimonitor &"))))) )) ;; (iup:button "<- Left" #:action (lambda (obj)(set! *start-run-offset* (+ *start-run-offset* 1))))