Index: cells.scm ================================================================== --- cells.scm +++ cells.scm @@ -1,16 +1,14 @@ -;; (require-library iup canvas-draw) -;; -;; (module cells-test -;; (cells-dialog) -;; (import -;; scheme chicken extras -;; iup canvas-draw -;; (only canvas-draw-base pointer->canvas)) -;; - -(use iup canvas-draw canvas-draw-base) +(require-library iup canvas-draw canvas-draw-iup) + +(module cells-test + (cells-dialog) + (import + scheme chicken extras + iup canvas-draw canvas-draw-iup + (only canvas-draw-base pointer->canvas)) + (define ncols 8) (define nlins 8) (define width 32) (define height 32) @@ -27,19 +25,14 @@ (cells #:rastersize (format "~sx~s" (* ncols width) (* nlins height)) #:ncols-cb (lambda _ ncols) #:width-cb (lambda _ width) #:nlines-cb (lambda _ nlins) #:height-cb (lambda _ height) #:draw-cb - ;; (make-cells-draw-cb render-cell)))) - - (let ([wrap (pointer->canvas #t)]) - (lambda (handle i j x-min x-max y-min y-max canvas) - (render-cell handle i j x-min x-max y-min y-max (wrap canvas))))))) - -;; ) - -;; (import -;; (only iup show main-loop) -;; cells-test) + (make-cells-draw-cb render-cell)))) +) + +(import + (only iup show main-loop) + cells-test) (show cells-dialog) (main-loop) Index: dashboard-tests.scm ================================================================== --- dashboard-tests.scm +++ dashboard-tests.scm @@ -389,27 +389,28 @@ #:font "Courier New, -10" #:size "60x100"))) (hash-table-set! widgets "Test Steps" (lambda (testdat) (let* ((currval (iup:attribute stepsdat "VALUE")) ;; "TITLE")) - (fmtstr "~20a~10a~10a~12a~15a") + (fmtstr "~20a~10a~10a~12a~15a~20a") (comprsteps (db:get-steps-table db test-id)) (newval (string-intersperse (append (list - (format #f fmtstr "Stepname" "Start" "End" "Status" "Time") - (format #f fmtstr "========" "=====" "===" "======" "====")) + (format #f fmtstr "Stepname" "Start" "End" "Status" "Time" "Logfile") + (format #f fmtstr "========" "=====" "===" "======" "====" "=======")) (map (lambda (x) ;; take advantage of the \n on time->string (format #f fmtstr (vector-ref x 0) (let ((s (vector-ref x 1))) (if (number? s)(seconds->time-string s) s)) (let ((s (vector-ref x 2))) (if (number? s)(seconds->time-string s) s)) (vector-ref x 3) ;; status - (vector-ref x 4))) ;; time delta + (vector-ref x 4) + (vector-ref x 5))) ;; time delta (sort (hash-table-values comprsteps) (lambda (a b) (let ((time-a (vector-ref a 1)) (time-b (vector-ref b 1))) (if (and (number? time-a)(number? time-b)) Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -612,14 +612,14 @@ ;; db-get-test-steps-for-run (define (db:get-steps-for-test db test-id) (let ((res '())) (sqlite3:for-each-row - (lambda (id test-id stepname state status event-time) - (set! res (cons (vector id test-id stepname state status event-time) res))) + (lambda (id test-id stepname state status event-time logfile) + (set! res (cons (vector id test-id stepname state status event-time logfile) res))) db - "SELECT id,test_id,stepname,state,status,event_time FROM test_steps WHERE test_id=? ORDER BY id ASC;" ;; event_time DESC,id ASC; + "SELECT id,test_id,stepname,state,status,event_time,logfile FROM test_steps WHERE test_id=? ORDER BY id ASC;" ;; event_time DESC,id ASC; test-id) (reverse res))) ;; get a pretty table to summarize steps ;; @@ -632,31 +632,37 @@ (debug:print 6 "step=" step) (let ((record (hash-table-ref/default res (db:step-get-stepname step) ;; stepname start end status - (vector (db:step-get-stepname step) "" "" "" "")))) + (vector (db:step-get-stepname step) "" "" "" "" "")))) (debug:print 6 "record(before) = " record "\nid: " (db:step-get-id step) "\nstepname: " (db:step-get-stepname step) "\nstate: " (db:step-get-state step) "\nstatus: " (db:step-get-status step) "\ntime: " (db:step-get-event_time step)) (case (string->symbol (db:step-get-state step)) ((start)(vector-set! record 1 (db:step-get-event_time step)) (vector-set! record 3 (if (equal? (vector-ref record 3) "") - (db:step-get-status step)))) + (db:step-get-status step))) + (if (> (string-length (db:step-get-logfile step)) + 0) + (vector-set! record 5 (db:step-get-logfile step)))) ((end) (vector-set! record 2 (any->number (db:step-get-event_time step))) (vector-set! record 3 (db:step-get-status step)) (vector-set! record 4 (let ((startt (any->number (vector-ref record 1))) (endt (any->number (vector-ref record 2)))) (debug:print 4 "record[1]=" (vector-ref record 1) ", startt=" startt ", endt=" endt ", get-status: " (db:step-get-status step)) (if (and (number? startt)(number? endt)) - (seconds->hr-min-sec (- endt startt)) "-1")))) + (seconds->hr-min-sec (- endt startt)) "-1"))) + (if (> (string-length (db:step-get-logfile step)) + 0) + (vector-set! record 5 (db:step-get-logfile step)))) (else (vector-set! record 2 (db:step-get-state step)) (vector-set! record 3 (db:step-get-status step)) (vector-set! record 4 (db:step-get-event_time step)))) (hash-table-set! res (db:step-get-stepname step) record) Index: db_records.scm ================================================================== --- db_records.scm +++ db_records.scm @@ -71,23 +71,26 @@ ;;====================================================================== ;; S T E P S ;;====================================================================== ;; Run steps ;; make-vector-record "Run steps" db step id test_id stepname step_complete step_pass event_time -(define (make-db:step)(make-vector 6)) +(define (make-db:step)(make-vector 7)) (define-inline (db:step-get-id vec) (vector-ref vec 0)) (define-inline (db:step-get-test_id vec) (vector-ref vec 1)) (define-inline (db:step-get-stepname vec) (vector-ref vec 2)) (define-inline (db:step-get-state vec) (vector-ref vec 3)) (define-inline (db:step-get-status vec) (vector-ref vec 4)) (define-inline (db:step-get-event_time vec) (vector-ref vec 5)) +(define-inline (db:step-get-logfile vec) (vector-ref vec 6)) (define-inline (db:step-set-id! vec val)(vector-set! vec 0 val)) (define-inline (db:step-set-test_id! vec val)(vector-set! vec 1 val)) (define-inline (db:step-set-stepname! vec val)(vector-set! vec 2 val)) (define-inline (db:step-set-state! vec val)(vector-set! vec 3 val)) (define-inline (db:step-set-status! vec val)(vector-set! vec 4 val)) (define-inline (db:step-set-event_time! vec val)(vector-set! vec 5 val)) +(define-inline (db:step-set-logfile! vec val)(vector-set! vec 6 val)) + ;; The steps table (define (make-db:steps-table)(make-vector 5)) (define-inline (db:steps-table-get-stepname vec) (vector-ref vec 0)) (define-inline (db:steps-table-get-start vec) (vector-ref vec 1)) ADDED matrix.scm Index: matrix.scm ================================================================== --- /dev/null +++ matrix.scm @@ -0,0 +1,44 @@ +(require-library iup canvas-draw canvas-draw-iup) + +(module matrix-test + (matrix-dialog) + (import + scheme chicken extras + iup canvas-draw canvas-draw-iup + (only canvas-draw-base pointer->canvas)) + +(define ncols 8) +(define nlins 8) +(define width 32) +(define height 32) + +;; (define (render-cell handle i j x-min x-max y-min y-max canvas) +;; (set! (canvas-foreground canvas) +;; (if (or (and (odd? i) (odd? j)) (and (even? i) (even? j))) +;; #xffffff +;; #x000000)) +;; (canvas-box! canvas x-min x-max y-min y-max)) + +(define matrix-dialog + (dialog + #:title "Matrix Test" + (let ((mat (matrix + ; #:expand "YES" + ; #:scrollbar "YES" + #:numcol ncols + #:numlin nlins + #:numcol-visible ncols + #:numlin-visible nlins + #:click-cb (lambda (obj lin col status) + (print "obj: " obj " lin: " lin " col: " col " status: " status))))) + (attribute-set! mat "0:0" "Testing") + mat))) + +) ;; end module + +(import + (only iup show main-loop) + matrix-test) + +(show matrix-dialog) +(main-loop) Index: tests/tests/ezlog_fail/lookittmp.logpro ================================================================== --- tests/tests/ezlog_fail/lookittmp.logpro +++ tests/tests/ezlog_fail/lookittmp.logpro @@ -1,10 +1,10 @@ ;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com ;; ;; License GPL. -(expect:required in "LogFileBody" > 0 "Must be some files in the dir" #/.*/) +(expect:required in "LogFileBody" > 0 "Must be some files in the dir" #/this hopefully will never match anything eh?/) (expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/) (expect:warning in "LogFileBody" = 0 "Any warning" #/WARNING/) (expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/)) ;; but disallow any other errors Index: tests/tests/ezlog_fail/testconfig ================================================================== --- tests/tests/ezlog_fail/testconfig +++ tests/tests/ezlog_fail/testconfig @@ -5,9 +5,9 @@ lookithome ls /home [test_meta] author matt owner bob -description This test runs a single ezstep which is expected to pass using a simple logpro file. +description This test runs two ezstep, the first of which is expected to fail using a simple logpro file. tags first,single reviewed 09/10/2011, by Matt Index: utils/installall.sh ================================================================== --- utils/installall.sh +++ utils/installall.sh @@ -38,13 +38,13 @@ export KTYPE=26 else echo Using KTYPE=$KTYPE fi -export CHICKEN_VERSION=4.7.0 +export CHICKEN_VERSION=4.7.3 if ! [[ -e chicken-${CHICKEN_VERSION}.tar.gz ]]; then - wget http://code.call-cc.org/dev-snapshots/2011/05/27/chicken-${CHICKEN_VERSION}.tar.gz + wget http://code.call-cc.org/dev-snapshots/2011/08/17/chicken-${CHICKEN_VERSION}.tar.gz fi BUILDHOME=$PWD if [[ $PREFIX == "" ]]; then PREFIX=$PWD/inst