Index: configf.scm ================================================================== --- configf.scm +++ configf.scm @@ -118,20 +118,24 @@ (configf:lookup config "default" var)) (configf:lookup config "default" var)))) (define-inline (configf:read-line p ht allow-processing) (let loop ((inl (read-line p))) - (if (and (string? inl) - (not (string-null? inl)) - (equal? "\\" (string-take-right inl 1))) ;; last character is \ - (let ((nextl (read-line p))) - (if (not (eof-object? nextl)) - (loop (string-append inl nextl)))) - (if (and allow-processing - (not (eq? allow-processing 'return-string))) - (configf:process-line inl ht) - inl)))) + (let ((cont-line (and (string? inl) + (not (string-null? inl)) + (equal? "\\" (string-take-right inl 1))))) + (if cont-line ;; last character is \ + (let ((nextl (read-line p))) + (if (not (eof-object? nextl)) + (loop (string-append (if cont-line + (string-take inl (- (string-length inl) 1)) + inl) + nextl)))) + (if (and allow-processing + (not (eq? allow-processing 'return-string))) + (configf:process-line inl ht) + inl))))) ;; read a config file, returns hash table of alists ;; read a config file, returns hash table of alists ;; adds to ht if given (must be #f otherwise) Index: dashboard-tests.scm ================================================================== --- dashboard-tests.scm +++ dashboard-tests.scm @@ -374,13 +374,15 @@ (need-update (or (and (> curr-mod-time db-mod-time) (> (current-milliseconds)(+ last-update 250))) ;; every half seconds if db touched (> (current-milliseconds)(+ last-update 10000)) ;; force update even 10 seconds request-update)) (newtestdat (if need-update + ;; NOTE: BUG HIDER, try to eliminate this exception handler (handle-exceptions exn - (debug:print-info 2 "test db access issue: " ((condition-property-accessor 'exn 'message) exn)) + (debug:print-info 0 "WARNING: test db access issue for test " test-id ": " ((condition-property-accessor 'exn 'message) exn)) + (make-db:test) (let* ((newdat (open-run-close db:get-test-info-by-id db test-id )) (tstdat (if newdat (open-run-close tests:testdat-get-testinfo db test-id #f) '()))) (if (and newdat @@ -391,11 +393,12 @@ (run-dur (vector-ref rec 3))) (db:test-set-run_duration! newdat run-dur) (db:test-set-diskfree! newdat diskfree) (db:test-set-cpuload! newdat cpuload))) ;; (debug:print 0 "newdat=" newdat) - newdat)) + newdat) + ) #f))) ;; (debug:print 0 "newtestdat=" newtestdat) (cond ((and need-update newtestdat) (set! testdat newtestdat) Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -90,15 +90,15 @@ ;; keeping it around for debugging purposes only (define (open-run-close-no-exception-handling proc idb . params) (debug:print-info 11 "open-run-close-no-exception-handling START given a db=" (if idb "yes " "no ") ", params=" params) (if (or *db-write-access* (not (member proc *db:all-write-procs*))) - (let* ((db (if idb - (if (procedure? idb) - (idb) - idb) - (open-db))) + (let* ((db (cond + ((sqlite3:database? idb) idb) + ((not idb) (open-db)) + ((procedure? idb) (idb)) + (else (open-db)))) (res #f)) (set! res (apply proc db params)) (if (not idb)(sqlite3:finalize! db)) (debug:print-info 11 "open-run-close-no-exception-handling END" ) res) @@ -1914,11 +1914,11 @@ ;; hand queries off to the write queue (let ((response (case *transport-type* ((http) (debug:print-info 7 "Queuing item " item " for wrapped write") (db:queue-write-and-wait db qry-sig query params)) - (else + (else (apply sqlite3:execute db query params) #t)))) (debug:print-info 7 "Received " response " from wrapped write") (server:reply return-address qry-sig response response)) ;; otherwise if appropriate flush the queue (this is a read or complex query) @@ -2168,18 +2168,19 @@ (if (sqlite3:database? tdb) (handle-exceptions exn (debug:print 0 "ERROR: error on access to testdat for test with id " test-id) '() - (sqlite3:for-each-row - (lambda (id test-id stepname state status event-time logfile) - (set! res (cons (vector id test-id stepname state status event-time (if (string? logfile) logfile "")) res))) - tdb - "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) - (sqlite3:finalize! tdb) - (reverse res)) + (begin + (sqlite3:for-each-row + (lambda (id test-id stepname state status event-time logfile) + (set! res (cons (vector id test-id stepname state status event-time (if (string? logfile) logfile "")) res))) + tdb + "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) + (sqlite3:finalize! tdb) + (reverse res))) '()))) ;; get a pretty table to summarize steps ;; (define (db:get-steps-table db test-id #!key (work-area #f)) Index: db_records.scm ================================================================== --- db_records.scm +++ db_records.scm @@ -1,6 +1,6 @@ -(define (make-db:test)(make-vector 6)) +(define (make-db:test)(make-vector 20)) (define-inline (db:test-get-id vec) (vector-ref vec 0)) (define-inline (db:test-get-run_id vec) (vector-ref vec 1)) (define-inline (db:test-get-testname vec) (vector-ref vec 2)) (define-inline (db:test-get-state vec) (vector-ref vec 3)) (define-inline (db:test-get-status vec) (vector-ref vec 4)) Index: items.scm ================================================================== --- items.scm +++ items.scm @@ -69,13 +69,18 @@ (debug:print 6 "item-assoc->item-list x: " x) (if (< (length x) 2) (begin (debug:print 0 "ERROR: malformed items spec " (string-intersperse x " ")) (list (car x)'())) - (let ((name (car x)) - (items (cadr x))) - (list name (string-split items))))) + (let* ((name (car x)) + (items (cadr x)) + (ilist (list name (if (string? items) + (string-split items) + '())))) + (if (null? ilist) + (debug:print 0 "ERROR: No items specified for " name)) + ilist))) itemsdat)))) (let ((debuglevel 5)) (debug:print 5 "item-assoc->item-list: itemsdat => itemlst ") (if (debug:debug-mode 5) (begin Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -436,11 +436,11 @@ (if (list? items-list) (begin (tests:testqueue-set-items! test-record items-list) (list hed tal reg reruns)) (begin - (debug:print 0 "ERROR: The proc from reading the setup did not yield a list - please report this") + (debug:print 0 "ERROR: The proc from reading the items table did not yield a list - please report this") (exit 1)))))) ((and (null? fails) (not (null? non-completed))) (let* ((allinqueue (map (lambda (x)(if (string? x) x (db:test-get-testname x))) Index: tests.scm ================================================================== --- tests.scm +++ tests.scm @@ -737,16 +737,17 @@ (define (tests:testdat-get-testinfo db test-id work-area) (let ((tdb (db:open-test-db-by-test-id db test-id work-area: work-area)) (res '())) (if (sqlite3:database? tdb) - (sqlite3:for-each-row - (lambda (update-time cpuload diskfree run-duration) - (set! res (cons (vector update-time cpuload diskfree run-duration) res))) - tdb - "SELECT update_time,cpuload,diskfree,run_duration FROM test_rundat ORDER BY update_time ASC;") - (sqlite3:finalize! tdb)) + (begin + (sqlite3:for-each-row + (lambda (update-time cpuload diskfree run-duration) + (set! res (cons (vector update-time cpuload diskfree run-duration) res))) + tdb + "SELECT update_time,cpuload,diskfree,run_duration FROM test_rundat ORDER BY update_time ASC;") + (sqlite3:finalize! tdb))) res)) ;;====================================================================== ;; A R C H I V I N G ;;====================================================================== ADDED tests/fullrun/tests/no_items/testconfig Index: tests/fullrun/tests/no_items/testconfig ================================================================== --- /dev/null +++ tests/fullrun/tests/no_items/testconfig @@ -0,0 +1,15 @@ +[ezsteps] +listfiles ls + +[items] +FOO + +[test_meta] +author matt +owner bob +description This test runs a single ezstep which is expected to pass \ +but there is an items definition with no items. This should evoke an \ +error. + +tags first,single +reviewed 09/10/2011, by Matt