Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -1342,11 +1342,11 @@ ;; (run-id (list-ref toptest 5))) (db:top-test-set-per-pf-counts db run-id test-name))) toplevels))) (define (db:top-test-set-per-pf-counts db run-id test-name) - (db:general-call db 'top-test-set-per-pf-counts (list test-name run-id test-name test-name test-name test-name test-name test-name test-name test-name))) ;; (list run-id test-name)))) + (db:general-call db 'top-test-set-per-pf-counts (list test-name test-name run-id test-name test-name test-name test-name test-name test-name test-name test-name))) ;; (list run-id test-name)))) ;; Clean out old junk and vacuum the database ;; ;; Ultimately do something like this: @@ -2901,10 +2901,15 @@ '(top-test-set "UPDATE tests SET state=? WHERE testname=? AND item_path='';") ;; DONE '(top-test-set-running "UPDATE tests SET state='RUNNING' WHERE testname=? AND item_path='';") ;; DONE '(top-test-set-per-pf-counts "UPDATE tests SET state=CASE WHEN (SELECT count(id) FROM tests + WHERE testname=? + AND item_path != '' + AND status IN ('INCOMPLETE') + AND state in ('RUNNING','NOT_STARTED','LAUNCHED','REMOTEHOSTSTART')) > 0 THEN 'INCOMPLETE' + WHEN (SELECT count(id) FROM tests WHERE testname=? AND item_path != '' AND status NOT IN ('TEN_STRIKES','BLOCKED') AND state in ('RUNNING','NOT_STARTED','LAUNCHED','REMOTEHOSTSTART')) > 0 THEN 'RUNNING' ELSE 'COMPLETED' END, @@ -2914,31 +2919,38 @@ AND item_path != '' AND state IN ('NOT_STARTED','BLOCKED','INCOMPLETE')) > 0 THEN 'FAIL' WHEN (SELECT count(id) FROM tests WHERE testname=? AND item_path != '' + AND state NOT IN ('DELETED') AND status = 'ABORT') > 0 THEN 'ABORT' WHEN (SELECT count(id) FROM tests WHERE testname=? AND item_path != '' + AND state NOT IN ('DELETED') AND status = 'CHECK') > 0 THEN 'CHECK' WHEN (SELECT count(id) FROM tests WHERE testname=? AND item_path != '' + AND state NOT IN ('DELETED') + AND status = 'SKIP') > 0 THEN 'SKIP' WHEN (SELECT count(id) FROM tests WHERE testname=? AND item_path != '' + AND state NOT IN ('DELETED') AND status = 'AUTO') > 0 THEN 'AUTO' WHEN (SELECT count(id) FROM tests WHERE testname=? AND item_path != '' + AND state NOT IN ('DELETED') AND status IN ('STUCK/INCOMPLETE', 'INCOMPLETE')) > 0 THEN 'INCOMPLETE' WHEN (SELECT count(id) FROM tests WHERE testname=? AND item_path != '' - AND (status NOT IN ('PASS','FAIL'))) > 0 THEN 'ABORT' + AND state NOT IN ('DELETED') + AND status NOT IN ('PASS','FAIL')) > 0 THEN 'ABORT' WHEN fail_count > 0 THEN 'FAIL' WHEN pass_count > 0 AND fail_count=0 THEN 'PASS' ELSE 'UNKNOWN' END WHERE testname=? AND item_path='';") ;; DONE Index: tests/release/tests/rollup/results.logpro ================================================================== --- tests/release/tests/rollup/results.logpro +++ tests/release/tests/rollup/results.logpro @@ -18,11 +18,11 @@ ;; ;; ("priority_5" 1 20) ;; ("priority_6" 1 20) ;; ;; ("priority_7" 1 20) ;; ("priority_8" 1 20) ;; ("priority_9" 1 20) - ("runfirst" 4 20) + ("runfirst" 5 20) ;; ("singletest" 1 20) ;; ("singletest2" 1 20) ;; ("special" 1 20) ;; ("sqlitespeed" 10 20) ;; ("test1" 1 20) @@ -68,11 +68,12 @@ ;; (expect:ignore in logbody >= 0 "all_toplevel may not yet be done" #/Test: all_toplevel/) (expect:error in logbody = 0 "tests left in RUNNING state" #/State: RUNNING/) ;; (expect:required in logbody = 1 "priority_2 is KILLED" #/Test: priority_2\s+State: KILLED\s+Status: KILLED/) ;; (expect:required in logbody = 1 "priority_5 is either PASS or SKIP" #/Test: priority_5\s+State: COMPLETED\s+Status: (SKIP|PASS)/) ;; (expect:required in logbody = 1 "priority_7 is either PASS or SKIP" #/Test: priority_7\s+State: COMPLETED\s+Status: (SKIP|PASS)/) -;; (expect:required in logbody = 1 "testxz has 1 NOT_STARTED test" #/Test: testxz\s+State: NOT_STARTED/) +(expect:required in logbody = 1 "Toplevel will be NOT_STARTED" #/Test: runfirst\s+State: (INCOMPLETE|NOT_STARTED)/) +(expect:required in logbody = 1 "runfirst/b/2 will be NOT_STARTED/INCOMPLETE" #/Test: runfirst.b.2.\s+State: NOT_STARTED\s+Status: INCOMPLETE/) ;; (expect:required in logbody = 1 "no items" #/Test: no_items\s+State: NOT_STARTED\s+Status: ZERO_ITEMS/) ;; (expect:warning in logbody = 1 "dynamic waiton" #/Test: dynamic_waiton/) ;; (expect:required in logbody = 29 "blocktestxz has 29 tests" #/Test: blocktestxz/) ;; General cases Index: tests/release/tests/rollup/testconfig ================================================================== --- tests/release/tests/rollup/testconfig +++ tests/release/tests/rollup/testconfig @@ -12,11 +12,11 @@ # Set one test item to INCOMPLETE setstate $MTRUNNER $MTTESTDIR/fullrun $MTPATH megatest -set-state-status INCOMPLETE,FAIL :state COMPLETED :status PASS -testpatt runfirst/b/2 -target ubuntu/nfs/none -runname #{get var tname} # Rerun a different test item -rerun $MTRUNNER $MTTESTDIR/fullrun $MTPATH megatest -run -testpatt runfirst/sprint -reqtarg ubuntu/nfs/none -runname #{get var tname} -preclean -rerun PASS +rerun $MTRUNNER $MTTESTDIR/fullrun $MTPATH megatest -run -testpatt runfirst/spring -reqtarg ubuntu/nfs/none -runname #{get var tname} -preclean -rerun PASS results $MTRUNNER $MTTESTDIR/fullrun $MTPATH megatest -list-runs #{get var tname} -target ubuntu/nfs/none [requirements] # waiton #{getenv ALL_TOPLEVEL_TESTS}