Index: archive.scm ================================================================== --- archive.scm +++ archive.scm @@ -218,11 +218,11 @@ ;; from the test info bin the path to the test by stem ;; (for-each (lambda (test-dat) ;; When restoring test-dat will initially contain an old and invalid path to the test - (let* ((best-disk (get-best-disk *configdat*)) + (let* ((best-disk (get-best-disk *configdat* #f)) ;; BUG: get the testconfig and use it here. Otherwise data pulled out of archive could end up on the wrong kind of disk. (item-path (db:test-get-item-path test-dat)) (test-name (db:test-get-testname test-dat)) (test-id (db:test-get-id test-dat)) (run-id (db:test-get-run_id test-dat)) (keyvals (rmt:get-key-val-pairs run-id)) Index: docs/manual/reference.txt ================================================================== --- docs/manual/reference.txt +++ docs/manual/reference.txt @@ -195,10 +195,17 @@ ----------------- [skip] rundelay 15m 15s ----------------- +Disks +^^^^^ + +A disks section in testconfig will override the disks section in +megatest.config. This can be used to allocate disks on a per-test or per item +basis. + Controlled waiver propagation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If test is FAIL and previous test in run with same MT_TARGET is WAIVED then apply the following rules from the testconfig: If a waiver check is specified in the testconfig apply the check and if it passes then set this FAIL to WAIVED Index: launch.scm ================================================================== --- launch.scm +++ launch.scm @@ -592,12 +592,13 @@ (debug:print-info 0 "Caching megatest.config in " fulldir "/.megatest.cfg") (configf:write-alist *configdat* tmpfile) (system (conc "ln -sf " tmpfile " " targfile)) ))))))) -(define (get-best-disk confdat) - (let* ((disks (hash-table-ref/default confdat "disks" #f)) +(define (get-best-disk confdat testconfig) + (let* ((disks (or (hash-table-ref/default confdat "disks" #f) + (hash-table-ref/default confdat "disks" #f))) (minspace (let ((m (configf:lookup confdat "setup" "minspace"))) (string->number (or m "10000"))))) (if disks (let ((res (common:get-disk-with-most-free-space disks minspace))) ;; min size of 1000, seems tad dumb (if res @@ -860,11 +861,11 @@ ;; prevent overlapping actions - set to LAUNCHED as early as possible ;; (tests:test-set-status! run-id test-id "LAUNCHED" "n/a" #f #f) ;; (if launch-results launch-results "FAILED")) (rmt:roll-up-pass-fail-counts run-id test-name item-path #f "LAUNCHED") - (set! diskpath (get-best-disk *configdat*)) + (set! diskpath (get-best-disk *configdat* test-conf)) (if diskpath (let ((dat (create-work-area run-id run-info keyvals test-id test-path diskpath test-name itemdat))) (set! work-area (car dat)) (set! toptest-work-area (cadr dat)) (debug:print-info 2 "Using work area " work-area))