Index: api.scm ================================================================== --- api.scm +++ api.scm @@ -132,11 +132,11 @@ ((delete-test-records) (apply db:delete-test-records dbstruct params)) ((delete-old-deleted-test-records) (apply db:delete-old-deleted-test-records dbstruct params)) ((test-set-status-state) (apply db:test-set-status-state dbstruct params)) ((test-set-top-process-pid) (apply db:test-set-top-process-pid dbstruct params)) ((roll-up-pass-fail-counts) (apply db:roll-up-pass-fail-counts dbstruct params)) - ((update-fail-pass-counts) (apply db:general-call dbstruct 'update-pass-fail-counts params)) + ((update-pass-fail-counts) (apply db:general-call dbstruct 'update-pass-fail-counts params)) ((test-set-archive-block-id) (apply db:test-set-archive-block-id dbstruct params)) ;; RUNS ((register-run) (apply db:register-run dbstruct params)) ((set-tests-state-status) (apply db:set-tests-state-status dbstruct params)) Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -2831,14 +2831,21 @@ (db:general-call dbdat 'set-test-start-time (list test-id))) (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))))) +;; call with state = #f to roll up with out accounting for state/status of this item +;; (define (db:roll-up-pass-fail-counts dbstruct run-id test-name item-path state status) - (if ;; (and - (not (equal? item-path "")) - ;; (not (member status '("PASS" "WARN" "FAIL" "WAIVED" "RUNNING" "CHECK" "SKIP" "LAUNCHED"))) + (if (or (not state) + (not (equal? item-path ""))) + ;; just do a rollup + (begin + (db:general-call dbdat 'update-pass-fail-counts (list test-name test-name test-name)) + (db:top-test-set-per-pf-counts db run-id test-name) + #f) + ;; (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)) ;; NOTE: No else clause needed for this case (case (string->symbol status) ((RUNNING) (db:general-call dbdat 'top-test-set-running (list test-name))) @@ -2845,14 +2852,11 @@ ((LAUNCHED) (db:general-call dbdat 'top-test-set (list "LAUNCHED" test-name))) ((ABORT INCOMPLETE) (db:general-call dbdat 'top-test-set (list status test-name)))) (let ((db (db:dbdat-get-db dbdat))) (db:top-test-set-per-pf-counts db run-id test-name)) #f) - ;; if the test is not COMPLETED then this routine should not have been called - (begin - (debug:print 0 "ERROR: db:test-set-state-status called with state " state " and status " status) - #f))) + )) (define (db:test-get-logfile-info dbstruct run-id test-name) (db:with-db dbstruct run-id @@ -2930,10 +2934,11 @@ AND item_path != '' AND status NOT IN ('TEN_STRIKES','BLOCKED') AND state in ('RUNNING','NOT_STARTED','LAUNCHED','REMOTEHOSTSTART')) > 0 THEN 'RUNNING' ELSE 'COMPLETED' END, status=CASE + WHEN fail_count > 0 THEN 'FAIL' WHEN (SELECT count(id) FROM tests WHERE run_id=? AND testname=? AND item_path != '' AND state IN ('NOT_STARTED','BLOCKED','INCOMPLETE')) > 0 THEN 'FAIL' WHEN (SELECT count(id) FROM tests @@ -2951,10 +2956,15 @@ 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 state NOT IN ('DELETED') + AND status = 'FAIL') > 0 THEN 'FAIL' + 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=? @@ -2974,11 +2984,10 @@ WHEN (SELECT count(id) FROM tests WHERE testname=? AND item_path != '' AND state NOT IN ('DELETED') AND status NOT IN ('PASS','FAIL','WARN','WAIVED')) > 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 Index: megatest-version.scm ================================================================== --- megatest-version.scm +++ megatest-version.scm @@ -1,7 +1,7 @@ ;; Always use two or four digit decimal ;; 1.01, 1.02...1.10,1.11,1,1101 ... 1.99,2.00.. (declare (unit megatest-version)) -(define megatest-version 1.6017) +(define megatest-version 1.6018) Index: rmt.scm ================================================================== --- rmt.scm +++ rmt.scm @@ -527,11 +527,11 @@ ;; (define (rmt:roll-up-pass-fail-counts run-id test-name item-path state status) (rmt:send-receive 'roll-up-pass-fail-counts run-id (list run-id test-name item-path state status))) (define (rmt:update-pass-fail-counts run-id test-name) - (rmt:general-call 'update-fail-pass-counts run-id (list run-id test-name run-id test-name run-id test-name))) + (rmt:general-call 'update-pass-fail-counts run-id (list run-id test-name run-id test-name run-id test-name))) ;;====================================================================== ;; R U N S ;;====================================================================== Index: tests.scm ================================================================== --- tests.scm +++ tests.scm @@ -329,13 +329,17 @@ force) (let ((my-start-time (current-seconds)) (lockf (conc outputfilename ".lock"))) (let loop ((have-lock (common:simple-file-lock lockf))) (if have-lock - (begin + (let ((script (configf:lookup *configdat* "testrollup" test-name))) (print "Obtained lock for " outputfilename) - (tests:generate-html-summary-for-iterated-test run-id test-id test-name outputfilename) + ;; (rmt:top-test-set-per-pf-counts run-id test-name) + (rmt:roll-up-pass-fail-counts run-id test-name "" #f #f) + (if script + (system (conc script " > " outputfilename " & ")) + (tests:generate-html-summary-for-iterated-test run-id test-id test-name outputfilename)) (common:simple-file-release-lock lockf) (change-directory orig-dir) ;; NB// tests:test-set-toplog! is remote internal... (tests:test-set-toplog! run-id test-name outputfilename)) ;; didn't get the lock, check to see if current update started later than this Index: tests/fullrun/megatest.config ================================================================== --- tests/fullrun/megatest.config +++ tests/fullrun/megatest.config @@ -240,10 +240,14 @@ # 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] + +# Override the rollup for specific tests +[testrollup] +runfirst ls [test] # VAL1 has trailing spaces VAL1 Foo VAL2 ==>#{get test VAL1}Bar<== no spaces between Foo and Bar to pass Index: tests/fullrun/tests/priority_1/testconfig ================================================================== --- tests/fullrun/tests/priority_1/testconfig +++ tests/fullrun/tests/priority_1/testconfig @@ -10,5 +10,8 @@ owner bob description This test checks that a multi-lineitem test with mix of pass and non-fail rolls up a PASS tags first,single reviewed 09/10/2011, by Matt + +[triggers] +COMPLETED/ echo $MT_TEST_NAME > $MT_RUN_AREA_HOME/foo