Index: api.scm ================================================================== --- api.scm +++ api.scm @@ -40,11 +40,11 @@ ;; KEYS ((get-key-val-pairs) (apply db:get-key-val-pairs dbstruct params)) ((get-keys) (db:get-keys dbstruct)) ;; TESTS - ;; json doesn't do vectors, convert to list + ((test-toplevel-num-items) (apply db:test-toplevel-num-items dbstruct params)) ((get-test-info-by-id) (apply db:get-test-info-by-id dbstruct params)) ((test-get-rundir-from-test-id) (apply db:test-get-rundir-from-test-id dbstruct params)) ((test-set-state-status-by-id) (apply db:test-set-state-status-by-id dbstruct params)) ((get-count-tests-running) (apply db:get-count-tests-running dbstruct params)) ((get-count-tests-running-in-jobgroup) (apply db:get-count-tests-running-in-jobgroup dbstruct params)) Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -1813,16 +1813,16 @@ (set! res (cons p res))) (db:get-db dbstruct run-id) tstsqry) res)) -(define (db:test-toplevel-num-items db run-id testname) +(define (db:test-toplevel-num-items dbstruct run-id testname) (let ((res 0)) (sqlite3:for-each-row (lambda (num-items) (set! res num-items)) - db + (db:get-db dbstruct run-id) "SELECT count(id) FROM tests WHERE run_id=? AND testname=? AND item_path != '' AND state NOT IN ('DELETED');" run-id testname) res)) Index: rmt.scm ================================================================== --- rmt.scm +++ rmt.scm @@ -189,10 +189,13 @@ (rmt:send-receive 'delete-test-records run-id (list run-id test-id))) (define (rmt:test-set-status-state run-id test-id status state msg) (rmt:send-receive 'test-set-status-state run-id (list run-id test-id status state msg))) +(define (rmt:test-toplevel-num-items run-id test-name) + (rmt:send-receive 'test-toplevel-num-items run-id (list run-id test-name))) + ;; (define (rmt:get-previous-test-run-record run-id test-name item-path) ;; (rmt:send-receive 'get-previous-test-run-record run-id (list run-id test-name item-path))) (define (rmt:get-matching-previous-test-run-records run-id test-name item-path) (rmt:send-receive 'get-matching-previous-test-run-records run-id (list run-id test-name item-path))) Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -1381,11 +1381,11 @@ (db:test-get-rundir new-test-dat)) ;; ) ;; run dir is from the link tree (test-state (db:test-get-state new-test-dat)) (test-fulln (db:test-get-fullname new-test-dat)) (uname (db:test-get-uname new-test-dat)) (toplevel-with-children (and (db:test-get-is-toplevel test) - (> (cdb:remote-run db:test-toplevel-num-items db run-id test-name) 0)))) + (> (rmt:test-toplevel-num-items run-id test-name) 0)))) (case action ((remove-runs) ;; if the test is a toplevel-with-children issue an error and do not remove (if toplevel-with-children (begin @@ -1495,11 +1495,11 @@ (debug:print 0 "WARNING: not removing " run-dir " as it either doesn't exist or is not a symlink") (debug:print 0 "NOTE: the run dir for this test is undefined. Test may have already been deleted.")) )) ;; Only delete the records *after* removing the directory. If things fail we have a record (if (not remove-data-only) - (cdb:remote-run db:delete-test-records db #f (db:test-get-id test))))) + (rmt:delete-test-records (db:test-get-run_id test) (db:test-get-id test))))) ;;====================================================================== ;; Routines for manipulating runs ;;====================================================================== ADDED tests/simplerun/tests/test2/step1.sh Index: tests/simplerun/tests/test2/step1.sh ================================================================== --- /dev/null +++ tests/simplerun/tests/test2/step1.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +# Run your step here DELETED tests/simplerun/tests/test2/step1.sh.sh Index: tests/simplerun/tests/test2/step1.sh.sh ================================================================== --- tests/simplerun/tests/test2/step1.sh.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -# Run your step here ADDED tests/simplerun/tests/test2/step2.sh Index: tests/simplerun/tests/test2/step2.sh ================================================================== --- /dev/null +++ tests/simplerun/tests/test2/step2.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +# Run your step here DELETED tests/simplerun/tests/test2/step2.sh.sh Index: tests/simplerun/tests/test2/step2.sh.sh ================================================================== --- tests/simplerun/tests/test2/step2.sh.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -# Run your step here Index: utils/loadrunner ================================================================== --- utils/loadrunner +++ utils/loadrunner @@ -45,11 +45,11 @@ # NB// max_load is in units of percent. # lperc=$(echo "100 * $load / $numcpu"|bc) lperc2=$(echo "100 * $load2 / $numcpu"|bc) -let "lperc2adj=$lperc2 + 1" +let "lperc2adj=$lperc2 + $numcpu" if [[ "x$MAX_ALLOWED_LOAD" == "x" ]]; then max_load=100 else max_load=$MAX_ALLOWED_LOAD fi