Index: dashboard-tests.scm ================================================================== --- dashboard-tests.scm +++ dashboard-tests.scm @@ -27,12 +27,16 @@ "Test comment: " "Test id: ")) (list (iup:label "" #:expand "VERTICAL")))) (apply iup:vbox ; #:expand "YES" (list - (iup:label (db:test-get-testname testdat) #:expand "HORIZONTAL") - (iup:label (db:test-get-item-path testdat) #:expand "HORIZONTAL") + (store-label "testname" + (iup:label (db:test-get-testname testdat) #:expand "HORIZONTAL") + (lambda (testdat)(db:test-get-testname testdat))) + (store-label "item-path" + (iup:label (db:test-get-item-path testdat) #:expand "HORIZONTAL") + (lambda (testdat)(db:test-get-item-path testdat))) (store-label "teststate" (iup:label (db:test-get-state testdat) #:expand "HORIZONTAL") (lambda (testdat) (db:test-get-state testdat))) (let ((lbl (iup:label (db:test-get-status testdat) #:expand "HORIZONTAL"))) @@ -206,12 +210,11 @@ (set! logfile (conc (db:test-get-rundir testdat) "/" (db:test-get-final_logf testdat))) (set! rundir (db:test-get-rundir testdat)) (set! testfullname (db:test-get-fullname testdat)) (mutex-unlock! mx1)) (begin - (sqlite3:finalize! db) - (exit 0)))))) + (db:test-set-testname testdat "DEAD OR DELETED TEST")))))) (widgets (make-hash-table)) (self #f) (store-label (lambda (name lbl cmd) (hash-table-set! widgets name (lambda (testdat) Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -399,19 +399,22 @@ (set! *num-tests* (min (max (update-rundat "%" *num-runs* "%" "%") 8) 20))) (define uidat #f) ;; (megatest-dashboard) -(define (run-update other-thread) +(define (run-update mtx1) (let loop ((i 0)) - (thread-sleep! 0.1) - (thread-suspend! other-thread) + (thread-sleep! 0.05) + (mutex-lock! mtx1) (update-buttons uidat *num-runs* *num-tests*) + (mutex-unlock! mtx1) + (iup:main-loop-flush) + (mutex-lock! mtx1) (update-rundat (hash-table-ref/default *searchpatts* "runname" "%") *num-runs* (hash-table-ref/default *searchpatts* "test-name" "%") (hash-table-ref/default *searchpatts* "item-name" "%")) - (thread-resume! other-thread) + (mutex-unlock! mtx1) (loop i))) (define *job* #f) (cond @@ -444,14 +447,14 @@ (begin (print "ERROR: testid is not a number " (args:get-arg "-test")) (exit 1))))) (else (set! uidat (make-dashboard-buttons *num-runs* *num-tests* dbkeys)) - (set! *job* (lambda (thr)(run-update thr))))) + (set! *job* (lambda (mtx1)(run-update mtx1))))) (let* ((mx1 (make-mutex)) (th2 (make-thread iup:main-loop)) (th1 (make-thread (*job* mx1)))) (thread-start! th1) (thread-start! th2) (thread-join! th2)) Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -193,10 +193,12 @@ (define-inline (db:test-get-run_duration vec) (vector-ref vec 12)) (define-inline (db:test-get-final_logf vec) (vector-ref vec 13)) (define-inline (db:test-get-comment vec) (vector-ref vec 14)) (define-inline (db:test-get-fullname vec) (conc (db:test-get-testname vec) "/" (db:test-get-item-path vec))) + +(define-inline (db:test-set-testname vec val)(vector-set! vec 2 val)) (define (db-get-tests-for-run db run-id . params) (let ((res '()) (testpatt (if (or (null? params)(not (car params))) "%" (car params))) (itempatt (if (> (length params) 1)(cadr params) "%")))