Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -1338,12 +1338,16 @@ (db:delay-if-busy dbdat) (for-each (lambda (toptest) (let ((test-name (list-ref toptest 3))) ;; (run-id (list-ref toptest 5))) - (db:general-call db 'top-test-set-per-pf-counts (list test-name run-id test-name test-name test-name)))) ;; (list run-id test-name)))) + (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)))) + ;; Clean out old junk and vacuum the database ;; ;; Ultimately do something like this: ;; @@ -2814,19 +2818,21 @@ (if msg (db:general-call dbdat 'state-status-msg (list state status msg test-id)) (db:general-call dbdat 'state-status (list state status test-id))))) (define (db:roll-up-pass-fail-counts dbstruct run-id test-name item-path status) - (if (and (not (equal? item-path "")) - (member status '("PASS" "WARN" "FAIL" "WAIVED" "RUNNING" "CHECK" "SKIP" "LAUNCHED"))) + (if ;; (and + (not (equal? item-path "")) + ;; (not (member status '("PASS" "WARN" "FAIL" "WAIVED" "RUNNING" "CHECK" "SKIP" "LAUNCHED"))) (let ((dbdat (db:get-db dbstruct run-id))) (db:general-call dbdat 'update-pass-fail-counts (list test-name test-name test-name)) (if (equal? status "RUNNING") (db:general-call dbdat 'top-test-set-running (list test-name)) (if (equal? status "LAUNCHED") (db:general-call dbdat 'top-test-set (list "LAUNCHED" test-name)) - (db:general-call dbdat 'top-test-set-per-pf-counts (list test-name run-id test-name test-name test-name)))) + (let ((db (db:dbdat-get-db dbdat))) + (db:top-test-set-per-pf-counts db run-id test-name)))) #f) #f)) (define (db:test-get-logfile-info dbstruct run-id test-name) (db:with-db @@ -2904,17 +2910,37 @@ ELSE 'COMPLETED' END, status=CASE WHEN (SELECT count(id) FROM tests WHERE run_id=? AND testname=? AND item_path != '' - AND state IN ('NOT_STARTED','BLOCKED')) > 0 THEN 'FAIL' - WHEN fail_count > 0 THEN 'FAIL' - WHEN pass_count > 0 AND fail_count=0 THEN 'PASS' + AND state IN ('NOT_STARTED','BLOCKED','INCOMPLETE')) > 0 THEN 'FAIL' + WHEN (SELECT count(id) FROM tests + WHERE testname=? + AND item_path != '' + AND status = 'ABORT') > 0 THEN 'ABORT' + WHEN (SELECT count(id) FROM tests + WHERE testname=? + AND item_path != '' + AND status = 'CHECK') > 0 THEN 'CHECK' WHEN (SELECT count(id) FROM tests WHERE testname=? AND item_path != '' AND status = 'SKIP') > 0 THEN 'SKIP' + WHEN (SELECT count(id) FROM tests + WHERE testname=? + AND item_path != '' + AND status = 'AUTO') > 0 THEN 'AUTO' + WHEN (SELECT count(id) FROM tests + WHERE testname=? + AND item_path != '' + 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' + 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 ;; STEPS '(delete-test-step-records "UPDATE test_steps SET status='DELETED' WHERE test_id=?;") Index: tests/fullrun/megatest.config ================================================================== --- tests/fullrun/megatest.config +++ tests/fullrun/megatest.config @@ -236,11 +236,12 @@ # ((openlava) "bsub") \ # (else "sleeprunner"))} # launcher bsub -q priority -o $MT_TEST_RUN_DIR/openlava.log -launcher #{shell if which bsub > /dev/null;then echo bsub -q priority -o openlava.log;else echo sleeprunner;fi} +# launcher #{shell if which bsub > /dev/null;then echo bsub -q priority -o openlava.log;else echo sleeprunner;fi} +launcher nbfake [configf:settings trim-trailing-spaces yes] [test] # VAL1 has trailing spaces Index: tests/unittests/runs.scm ================================================================== --- tests/unittests/runs.scm +++ tests/unittests/runs.scm @@ -138,17 +138,17 @@ (test "Top reset to COMPLETED/PASS" '("COMPLETED" "PASS")(get-state-status 1 "rollup" "")) (tests:test-set-status! 1 test-id state status #f #f) (test (conc "Item set to " state "/" status) (list state status) (get-state-status 1 "rollup" "item/4")) - (test (conc "Rollup of " state "/" status " correct") + (test (conc "Rollup of " state "/" status) (list rup-state rup-status) (get-state-status 1 "rollup" ""))) - '("COMPLETED" "COMPLETED" "INCOMPLETE" "INCOMPLETE" "RUNNING" "RUNNING" "COMPLETED") - '("ABORT" "FAIL" "PASS" "FAIL" "PASS" "FAIL" "BLAH") - '("COMPLETED" "COMPLETED" "COMPLETED" "COMPLETED" "RUNNING" "RUNNING" "COMPLETED") - '("FAIL" "FAIL" "FAIL" "FAIL" "PASS" "FAIL" "FAIL"))) + '("COMPLETED" "COMPLETED" "INCOMPLETE" "INCOMPLETE" "RUNNING" "RUNNING" "COMPLETED" "COMPLETED") + '("ABORT" "FAIL" "PASS" "FAIL" "PASS" "FAIL" "BLAH" "AUTO") + '("COMPLETED" "COMPLETED" "COMPLETED" "COMPLETED" "RUNNING" "RUNNING" "COMPLETED" "COMPLETED") + '("ABORT" "FAIL" "FAIL" "FAIL" "PASS" "FAIL" "ABORT" "AUTO"))) (test "launch-test" #t (string? (file-exists?