Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -1649,11 +1649,11 @@ '(top-test-set-per-pf-counts "UPDATE tests SET state=CASE WHEN (SELECT count(id) FROM tests WHERE run_id=? AND testname=? AND item_path != '' - AND state in ('RUNNING','NOT_STARTED')) > 0 THEN 'RUNNING' + AND state in ('RUNNING','NOT_STARTED','LAUNCHED','REMOTEHOSTSTART')) > 0 THEN 'RUNNING' ELSE 'COMPLETED' END, status=CASE WHEN fail_count > 0 THEN 'FAIL' WHEN pass_count > 0 AND fail_count=0 THEN 'PASS' WHEN (SELECT count(id) FROM tests Index: tests.scm ================================================================== --- tests.scm +++ tests.scm @@ -560,27 +560,32 @@ (test-id (cdb:remote-run db:get-test-id #f run-id test-name item-path)) (tdat (cdb:get-test-info-by-id *runremote* test-id))) (if tdat (begin ;; Look at the test state and status - (if (or (member (db:test-get-status tdat) - '("PASS" "WARN" "WAIVED" "CHECK" "SKIP")) + (if (or (and (member (db:test-get-status tdat) + '("PASS" "WARN" "WAIVED" "CHECK" "SKIP")) + (equal? (db:test-get-state tdat) "COMPLETED")) (member (db:test-get-state tdat) - '("INCOMPLETE" "KILLED"))) + '("INCOMPLETE" "KILLED"))) (set! keep-test #f)) ;; examine waitons for any fails. If it is FAIL or INCOMPLETE then eliminate this test ;; from the runnable list (if keep-test (for-each (lambda (waiton) ;; for now we are waiting only on the parent test (let* ((parent-test-id (cdb:remote-run db:get-test-id #f run-id waiton "")) - (wtdat (cdb:get-test-info-by-id *runremote* test-id))) - (if (or (member (db:test-get-status wtdat) - '("FAIL" "KILLED")) - (member (db:test-get-state wtdat) - '("INCOMPETE"))) + (wtdat (cdb:get-test-info-by-id *runremote* test-id))) + (if (or (and (equal? (db:test-get-state wtdat) "COMPLETED") + (member (db:test-get-status wtdat) '("FAIL"))) + (member (db:test-get-status wtdat) '("KILLED")) + (member (db:test-get-state wtdat) '("INCOMPETE"))) + ;; (if (or (member (db:test-get-status wtdat) + ;; '("FAIL" "KILLED")) + ;; (member (db:test-get-state wtdat) + ;; '("INCOMPETE"))) (set! keep-test #f)))) ;; no point in running this one again waitons)))) (if keep-test (set! runnables (cons testkeyname runnables))))) testkeynames) runnables)) Index: txtdb/txtdb.scm ================================================================== --- txtdb/txtdb.scm +++ txtdb/txtdb.scm @@ -361,16 +361,24 @@ (conc "Usage: refdb action params ... Note: refdbdir is a path to the directory containg sheet-names.cfg import filename.gnumeric refdbdir : Import a gnumeric file into a txt db directory + export refdbdir filename.gnumeric : Export a refdb to a gnumeric file edit refdbdir : Edit a refdbdir using gnumeric. ls refdbdir : List the keys for specified level lookup refdbdir sheetname row col : Look up a value in the text db getrownames refdb sheetname : Get a list of row titles - getcolnames refdb sheetname : Get a list of column titles + getcolnames refdb sheetname : Get a list of column titles + +To export to other formats; first export to gnumeric then use ssconvert. + +e.g. +refdb export mydata mydata.gnumeric +ssconvert -T Gnumeric_html:html40 mydata.gnumeric mydata.html + Part of the Megatest tool suite. Learn more at http://www.kiatoa.com/fossils/megatest Version: " megatest-fossil-hash)) (define (list-sheets path) @@ -465,17 +473,18 @@ ((edit) (edit-refdb (car param))) ((ls) (map print (list-sheets (car param)))))) ((eq? num-params 2) - (case action - ((getrownames)(print (string-intersperse (get-rowcol-names (car param)(cadr param) car) " "))) - ((getcolnames)(print (string-intersperse (get-rowcol-names (car param)(cadr param) cadr) " "))) - ((import) - (let ((fname (car param)) - (targname (cadr param))) - (import-gnumeric-file fname targname))))) + (let ((param1 (car param)) + (param2 (cadr param))) + (case action + ((getrownames) (print (string-intersperse (get-rowcol-names param1 param2 car) " "))) + ((getcolnames) (print (string-intersperse (get-rowcol-names param1 param2 cadr) " "))) + ((import) (import-gnumeric-file param1 param2)) ;; fname targname + ((export) (refdb-export param1 param2)) + (else (print "Unrecognised command " action)(print help))))) ((eq? num-params 4) (case action ((lookup) ;; path section row col (let ((res (lookup (car param)(cadr param)(caddr param)(cadddr param)))) (if res Index: utils/nbfind ================================================================== --- utils/nbfind +++ utils/nbfind @@ -1,5 +1,10 @@ + +WARNING WARNING WARNING!!! + you may not be in a fossil repo area or fossil remote-url is not set to current known repository path + use "fsl remote-url " and / or call Justin Gedge 480/552-3393 for help to correct. + #!/bin/bash # load=`uptime|awk '{print $10}'|cut -d, -f1` load=`uptime|perl -pe 's/.*: (\d+.\d+),.*/$1/'` if which cpucheck > /dev/null;then @@ -13,12 +18,10 @@ max_load=50 else max_load=$MAX_ALLOWED_LOAD fi if [[ $lperc -lt $max_load ]];then - echo "$@" | at now + 0 minutes -elif [[ "x$NBLAUNCHER" == "x" ]];then - echo "nbfind $@" | at now + 2 minutes + nbfake "$@" else $NBLAUNCHER "$@" fi ADDED utils/nbload Index: utils/nbload ================================================================== --- /dev/null +++ utils/nbload @@ -0,0 +1,24 @@ +#!/bin/bash + +# load=`uptime|awk '{print $10}'|cut -d, -f1` +load=`uptime|perl -pe 's/.*: (\d+.\d+),.*/$1/'` +if which cpucheck > /dev/null;then + numcpu=`cpucheck|tail -1|awk '{print $6}'` +else + numcpu=`lscpu|grep "CPU.s.:"|awk '{print $2}'` +fi + +lperc=`echo "100 * $load / $numcpu"|bc` +if [[ "x$MAX_ALLOWED_LOAD" == "x" ]]; then + max_load=50 +else + max_load=$MAX_ALLOWED_LOAD +fi +if [[ $lperc -lt $max_load ]];then + echo "$@" | at now + 0 minutes +elif [[ "x$NBLAUNCHER" == "x" ]];then + echo "nbfind $@" | at now + 2 minutes +else + $NBLAUNCHER "$@" +fi +