Index: dashboard-tests.scm ================================================================== --- dashboard-tests.scm +++ dashboard-tests.scm @@ -603,16 +603,16 @@ " -testpatt " (conc testname "/" (if (equal? item-path "") "%" item-path)) " -v")))) (clean-run-execute (lambda (x) - (let ((cmd (conc "bmegatest -remove-runs -target " keystring " -runname " runname + (let ((cmd (conc "megatest -remove-runs -target " keystring " -runname " runname " -testpatt " (conc testname "/" (if (equal? item-path "") - "%" - item-path)) + "%" + item-path)) ";megatest -target " keystring " -runname " runname - " -runtests " (conc testname "/" (if (equal? item-path "") + " -run -preclean -testpatt " (conc testname "/" (if (equal? item-path "") "%" item-path)) ))) (system (conc (dtests:get-pre-command) cmd Index: docs/manual/reference.txt ================================================================== --- docs/manual/reference.txt +++ docs/manual/reference.txt @@ -186,12 +186,11 @@ [requirements] waiton A B [itemmap] A (\d+)/aa aa/\1 -B (\d+)/bb bb/\1 ----------------------- +B (\d+)/bb -------------------- .Testconfig for Test D ---------------------- [requirements] waiton C @@ -212,17 +211,18 @@ ------------------- [requirements] # With a toplevel test you may wish to generate your list # of tests to run dynamically # -# waiton #{shell get-valid-tests-to-run.sh} +waiton #{shell get-valid-tests-to-run.sh} ------------------- Run time limit ^^^^^^^^^^^^^^ ----------------- +[requirements] runtimelim 1h 2m 3s # this will automatically kill the test if it runs for more than 1h 2m and 3s ----------------- Skip ^^^^ Index: tests.scm ================================================================== --- tests.scm +++ tests.scm @@ -84,11 +84,11 @@ ;; (define (tests:get-itemmaps tconfig) (let ((base-itemmap (configf:lookup tconfig "requirements" "itemmap")) (itemmap-table (configf:get-section tconfig "itemmap"))) (append (if base-itemmap - (list (cons "%" base-itemmap)) + (list (list "%" base-itemmap)) '()) (if itemmap-table itemmap-table '())))) @@ -98,39 +98,46 @@ (let ((best-matches (filter (lambda (itemmap) (tests:match (car itemmap) testname #f)) itemmaps))) (if (null? best-matches) #f - (cdr (car best-matches))))) + (let ((res (car best-matches))) + (debug:print 0 "res=" res) + (cond + ((string? res) res) ;;; FIX THE ROOT CAUSE HERE .... + ((null? res) #f) + ((string? (cdr res)) (cdr res)) ;; it is a pair + ((string? (cadr res))(cadr res)) ;; it is a list + (else cadr res)))))) -;; given test-b that is waiting on test-a extend test-patt appropriately +;; given waiting-test that is waiting on waiton-test extend test-patt appropriately ;; ;; genlib/testconfig sim/testconfig ;; genlib/sch sim/sch/cell1 ;; ;; [requirements] [requirements] ;; mode itemwait ;; # trim off the cell to determine what to run for genlib ;; itemmap /.* ;; -;; test-a is waiting on test-b so we need to create a pattern for test-b given test-a and itemmap -(define (tests:extend-test-patts test-patt test-b test-a itemmaps) - (let* ((itemmap (tests:lookup-itemmap itemmaps test-b)) - (patts (string-split test-patt ",")) - (test-b-len (+ (string-length test-b) 1)) - (patts-b (map (lambda (x) - (let* ((modpatt (if itemmap (db:convert-test-itempath x itemmap) x)) - (newpatt (conc test-a "/" (substring modpatt test-b-len (string-length modpatt))))) - ;; (conc test-a "/," test-a "/" (substring modpatt test-b-len (string-length modpatt))))) - ;; (print "in map, x=" x ", newpatt=" newpatt) - newpatt)) - (filter (lambda (x) - (eq? (substring-index (conc test-b "/") x) 0)) - patts)))) - (string-intersperse (delete-duplicates (append patts (if (null? patts-b) - (list (conc test-a "/%")) - patts-b))) +;; waiting-test is waiting on waiton-test so we need to create a pattern for waiton-test given waiting-test and itemmap +(define (tests:extend-test-patts test-patt waiting-test waiton-test itemmaps) + (let* ((itemmap (tests:lookup-itemmap itemmaps waiton-test)) + (patts (string-split test-patt ",")) + (waiting-test-len (+ (string-length waiting-test) 1)) + (patts-waiton (map (lambda (x) ;; for each incoming patt that matches the waiting test + (let* ((modpatt (if itemmap (db:convert-test-itempath x itemmap) x)) + (newpatt (conc waiton-test "/" (substring modpatt waiting-test-len (string-length modpatt))))) + ;; (conc waiting-test "/," waiting-test "/" (substring modpatt waiton-test-len (string-length modpatt))))) + ;; (print "in map, x=" x ", newpatt=" newpatt) + newpatt)) + (filter (lambda (x) + (eq? (substring-index (conc waiting-test "/") x) 0)) ;; is this patt pertinent to the waiting test + patts)))) + (string-intersperse (delete-duplicates (append patts (if (null? patts-waiton) + (list (conc waiton-test "/%")) ;; really shouldn't add the waiton forcefully like this + patts-waiton))) ","))) ;; tests:glob-like-match (define (tests:glob-like-match patt str) (let ((like (substring-index "%" patt)))