Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -1754,10 +1754,17 @@ (db:general-call db 'state-status (list state status test-id)))) (define (db:roll-up-pass-fail-counts db run-id test-name item-path status) (if (and (not (equal? item-path "")) (member status '("PASS" "WARN" "FAIL" "WAIVED" "RUNNING" "CHECK" "SKIP"))) + (handle-exceptions + exn + (begin + (debug:print 0 "Problem with call to cdb:remote-run, database may be locked and read-only, waiting and trying again ...") + (thread-sleep! 10) + (apply cdb:remote-run proc db params)) + (apply cdb:client-call *runremote* 'immediate #f *default-numtries* open-run-close proc #f params)) (begin (db:general-call db 'update-pass-fail-counts (list run-id test-name run-id test-name run-id test-name)) (if (equal? status "RUNNING") (db:general-call db 'top-test-set-running (list run-id test-name)) (db:general-call db 'top-test-set-per-pf-counts (list run-id test-name run-id test-name run-id test-name))) ADDED utils/mtgetfile Index: utils/mtgetfile ================================================================== --- /dev/null +++ utils/mtgetfile @@ -0,0 +1,31 @@ +#!/bin/bash + +fullparams="$@" + +function findfile () { +megatest $fullparams -repl < numargs 0)(car remargs) #f)) + (scriptn (if (> numargs 1)(cadr remargs) #f)) + (keys (cdb:remote-run db:get-keys #f)) + (target (if (args:get-arg "-reqtarg") + (args:get-arg "-reqtarg") + (if (args:get-arg "-target") + (args:get-arg "-target") + #f))) + (key-vals (if target (keys:target->keyval keys target) #f)) + (errmsg (cond + ((not key-vals) "missing -target") + ((not target) "missing -target") + ((not scriptn) "missing file name to find") + (else #f)))) + (if errmsg + (begin + (print "THEPATH: Missing required switch: " errmsg) + (print "THEPATH: Usage: mtgetfile -target target scriptname [searchpath]") + (exit))) + (print "THEPATH: key-vals=" key-vals " path=" path " scriptn=" scriptn)) +EOF +} + +findfile | egrep "^THEPATH: " | sed -e 's/^THEPATH: //'