Index: api.scm ================================================================== --- api.scm +++ api.scm @@ -66,11 +66,12 @@ delete-test-records delete-old-deleted-test-records test-set-status-state test-set-top-process-pid roll-up-pass-fail-counts - update-fail-pass-counts + update-pass-fail-counts + top-test-set-per-pf-counts ;; (db:top-test-set-per-pf-counts (db:get-db *db* 5) 5 "runfirst") ;; RUNS register-run set-tests-state-status delete-run @@ -133,10 +134,11 @@ ((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-pass-fail-counts) (apply db:general-call dbstruct 'update-pass-fail-counts params)) + ((top-test-set-per-pf-counts) (apply db:top-test-set-per-pf-counts dbstruct 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 @@ -2941,11 +2941,11 @@ 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' + AND state in ('RUNNING','NOT_STARTED','LAUNCHED','REMOTEHOSTSTART')) > 0 THEN 'RUNNING' 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' @@ -2966,11 +2966,11 @@ AND state IN ('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' + AND status IN ('INCOMPLETE','ABORT')) > 0 THEN 'ABORT' WHEN (SELECT count(id) FROM tests WHERE testname=? AND item_path != '' AND state NOT IN ('DELETED') AND status = 'AUTO') > 0 THEN 'AUTO' Index: docs/manual/howto.txt ================================================================== --- docs/manual/howto.txt +++ docs/manual/howto.txt @@ -78,11 +78,11 @@ # match. flexi-launcher yes ------------------------ Tricks ------- +====== This section is a compendium of a various useful tricks for debugging, configuring and generally getting the most out of Megatest. Limiting your running jobs Index: docs/manual/megatest_manual.html ================================================================== --- docs/manual/megatest_manual.html +++ docs/manual/megatest_manual.html @@ -986,17 +986,13 @@ flexi-launcher yes -
-

Tricks

-
+

Tricks

This section is a compendium of a various useful tricks for debugging, configuring and generally getting the most out of Megatest.

-
-

Limiting your running jobs

The following example will limit a test in the jobgroup "group1" to no more than 10 tests simultaneously.

In your testconfig:

@@ -1555,10 +1551,10 @@

Index: launch.scm ================================================================== --- launch.scm +++ launch.scm @@ -475,11 +475,12 @@ )) ;; for automated creation of the rollup html file this is a good place... ;; (if (and (not (equal? item-path "")) ;; (< (random (rmt:get-count-tests-running-for-testname run-id test-name)) 5)) (tests:summarize-items run-id test-id test-name #f) - (tests:summarize-test run-id test-id)) ;; don't force - just update if no + (tests:summarize-test run-id test-id) ;; don't force - just update if no + ) (mutex-unlock! m) (debug:print 2 "Output from running " fullrunscript ", pid " (vector-ref exit-info 0) " in work area " work-area ":\n====\n exit code " (vector-ref exit-info 2) "\n" "====\n") (if (not (vector-ref exit-info 1)) (exit 4))))))) Index: rmt.scm ================================================================== --- rmt.scm +++ rmt.scm @@ -529,10 +529,13 @@ (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-pass-fail-counts run-id (list run-id test-name run-id test-name run-id test-name))) +(define (rmt:top-test-set-per-pf-counts run-id test-name) + (rmt:general-call 'top-test-set-per-pf-counts run-id (list run-id test-name))) + ;;====================================================================== ;; R U N S ;;====================================================================== (define (rmt:get-run-info run-id) Index: tests.scm ================================================================== --- tests.scm +++ tests.scm @@ -350,10 +350,11 @@ (if have-lock (let ((script (configf:lookup *configdat* "testrollup" test-name))) (print "Obtained lock for " outputfilename) ;; (rmt:top-test-set-per-pf-counts run-id test-name) (rmt:roll-up-pass-fail-counts run-id test-name "" #f #f) + (rmt:top-test-set-per-pf-counts run-id test-name) (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) Index: tests/fullrun/megatest.config ================================================================== --- tests/fullrun/megatest.config +++ tests/fullrun/megatest.config @@ -286,9 +286,10 @@ flexi-launcher yes [host-types] general nbfake remote bsub +# remote nbfake [launchers] runfirst/sum% remote - +% general