Index: configf.scm ================================================================== --- configf.scm +++ configf.scm @@ -105,11 +105,12 @@ "\n"))) (debug:print-info 4 "shell result:\n" outres) outres) (begin (with-output-to-port (current-error-port) - (print "ERROR: " cmd " returned bad exit code " status)) + (lambda () + (print "ERROR: " cmd " returned bad exit code " status))) "")))) ;; Lookup a value in runconfigs based on -reqtarg or -target (define (runconfigs-get config var) (let ((targ (or (args:get-arg "-reqtarg")(args:get-arg "-target")))) @@ -342,11 +343,11 @@ (res '())) (if (eof-object? inl) (begin (close-input-port inp) (reverse res)) - (loop (read-line inp)(cons inl))))) + (loop (read-line inp)(cons inl res))))) '())) ;;====================================================================== ;; Write a config ;; 0. Given a refererence data structure "indat" Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -343,13 +343,16 @@ (let ((tnames '())) (for-each (lambda (tdat) (let ((tname (vector-ref tdat 0)) ;; (db:test-get-testname tdat)) (ipath (vector-ref tdat 1))) ;; (db:test-get-item-path tdat))) (if (not (equal? ipath "")) - (if (not (member tname tnames)) + (if (and (list? tnames) + (string? tname) + (not (member tname tnames))) (set! tnames (append tnames (list tname))))))) - test-dats))) + test-dats) + tnames)) ;; Bubble up the top tests to above the items, collect the items underneath ;; all while preserving the sort order from the SQL query as best as possible. ;; (define (bubble-up test-dats #!key (priority 'itempath)) Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -1208,31 +1208,10 @@ " run_id=? AND testname=? AND NOT (item_path='' AND testname in (SELECT DISTINCT testname FROM tests WHERE testname=? AND item_path != ''));"))) ;;(debug:print 0 "QRY: " qry) (sqlite3:execute db qry run-id newstate newstatus testname testname))) testnames)) - -(define (cdb:set-tests-state-status-faster serverdat run-id testnames currstate currstatus newstate newstatus) - ;; Convert #f to wildcard % - (if (null? testnames) - #t - (let ((currstate (if currstate currstate "%")) - (currstatus (if currstatus currstatus "%"))) - (let loop ((hed (car testnames)) - (tal (cdr testnames)) - (thr '())) - (let ((th1 (if newstate (create-thread (cbd:client-call serverdat 'update-test-state #t *default-numtries* newstate currstate run-id testname testname)) #f)) - (th2 (if newstatus (create-thread (cbd:client-call serverdat 'update-test-status #t *default-numtries* newstatus currstatus run-id testname testname)) #f))) - (thread-start! th1) - (thread-start! th2) - (if (null? tal) - (loop (car tal)(cdr tal)(cons th1 (cons th2 thr))) - (for-each - (lambda (th) - (if th (thread-join! th))) - thr))))))) - (define (cdb:delete-tests-in-state serverdat run-id state) (common:clear-caches) (cdb:client-call serverdat 'delete-tests-in-state #t *default-numtries* run-id state)) (define (cdb:tests-update-cpuload-diskfree serverdat test-id cpuload diskfree)