Check-in [9d2d6dc7a4]
Not logged in
Overview
SHA1 Hash:9d2d6dc7a4576233d282ff3f6066fa19de00b2aa
Date: 2011-11-01 23:00:15
User: matt
Comment:Improved running of predepends based on waitons
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | manifest
Tags And Properties
Changes

Modified runs.scm from [621ce806fe5d870b] to [13873526f6f3e6c4].

823 ;; keyvals 823 ;; keyvals 824 (define (runs:run-tests db target runname test-patts item-patts user flags) 824 (define (runs:run-tests db target runname test-patts item-patts user flags) 825 (let* ((keys (db-get-keys db)) 825 (let* ((keys (db-get-keys db)) 826 (keyvallst (keys:target->keyval keys target)) 826 (keyvallst (keys:target->keyval keys target)) 827 (run-id (runs:register-run db keys keyvallst runname "new" "n/a" u 827 (run-id (runs:register-run db keys keyvallst runname "new" "n/a" u 828 (deferred '()) ;; delay running these since they have a waiton claus 828 (deferred '()) ;; delay running these since they have a waiton claus 829 (keepgoing (hash-table-ref/default flags "-keepgoing" #f)) 829 (keepgoing (hash-table-ref/default flags "-keepgoing" #f)) 830 (test-names '())) | 830 (test-names '()) > 831 (runconfigf (conc *toppath* "/runconfigs.config")) > 832 (required-tests '())) > 833 > 834 (if (file-exists? runconfigf) > 835 (setup-env-defaults db runconfigf run-id *already-seen-runconfig-info*) > 836 (debug:print 0 "WARNING: You do not have a run config file: " runconfigf > 837 831 ;; look up all tests matching the comma separated list of globs in 838 ;; look up all tests matching the comma separated list of globs in 832 ;; test-patts (using % as wildcard) 839 ;; test-patts (using % as wildcard) 833 (for-each 840 (for-each 834 (lambda (patt) 841 (lambda (patt) 835 (let ((tests (glob (conc *toppath* "/tests/" (string-translate patt "%" " 842 (let ((tests (glob (conc *toppath* "/tests/" (string-translate patt "%" " 836 (set! tests (filter (lambda (test)(file-exists? (conc test "/testconfig 843 (set! tests (filter (lambda (test)(file-exists? (conc test "/testconfig 837 (set! test-names (append test-names 844 (set! test-names (append test-names 838 (map (lambda (testp) 845 (map (lambda (testp) 839 (last (string-split testp "/"))) 846 (last (string-split testp "/"))) 840 tests))))) 847 tests))))) 841 (string-split test-patts ",")) 848 (string-split test-patts ",")) 842 849 843 ;; now remove duplicates | 850 ;; now remove duplicates 844 (set! test-names (delete-duplicates test-names)) 851 (set! test-names (delete-duplicates test-names)) 845 852 846 (debug:print 0 "INFO: test names " test-names) 853 (debug:print 0 "INFO: test names " test-names) 847 854 848 ;; now add non-directly referenced dependencies (i.e. waiton) 855 ;; now add non-directly referenced dependencies (i.e. waiton) 849 ;; could cache all these since they need to be read again ... 856 ;; could cache all these since they need to be read again ... 850 ;; FIXME SOMEDAY 857 ;; FIXME SOMEDAY 851 (for-each | 858 (if (not (null? test-names)) > 859 (let loop ((hed (car test-names)) 852 (lambda (test-name) | 860 (tal (cdr test-names))) 853 (let* ((config (test:get-testconfig test-name #f)) | 861 (let* ((config (test:get-testconfig hed #f)) 854 (waiton (config-lookup config "requirements" "waiton"))) | 862 (waitons (string-split (let ((w (config-lookup config "requirem > 863 (if w w ""))))) > 864 (for-each > 865 (lambda (waiton) 855 (if (and waiton (not (member waiton test-names))) | 866 (if (and waiton (not (member waiton test-names))) > 867 (begin > 868 (set! required-tests (cons waiton required-tests)) 856 (set! test-names (append test-names (list waiton)))))) | 869 (set! test-names (append test-names (list waiton)))))) 857 test-names) < > 870 waitons) > 871 (let ((remtests (delete-duplicates (append waitons tal)))) > 872 (if (not (null? remtests)) > 873 (loop (car remtests)(cdr remtests))))))) > 874 > 875 (if (not (null? required-tests)) > 876 (debug:print 1 "INFO: Adding " required-tests " to the run queue")) 858 877 859 ;; on the first pass or call to run-tests set FAILS to NOT_STARTED if 878 ;; on the first pass or call to run-tests set FAILS to NOT_STARTED if 860 ;; -keepgoing is specified 879 ;; -keepgoing is specified 861 (if (and (eq? *passnum* 0) 880 (if (and (eq? *passnum* 0) 862 keepgoing) 881 keepgoing) 863 (begin 882 (begin 864 ;; have to delete test records where NOT_STARTED since they can cause 883 ;; have to delete test records where NOT_STARTED since they can cause ................................................................................................................................................................................ 980 (set! testdat ts) 999 (set! testdat ts) 981 (begin 1000 (begin 982 (debug:print 0 "WARNING: Couldn't register test 1001 (debug:print 0 "WARNING: Couldn't register test 983 (if (not (null? tal)) 1002 (if (not (null? tal)) 984 (loop (car tal)(cdr tal))))))) 1003 (loop (car tal)(cdr tal))))))) 985 (change-directory test-path) 1004 (change-directory test-path) 986 ;; this block is here only to inform the user early on 1005 ;; this block is here only to inform the user early on > 1006 > 1007 ;; Moving this to the run calling block > 1008 987 ;; (if (file-exists? runconfigf) 1009 ;; (if (file-exists? runconfigf) 988 ;; (setup-env-defaults db runconfigf run-id *already-see 1010 ;; (setup-env-defaults db runconfigf run-id *already-see 989 ;; (debug:print 0 "WARNING: You do not have a run config 1011 ;; (debug:print 0 "WARNING: You do not have a run config 990 (debug:print 4 "run-id: " run-id " test-name: " test-name " 1012 (debug:print 4 "run-id: " run-id " test-name: " test-name " 991 (case (if force ;; (args:get-arg "-force") 1013 (case (if force ;; (args:get-arg "-force") 992 'NOT_STARTED 1014 'NOT_STARTED 993 (if testdat 1015 (if testdat

Modified tests/megatest.config from [238b002f713f3a8b] to [9748b106cebacb2b].

1 [fields] 1 [fields] 2 sysname TEXT 2 sysname TEXT 3 fsname TEXT 3 fsname TEXT 4 datapath TEXT 4 datapath TEXT 5 5 6 [setup] 6 [setup] 7 # exectutable /path/to/megatest 7 # exectutable /path/to/megatest 8 max_concurrent_jobs 5 | 8 max_concurrent_jobs 50 9 runsdir /tmp/runs 9 runsdir /tmp/runs 10 10 11 [jobtools] 11 [jobtools] 12 # useshell yes 12 # useshell yes 13 # ## launcher launches jobs, the job is managed on the target host 13 # ## launcher launches jobs, the job is managed on the target host 14 ## by megatest, comment out launcher to run local 14 ## by megatest, comment out launcher to run local 15 # workhosts localhost hermes 15 # workhosts localhost hermes