Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -533,11 +533,12 @@ ; #:image img1 ; #:impress img2 #:size "100x15" #:fontsize "10" #:action (lambda (obj) - (toggle-hide testnum))))) ;; (iup:attribute obj "TITLE")))) + (set! *last-db-update-time* 0) + (toggle-hide testnum))))) ;; (iup:attribute obj "TITLE")))) (vector-set! lftcol testnum labl) (loop (+ testnum 1)(cons labl res)))))) ;; (let loop ((runnum 0) (keynum 0) Index: keys.scm ================================================================== --- keys.scm +++ keys.scm @@ -68,10 +68,21 @@ (define (args:usage . a) #f) ;; keys->vallist is called several times (quite unnecessarily), use this hash to suppress multiple ;; reporting of missing keys on the command line. (define keys:warning-suppress-hash (make-hash-table)) + +;; this now invalidates using "/" in item names +(define (keys:target-set-args keys target ht) + (let ((vals (string-split target "/"))) + (if (eq? (length vals)(length keys)) + (for-each (lambda (key val) + (hash-table-set! ht (conc ":" (vector-ref key 0)) val)) + keys + vals) + (debug:print 0 "ERROR: wrong number of values in " target ", should match " keys)) + vals)) ;; Using the keys pulled from the database (initially set from the megatest.config file) ;; look for the equivalent value on the command line and add it to a list, or #f if not found. ;; default => (val1 val2 val3 ...) ;; withkey => (:key1 val1 :key2 val2 :key3 val3 ...) Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -47,10 +47,12 @@ -set-toplog logfname : set the overall log for a suite of sub-tests -summarize-items : for an itemized test create a summary html -m comment : insert a comment for this test Run data + -target key1/key2/... : run for key1, key2, etc. + -reqtarg key1/key2/... : run for key1, key2, etc. but key1/key2 must be in runconfig :runname : required, name for this particular test run :state : required if updating step state; e.g. start, end, completed :status : required if updating step status; e.g. pass, fail, n/a Values and record errors and warnings @@ -59,12 +61,10 @@ :variable : set the variable name (optional) :value : value measured (required) :expected : value expected (required) :tol : |value-expect| <= tol (required, can be <, >, >=, <= or number) :units : name of the units for value, expected_value etc. (optional) - :first_err : record an error message - :first_warn : record a warning message Arbitrary test data loading -load-test-data : read test specific data for storage in the test_data table from standard in. Each line is comma delimited with four fields category,variable,value,comment @@ -111,10 +111,12 @@ (list "-runtests" ;; run a specific test "-config" ;; override the config file name "-execute" ;; run the command encoded in the base64 parameter "-step" ":runname" + "-target" + "-reqtarg" ":item" ":runname" ":state" ":status" "-list-runs" @@ -130,12 +132,10 @@ "-rename-run" "-to" ;; values and messages ":category" ":variable" - ":first_err" - ":first_warn" ":value" ":expected" ":tol" ":units" ;; misc Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -829,24 +829,37 @@ (define (general-run-call switchname action-desc proc) (if (not (args:get-arg ":runname")) (begin (debug:print 0 "ERROR: Missing required parameter for " switchname ", you must specify the run name with :runname runname") (exit 2)) - (let ((db #f)) + (let ((db #f) + (keys #f)) (if (not (setup-for-run)) (begin (debug:print 0 "Failed to setup, exiting") (exit 1))) - (set! db (open-db)) + (set! db (open-db)) + (set! keys (db-get-keys db)) + ;; have enough to process -target or -reqtarg here + (if (args:get-arg "-reqtarg") + (let* ((runconfigf (conc *toppath* "/runconfigs.config")) + (runconfig (read-config runconfigf #f #f))) + (if (hash-table-ref/default runconfig (args:get-arg "-reqtarg") #f) + (keys:target-set-args keys (args:get-arg "-reqtarg") args:arg-hash) + (begin + (debug:print 0 "ERROR: [" (args:get-arg "-reqtarg") "] not found in " runconfigf) + (sqlite3:finalize! db) + (exit 1)))) + (if (args:get-arg "-target") + (keys:target-set-args keys (args:get-arg "-target" args:arg-hash) args:arg-hash))) (if (not (car *configinfo*)) (begin (debug:print 0 "ERROR: Attempted to " action-desc " but run area config file not found") (exit 1)) ;; Extract out stuff needed in most or many calls ;; here then call proc - (let* ((keys (db-get-keys db)) - (keynames (map key:get-fieldname keys)) + (let* ((keynames (map key:get-fieldname keys)) (keyvallst (keys->vallist keys #t))) (proc db keys keynames keyvallst))) (sqlite3:finalize! db) (set! *didsomething* #t)))) Index: tests/runconfigs.config ================================================================== --- tests/runconfigs.config +++ tests/runconfigs.config @@ -1,7 +1,11 @@ [/tmp/mrwellan/env/ubuntu/afs] BOGOUS Bob [default/ubuntu/nfs] CURRENT /blah + +[ubuntu/nfs/none] +CURRENT /tmp/nada + [default]