Overview
Comment: | wip |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | v1.64-farmedout-runtest |
Files: | files | file ages | folders |
SHA1: |
595f74893f56f2a9e70bc3543e84e92a |
User & Date: | bjbarcla on 2018-02-02 18:07:50 |
Other Links: | branch diff | manifest | tags |
Context
2018-02-02
| ||
18:07 | wip Leaf check-in: 595f74893f user: bjbarcla tags: v1.64-farmedout-runtest | |
17:54 | wip check-in: d3905e798c user: bjbarcla tags: v1.64-farmedout-runtest | |
Changes
Modified run-test-internal.scm from [1b9c9020e1] to [fce538e48c].
1 2 3 4 5 6 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)) (test-waitons (tests:testqueue-get-waitons test-record)) (test-conf (tests:testqueue-get-testconfig test-record)) | > > | 1 2 3 4 5 6 7 8 9 | (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)) (test-waitons (tests:testqueue-get-waitons test-record)) (test-conf (tests:testqueue-get-testconfig test-record)) |
︙ | ︙ | |||
26 27 28 29 30 31 32 | (debug:print 2 *default-log-port* "Attempting to launch test " full-test-name) ;; (setenv "MT_TEST_NAME" test-name) ;; ;; (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*) | > | | | | | | | | | | | | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | (debug:print 2 *default-log-port* "Attempting to launch test " full-test-name) ;; (setenv "MT_TEST_NAME" test-name) ;; ;; (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*) ;; 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))) (if (not testdat) (let loop () |
︙ | ︙ |
Modified runs.scm from [92e1518f57] to [cb55c1e466].
︙ | ︙ | |||
1611 1612 1613 1614 1615 1616 1617 | (if (not (vector? t)) (conc t) (conc (db:test-get-testname t) ":" (db:test-get-state t) "/" (db:test-get-status t)))) lst)) | | | > > > > > > > > | 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 | (if (not (vector? t)) (conc t) (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 (let* ((test-path (hash-table-ref all-tests-registry test-name)) ;; path to test definition (conc *toppath* "/tests/" test-name)) ;; could use tests:get-testconfig here ... (flag-switches ...) |
︙ | ︙ |