Index: run-test-internal.scm ================================================================== --- run-test-internal.scm +++ run-test-internal.scm @@ -1,5 +1,7 @@ + + (define (run:test-internal run-id run-info keyvals runname test-record flags parent-test test-registry test-path) ;; all-tests-registry - used to determine test path ;; All these vars might be referenced by the testconfig file reader ;; flags are a hash of k/v pairs that could become commandline switches to a standalone version (let* ((test-name (tests:testqueue-get-testname test-record)) @@ -28,21 +30,22 @@ ;; (setenv "MT_ITEMPATH" item-path) ;; (setenv "MT_RUNNAME" runname) (runs:set-megatest-env-vars run-id inrunname: runname testname: test-name itempath: item-path) ;; these may be needed by the launching process (change-directory *toppath*) - ;; Here is where the test_meta table is best updated - ;; Yes, another use of a global for caching. Need a better way? - ;; - ;; There is now a single call to runs:update-all-test_meta and this - ;; per-test call is not needed. Given the delicacy of the move to - ;; v1.55 this code is being left in place for the time being. - ;; - (if (not (hash-table-ref/default *test-meta-updated* test-name #f)) - (begin - (hash-table-set! *test-meta-updated* test-name #t) - (runs:update-test_meta test-name test-conf))) + ;; BB - dropping *test-meta-updated* processing; comment mentioned handling happened but left in just-in-case. Exercising option now. + ;; ;; Here is where the test_meta table is best updated + ;; ;; Yes, another use of a global for caching. Need a better way? + ;; ;; + ;; ;; There is now a single call to runs:update-all-test_meta and this + ;; ;; per-test call is not needed. Given the delicacy of the move to + ;; ;; v1.55 this code is being left in place for the time being. + ;; ;; + ;; (if (not (hash-table-ref/default *test-meta-updated* test-name #f)) + ;; (begin + ;; (hash-table-set! *test-meta-updated* test-name #t) + ;; (runs:update-test_meta test-name test-conf))) ;; itemdat => ((ripeness "overripe") (temperature "cool") (season "summer")) (let* ((new-test-path (string-intersperse (cons test-path (map cadr itemdat)) "/")) (test-id (rmt:get-test-id run-id test-name item-path)) ;; ?? necessary? (testdat (if test-id (rmt:get-test-info-by-id run-id test-id) #f))) Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -1613,12 +1613,20 @@ (conc (db:test-get-testname t) ":" (db:test-get-state t) "/" (db:test-get-status t)))) lst)) - - +;; NOTES: +;; - need to pickle test-record or tests:testqueue and testconfig... +;; - need to keep test-registry bookkeeping in run:test somehow... +;; - dropping *test-meta-updated* processing; comment mentioned handling happened but left in just-in-case. Exercising option now. +;; - globals to consider: +;; *test-meta-updated* ;; dropped +;; *configdat* +;; *default-log-port* +;; *toppath* +;; *globalexitstatus* (define (run:test run-id run-info keyvals runname test-record flags parent-test test-registry all-tests-registry) ;; run:test refactored to spawn external command to background to allow runloop to proceed without waiting for test launch to complete ;; run:test will spawn-command to background "megatest -internal-run-test ..." ;; which calls run:test-bootstrap which calls run:test-internal -- the old run:test