Overview
Comment: | Fixed issue with remove-runs so default is to remove all if :state and :status are not specified, fixed pattern match due to glob wierdness issue with running tests based on itempatt |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
2dca8d8f9a76dc358618598135f53504 |
User & Date: | mrwellan on 2012-04-09 15:45:13 |
Other Links: | manifest | tags |
Context
2012-04-10
| ||
09:51 | Fixed running of single item. Decreased delays when can't launch tests as it was constraining launch rate unnecessarily check-in: 79c3028409 user: mrwellan tags: trunk | |
2012-04-09
| ||
15:45 | Fixed issue with remove-runs so default is to remove all if :state and :status are not specified, fixed pattern match due to glob wierdness issue with running tests based on itempatt check-in: 2dca8d8f9a user: mrwellan tags: trunk | |
2012-04-04
| ||
19:41 | Merged in the removed based on state and status branch check-in: f38b3dadbd user: mrwellan tags: trunk | |
Changes
Modified common.scm from [6bb85d8e43] to [e7a7ac51ef].
︙ | ︙ | |||
71 72 73 74 75 76 77 | (if num num val))) (define (patt-list-match item patts) (if (and item patts) ;; here we are filtering for matches with -itempatt (let ((res #f)) ;; look through all the item-patts if defined, format is patt1,patt2,patt3 ... wildcard is % (for-each (lambda (patt) | | | | | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | (if num num val))) (define (patt-list-match item patts) (if (and item patts) ;; here we are filtering for matches with -itempatt (let ((res #f)) ;; look through all the item-patts if defined, format is patt1,patt2,patt3 ... wildcard is % (for-each (lambda (patt) (if (string-match (regexp (string-substitute "%" ".*" "a%b")) ;;(glob->regexp (string-translate patt "%" "*")) item) (set! res #t))) (string-split patts ",")) res) #t)) ;;====================================================================== ;; System stuff |
︙ | ︙ |
Modified db.scm from [41c48e20a6] to [db3cfeefe8].
︙ | ︙ | |||
431 432 433 434 435 436 437 | ;; states and statuses are lists, turn them into ("PASS","FAIL"...) and use NOT IN ;; i.e. these lists define what to NOT show. ;; states and statuses are required to be lists, empty is ok ;; not-in #t = above behaviour, #f = must match (define (db:get-tests-for-run db run-id testpatt itempatt states statuses #!key (not-in #t)) (let* ((res '()) | > | | > > > > | | 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 | ;; states and statuses are lists, turn them into ("PASS","FAIL"...) and use NOT IN ;; i.e. these lists define what to NOT show. ;; states and statuses are required to be lists, empty is ok ;; not-in #t = above behaviour, #f = must match (define (db:get-tests-for-run db run-id testpatt itempatt states statuses #!key (not-in #t)) (let* ((res '()) ;; if states or statuses are null then assume match all when not-in is false (states-str (conc " state in ('" (string-intersperse states "','") "')")) (statuses-str (conc " status in ('" (string-intersperse statuses "','") "')")) (state-status-qry (if (or (not (null? states)) (not (null? states))) (conc " AND " (if not-in "NOT" "") " (" states-str " AND " statuses-str ") ") "")) (qry (conc "SELECT id,run_id,testname,state,status,event_time,host,cpuload,diskfree,uname,rundir,item_path,run_duration,final_logf,comment " " FROM tests WHERE run_id=? AND testname like ? AND item_path LIKE ? " state-status-qry ;; " ORDER BY id DESC;" " ORDER BY event_time ASC;" ;; POTENTIAL ISSUE! CHECK ME! Does anyting depend on this being sorted by id? ))) (debug:print 8 "INFO: db:get-tests-for-run qry=" qry) (sqlite3:for-each-row (lambda (a . b) ;; id run-id testname state status event-time host cpuload diskfree uname rundir item-path run-duration final-logf comment) (set! res (cons (apply vector a b) res))) ;; id run-id testname state status event-time host cpuload diskfree uname rundir item-path run-duration final-logf comment) res))) |
︙ | ︙ |
Modified megatest-version.scm from [72436f2582] to [e035ae5d5a].
1 2 3 4 5 | ;; Always use two digit decimal ;; 1.01, 1.02...1.10,1.11 ... 1.99,2.00.. (declare (unit megatest-version)) | | | 1 2 3 4 5 6 7 | ;; Always use two digit decimal ;; 1.01, 1.02...1.10,1.11 ... 1.99,2.00.. (declare (unit megatest-version)) (define megatest-version 1.42) |
Modified runs.scm from [3b1178542b] to [3c1812e6f4].
︙ | ︙ | |||
72 73 74 75 76 77 78 79 80 81 82 83 84 85 | (lambda (val) (debug:print 2 "setenv " (key:get-fieldname key) " " val) (setenv (key:get-fieldname key) val)) db (conc "SELECT " (key:get-fieldname key) " FROM runs WHERE id=?;") run-id)) keys) ;; Lets use this as an opportunity to put MT_RUNNAME in the environment (sqlite3:for-each-row (lambda (runname) (setenv "MT_RUNNAME" runname)) db "SELECT runname FROM runs WHERE id=?;" run-id) | > | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | (lambda (val) (debug:print 2 "setenv " (key:get-fieldname key) " " val) (setenv (key:get-fieldname key) val)) db (conc "SELECT " (key:get-fieldname key) " FROM runs WHERE id=?;") run-id)) keys) (alist->env-vars (hash-table-ref/default *configdat* "env-override" '())) ;; Lets use this as an opportunity to put MT_RUNNAME in the environment (sqlite3:for-each-row (lambda (runname) (setenv "MT_RUNNAME" runname)) db "SELECT runname FROM runs WHERE id=?;" run-id) |
︙ | ︙ |
Modified tests/Makefile from [9b4231f1d6] to [9f167505a4].
︙ | ︙ | |||
21 22 23 24 25 26 27 | test4 : cleanprep $(MEGATEST) -runall -reqtarg ubuntu/nfs/none :runname $(RUNNAME)_aa -v $(SERVER) >& aa.log & $(MEGATEST) -runall -reqtarg ubuntu/nfs/none :runname $(RUNNAME)_ab -v $(SERVER) >& ab.log & $(MEGATEST) -runall -reqtarg ubuntu/nfs/none :runname $(RUNNAME)_ac -v $(SERVER) >& ac.log & $(MEGATEST) -runall -reqtarg ubuntu/nfs/none :runname $(RUNNAME)_ad -v $(SERVER) >& ad.log & | | | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | test4 : cleanprep $(MEGATEST) -runall -reqtarg ubuntu/nfs/none :runname $(RUNNAME)_aa -v $(SERVER) >& aa.log & $(MEGATEST) -runall -reqtarg ubuntu/nfs/none :runname $(RUNNAME)_ab -v $(SERVER) >& ab.log & $(MEGATEST) -runall -reqtarg ubuntu/nfs/none :runname $(RUNNAME)_ac -v $(SERVER) >& ac.log & $(MEGATEST) -runall -reqtarg ubuntu/nfs/none :runname $(RUNNAME)_ad -v $(SERVER) >& ad.log & cleanprep : ../*.scm Makefile *.config sqlite3 megatest.db "delete from metadat where var='SERVER';" mkdir -p /tmp/mt_runs /tmp/mt_links cd ..;make install $(MEGATEST) -remove-runs :runname $(RUNNAME)% -target %/%/% -testpatt % -itempatt % $(BINPATH)/dboard -rows 15 & touch cleanprep |
︙ | ︙ |
Modified tests/megatest.config from [f1952dd1e2] to [1f4eabb06d].
︙ | ︙ | |||
34 35 36 37 38 39 40 41 42 43 44 45 46 47 | VARWITHDOLLAR $HOME/.zshrc WACKYVAR #{system ls > /dev/null} WACKYVAR2 #{get validvalues state} WACKYVAR3 #{getenv USER} WACKYVAR4 #{scheme (+ 5 6 7)} WACKYVAR5 #{getenv sysname}/#{getenv fsname}/#{getenv datapath} WACKYVAR6 #{scheme (args:get-arg "-target")} # XTERM [system xterm] # RUNDEAD [system exit 56] ## disks are: ## name host:/path/to/area ## -or- | > | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | VARWITHDOLLAR $HOME/.zshrc WACKYVAR #{system ls > /dev/null} WACKYVAR2 #{get validvalues state} WACKYVAR3 #{getenv USER} WACKYVAR4 #{scheme (+ 5 6 7)} WACKYVAR5 #{getenv sysname}/#{getenv fsname}/#{getenv datapath} WACKYVAR6 #{scheme (args:get-arg "-target")} PREDICTABLE the_ans # XTERM [system xterm] # RUNDEAD [system exit 56] ## disks are: ## name host:/path/to/area ## -or- |
︙ | ︙ |
Modified tests/tests/test_mt_vars/testconfig from [565fa166b2] to [1e1651ab96].
︙ | ︙ | |||
10 11 12 13 14 15 16 | bogousnotset bogousnotset.sh [requirements] waiton runfirst priority 0 [items] | | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | bogousnotset bogousnotset.sh [requirements] waiton runfirst priority 0 [items] NUMNUM [system cat $MT_RUN_AREA_HOME/tmp/$USER/$sysname/$fsname/$datapath/$MT_RUNNAME/$PREDICTABLE] [test_meta] author matt owner bob description This test runs a single ezstep which is expected to pass, no logpro file. tags first,single |
︙ | ︙ |