Overview
Comment: | Fixed test of eztest with logpro |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
bc64078220f9d6ab66f38549d139daa8 |
User & Date: | matt on 2011-10-29 21:51:45 |
Other Links: | manifest | tags |
Context
2011-10-30
| ||
19:43 | Added -setvar, changed environment settings to use double quote instead of single quote check-in: a9efabed17 user: matt tags: trunk | |
2011-10-29
| ||
21:51 | Fixed test of eztest with logpro check-in: bc64078220 user: matt tags: trunk | |
2011-10-27
| ||
20:31 | Nada check-in: 1c292f6f90 user: mrwellan tags: trunk | |
Changes
Modified tasks.scm from [e24a437d48] to [8e5c677b38].
︙ | ︙ | |||
85 86 87 88 89 90 91 | "SELECT count(id) FROM monitors WHERE last_update < (strftime('%s','now') - 300) AND username=?;" (car (user-information (current-user-id)))) res)) ;; register a task (define (tasks:add tdb action owner target runname test item params) (sqlite3:execute tdb "INSERT INTO tasks_queue (action,owner,state,target,name,test,item,params,creation_time,execution_time) | | | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | "SELECT count(id) FROM monitors WHERE last_update < (strftime('%s','now') - 300) AND username=?;" (car (user-information (current-user-id)))) res)) ;; register a task (define (tasks:add tdb action owner target runname test item params) (sqlite3:execute tdb "INSERT INTO tasks_queue (action,owner,state,target,name,test,item,params,creation_time,execution_time) VALUES (?,?,'new',?,?,?,?,?,strftime('%s','now'),0);" action owner target runname test item (if params params ""))) |
︙ | ︙ | |||
108 109 110 111 112 113 114 | ;; for use from the gui (define (tasks:add-from-params tdb action keys key-params var-params) (let ((target (keys:key-vals-hash->target keys key-params)) (owner (car (user-information (current-user-id)))) (runname (hash-table-ref/default var-params "runname" #f)) (testpatts (hash-table-ref/default var-params "testpatts" "%")) | | > | | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | ;; for use from the gui (define (tasks:add-from-params tdb action keys key-params var-params) (let ((target (keys:key-vals-hash->target keys key-params)) (owner (car (user-information (current-user-id)))) (runname (hash-table-ref/default var-params "runname" #f)) (testpatts (hash-table-ref/default var-params "testpatts" "%")) (itempatts (hash-table-ref/default var-params "itempatts" "%")) (params (hash-table-ref/default var-params "params" ""))) (tasks:add tdb action owner target runname testpatts itempatts params))) ;; return one task from those who are 'new' OR 'waiting' AND more than 10sec old ;; (define (tasks:snag-a-task tdb) (let ((res #f) (keytxt (conc (current-process-id) "-" (get-host-name) "-" (car (user-information (current-user-id)))))) |
︙ | ︙ | |||
285 286 287 288 289 290 291 | ;; NOTE: It might be good to add one more layer of checking to ensure ;; that no task gets run in parallel. (define (tasks:start-run db tdb task) (let ((flags (make-hash-table))) (hash-table-set! flags "-rerun" "NOT_STARTED") (if (not (string=? (tasks:task-get-params task) "")) | | | 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | ;; NOTE: It might be good to add one more layer of checking to ensure ;; that no task gets run in parallel. (define (tasks:start-run db tdb task) (let ((flags (make-hash-table))) (hash-table-set! flags "-rerun" "NOT_STARTED") (if (not (string=? (tasks:task-get-params task) "")) (hash-table-set! flags "-setvars" (tasks:task-get-params task))) (print "Starting run " task) ;; sillyness, just call the damn routine with the task vector and be done with it. FIXME SOMEDAY (runs:run-tests db (tasks:task-get-target task) (tasks:task-get-name task) (tasks:task-get-test task) (tasks:task-get-item task) |
︙ | ︙ |
Modified tests/tests/eztest_logpro/lookittmp.logpro from [e50a47bd5d] to [1d9c0ef873].
1 2 3 4 | ;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com ;; ;; License GPL. | < < < < < < < < < < < < < < < < < < < < | < < < < < < < < < < < < | | | < < | 1 2 3 4 5 6 7 8 9 10 | ;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com ;; ;; License GPL. (expect:required in "LogFileBody" > 0 "Must be some files in the dir" #/.*/) (expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/) (expect:warning in "LogFileBody" = 0 "Any warning" #/WARNING/) (expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/)) ;; but disallow any other errors |
Modified tests/tests/eztest_logpro/testconfig from [55e83172e9] to [13eb33bb90].
1 2 3 4 5 6 7 8 9 | [setup] [ezsteps] lookittmp ls /tmp lookithome ls /home [test_meta] author matt owner bob | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | [setup] [ezsteps] lookittmp ls /tmp lookithome ls /home [test_meta] author matt owner bob description This test runs a single ezstep which is expected to pass using a simple logpro file. tags first,single reviewed 09/10/2011, by Matt |