Index: common.scm ================================================================== --- common.scm +++ common.scm @@ -851,19 +851,19 @@ (define (common:args-get-status) (or (args:get-arg "-status")(args:get-arg ":status"))) (define (common:args-get-testpatt rconf) - (let* ((tagexpr (args:get-arg "-tagexpr")) - (tags-testpatt (if tagexpr (string-join (runs:get-tests-matching-tags tagexpr) ",") #f)) + (let* (;; (tagexpr (args:get-arg "-tagexpr")) + ;; (tags-testpatt (if tagexpr (string-join (runs:get-tests-matching-tags tagexpr) ",") #f)) (testpatt-key (if (args:get-arg "--modepatt") (args:get-arg "--modepatt") "TESTPATT")) (args-testpatt (or (args:get-arg "-testpatt") (args:get-arg "-runtests") "%")) (rtestpatt (if rconf (runconfigs-get rconf testpatt-key) #f))) (cond - (tags-testpatt - (debug:print-info 0 *default-log-port* "-tagexpr "tagexpr" selects testpatt "tags-testpatt) - tags-testpatt) + ;; (tags-testpatt + ;; (debug:print-info 0 *default-log-port* "-tagexpr "tagexpr" selects testpatt "tags-testpatt) + ;; tags-testpatt) ((and (equal? args-testpatt "%") rtestpatt) (debug:print-info 0 *default-log-port* "testpatt defined in "testpatt-key" from runconfigs: " rtestpatt) rtestpatt) (else args-testpatt)))) Index: mtut.scm ================================================================== --- mtut.scm +++ mtut.scm @@ -250,12 +250,13 @@ ;; Runs ;;====================================================================== ;; make a runname ;; -(define (make-runname valparts) - "ww07.1a") +(define (make-runname pre post) + (time->string + (seconds->local-time (current-seconds)) "%Yw%V.%w-%H%M")) ;; collect, translate, collate and assemble a pkt from the command-line ;; (define (command-line->pkt action args-alist) (let* ((args-data (if args-alist @@ -346,11 +347,11 @@ (keyparts (string-split key ":")) (contour (car keyparts)) (ruletype (let ((res (cdr keyparts))) (if (null? res) #f (cadr keyparts)))) (valparts (string-split val)) ;; runname-rule params - (runname (make-runname #f)) + (runname (make-runname "" "")) (runstarts (find-pkts pdb '(runstart) `((o . ,contour) (t . ,runkey)))) (rspkts (map (lambda (x) (alist-ref 'pkta x)) runstarts)) @@ -389,12 +390,12 @@ ;; now have torun populated (for-each (lambda (contour) (let* ((mode-tag (string-split (or (configf:lookup mtconf "contours" contour) "") "/")) - (mode-patt (if (eq? (length mode-tag) 2)(cadr mode-tag) #f)) - (tag-expr (if (null? mode-tag) #f (car mode-tag)))) + (tag-expr (if (eq? (length mode-tag) 2)(cadr mode-tag) #f)) + (mode-patt (if (null? mode-tag) #f (car mode-tag)))) (for-each (lambda (runkeydat) (let* ((runkey (car runkeydat)) (info (cadr runkeydat))) (for-each Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -211,11 +211,12 @@ (test-names #f) ;; Generated by a call to (tests:filter-test-names all-test-names test-patts)) (required-tests #f) ;; Put fully qualified test/testpath names in this list to be done (task-key (conc (hash-table->alist flags) " " (get-host-name) " " (current-process-id))) (tdbdat (tasks:open-db)) (config-reruns (let ((x (configf:lookup *configdat* "setup" "reruns"))) - (if x (string->number x) #f)))) + (if x (string->number x) #f))) + (allowed-tests #f)) ;; per user request. If less than 100Meg space on dbdir partition, bail out with error ;; this will reduce issues in database corruption (common:check-db-dir-and-exit-if-insufficient) @@ -253,19 +254,26 @@ (debug:print 0 *default-log-port* "WARNING: You do not have a run config file: " runconfigf) #f))) (if (not test-patts) ;; first time in - adjust testpatt (set! test-patts (common:args-get-testpatt runconf))) + (if (args:get-arg "-tagexpr") + (set! allowed-tests (string-join (runs:get-tests-matching-tags (args:get-arg "-tagexpr")) ","))) ;; tests will be ANDed with this list ;; register this run in monitor.db (rmt:tasks-add "run-tests" user target runname test-patts task-key) ;; params) (rmt:tasks-set-state-given-param-key task-key "running") ;; Now generate all the tests lists (set! all-tests-registry (tests:get-all)) ;; hash of testname => path-to-test (set! all-test-names (hash-table-keys all-tests-registry)) - (set! test-names (tests:filter-test-names all-test-names test-patts)) + ;; filter first for allowed-tests (from -tagexpr) then for test-patts. + (set! test-names (tests:filter-test-names + (if allowed-tests + (tests:filter-test-names all-test-names allowed-tests) + all-test-names) + test-patts)) ;; I think seeding required-tests with all test-names makes sense but lack analysis to back that up. ;; NEW STRATEGY HERE: ;; 1. fill required tests with test-patts