Check-in [2f7869c255]
Not logged in
Overview
SHA1 Hash:2f7869c25541d2bca4da7199e4bf4a672a88e6fd
Date: 2011-11-09 04:25:03
User: matt
Comment:Added kicking off of dependent tests to command line run routines
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Changes

Modified runs.scm from [5e902b8e730dc5a9] to [d434521016458489].

   544    544   ;; This is original run-tests, this routine is deprecated and we will transition to using runs:run-tests (see below)
   545    545   ;;
   546    546   (define (run-tests db test-names)
   547    547     (let* ((keys        (db-get-keys db))
   548    548   	 (keyvallst   (keys->vallist keys #t))
   549    549   	 (run-id      (register-run db keys))  ;;  test-name)))
   550    550   	 (deferred    '()) ;; delay running these since they have a waiton clause
   551         -	 (runconfigf   (conc  *toppath* "/runconfigs.config")))
          551  +	 (runconfigf   (conc  *toppath* "/runconfigs.config"))
          552  +	 (required-tests '()))
          553  +
          554  +    ;; now add non-directly referenced dependencies (i.e. waiton)
          555  +    ;; could cache all these since they need to be read again ...
          556  +    ;; FIXME SOMEDAY
          557  +    (if (not (null? test-names))
          558  +	(let loop ((hed (car test-names))
          559  +		   (tal (cdr test-names)))
          560  +	  (let* ((config  (test:get-testconfig hed #f))
          561  +		 (waitons (string-split (let ((w (config-lookup config "requirements" "waiton")))
          562  +					  (if w w "")))))
          563  +	    (for-each 
          564  +	     (lambda (waiton)
          565  +	       (if (and waiton (not (member waiton test-names)))
          566  +		   (begin
          567  +		     (set! required-tests (cons waiton required-tests))
          568  +		     (set! test-names (append test-names (list waiton))))))
          569  +	     waitons)
          570  +	    (let ((remtests (delete-duplicates (append waitons tal))))
          571  +	      (if (not (null? remtests))
          572  +		  (loop (car remtests)(cdr remtests)))))))
          573  +
          574  +    (if (not (null? required-tests))
          575  +	(debug:print 1 "INFO: Adding " required-tests " to the run queue")
          576  +	(debug:print 1 "INFO: No prerequisites added"))
          577  +
   552    578       ;; on the first pass or call to run-tests set FAILS to NOT_STARTED if
   553    579       ;; -keepgoing is specified
   554    580   
   555    581       (set-megatest-env-vars db run-id) ;; these may be needed by the launching process
   556    582       
   557    583       (if (file-exists? runconfigf)
   558    584   	(setup-env-defaults db runconfigf run-id *already-seen-runconfig-info* environ-patt: ".*")