Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -144,11 +144,11 @@ (set! newstatus a)) #:editbox "YES" #:value currstatus #:expand "YES"))) (iuplistbox-fill-list lb - (list "PASS" "FAIL" "n/a") + (list "PASS" "WARN" "FAIL" "CHECK" "n/a") currstatus) lb))) (iup:hbox (iup:label "Comment:") (iup:textbox #:action (lambda (val a b) (set! currcomment b)) @@ -268,11 +268,15 @@ (runtime (db:test-get-run_duration test)) (buttontxt (if (equal? teststate "COMPLETED") teststatus teststate)) (button (vector-ref columndat rown)) (color (case (string->symbol teststate) ((COMPLETED) - (if (equal? teststatus "PASS") "70 249 73" "223 33 49")) ;; greenish redish + (if (equal? teststatus "PASS") + "70 249 73" + (if (equal? teststatus "WARN") + "255 172 13" + "223 33 49"))) ;; greenish orangeish redish ((LAUNCHED) "101 123 142") ((CHECK) "255 100 50") ((REMOTEHOSTSTART) "50 130 195") ((RUNNING) "9 131 232") ((KILLREQ) "39 82 206") Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -312,11 +312,12 @@ (for-each (lambda (test) (if (equal? waitontest-name (db:test-get-testname test)) (begin (set! ever-seen #t) (if (not (and (equal? (db:test-get-state test) "COMPLETED") - (equal? (db:test-get-status test) "PASS"))) + (or (equal? (db:test-get-status test) "PASS") + (equal? (db:test-get-status test) "WARN")))) (set! result (cons waitontest-name result)))))) tests) (if (not ever-seen)(set! result (cons waitontest-name result))))) waiton) (delete-duplicates result)))) Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -6,11 +6,11 @@ ;; This program is distributed WITHOUT ANY WARRANTY; without even the ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ;; PURPOSE. (include "common.scm") -(define megatest-version 1.09) +(define megatest-version 1.10) (define help (conc " Megatest, documentation at http://www.kiatoa.com/fossils/megatest version " megatest-version " license GPL, Copyright Matt Welland 2006-2011 @@ -188,11 +188,12 @@ (db:test-get-status test) (db:test-get-run_duration test) (db:test-get-event_time test) (db:test-get-host test)) (if (not (or (equal? (db:test-get-status test) "PASS") - (equal? (db:test-get-state test) "NOT_STARTED"))) + (equal? (db:test-get-status test) "WARN") + (equal? (db:test-get-state test) "NOT_STARTED"))) (begin (print " cpuload: " (db:test-get-cpuload test) "\n diskfree: " (db:test-get-diskfree test) "\n uname: " (db:test-get-uname test) "\n rundir: " (db:test-get-rundir test) Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -91,17 +91,18 @@ (let ((item-path (if (string? itemdat-or-path) itemdat-or-path (item-list->path itemdat-or-path)))) (sqlite3:execute db "UPDATE tests SET state=?,status=?,event_time=strftime('%s','now') WHERE run_id=? AND testname=? AND item_path=?;" state status run-id test-name item-path) (if (and (not (equal? item-path "")) ;; need to update the top test record if PASS or FAIL and this is a subtest (or (equal? status "PASS") + (equal? status "WARN") (equal? status "FAIL"))) (begin (sqlite3:execute db "UPDATE tests SET fail_count=(SELECT count(id) FROM tests WHERE run_id=? AND testname=? AND item_path != '' AND status='FAIL'), - pass_count=(SELECT count(id) FROM tests WHERE run_id=? AND testname=? AND item_path != '' AND status='PASS') + pass_count=(SELECT count(id) FROM tests WHERE run_id=? AND testname=? AND item_path != '' AND (status='PASS' OR status='WARN')) WHERE run_id=? AND testname=? AND item_path='';" run-id test-name run-id test-name run-id test-name) (sqlite3:execute db "UPDATE tests @@ -340,10 +341,11 @@ ((failed-to-insert) (print "ERROR: Failed to insert the record into the db")) ((NOT_STARTED COMPLETED) ;; (cadr status is the row id for the run record) (if (and (equal? (test:get-state test-status) "COMPLETED") (or (equal? (test:get-status test-status) "PASS") + (equal? (test:get-status test-status) "WARN") (equal? (test:get-status test-status) "CHECK")) (not (args:get-arg "-force"))) (print "NOTE: Not starting test " new-test-name " as it is state \"COMPLETED\" and status \"" (test:get-status test-status) "\", use -force to override") (let* ((get-prereqs-cmd (lambda () (db-get-prereqs-not-met db run-id waiton))) ;; check before running .... Index: tests/tests/runfirst/wasting_time.logpro ================================================================== --- tests/tests/runfirst/wasting_time.logpro +++ tests/tests/runfirst/wasting_time.logpro @@ -1,1 +1,15 @@ ;; put stuff here + +;; NOTE: This is not legit logpro code!!! + +;; Test for 0=PASS, 1=WARN, >2 = FAIL + +(define season (get-environment-variable "SEASON")) + +(exit + (case (string->symbol season) + ((summer) 0) + ((winter) 1) + ((fall) 2) + (else 0))) +