Overview
Comment: | Partial fix for eztests. All but warn working correctly' |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
8ed9886ecfa41c628e5375df862cca32 |
User & Date: | matt on 2011-11-06 23:59:21 |
Other Links: | manifest | tags |
Context
2011-11-07
| ||
11:10 | Bunchofixes for ezsteps check-in: a50e564c64 user: mrwellan tags: trunk | |
2011-11-06
| ||
23:59 | Partial fix for eztests. All but warn working correctly' check-in: 8ed9886ecf user: matt tags: trunk | |
14:42 | Added tree widget example check-in: 24cc661bd8 user: matt tags: trunk | |
Changes
Modified launch.scm from [b3346272f9] to [73ecaef219].
︙ | ︙ | |||
191 192 193 194 195 196 197 198 199 | (begin (thread-sleep! 2) (processloop (+ i 1)))) )) (teststep-set-status! db run-id test-name stepname "end" (vector-ref exit-info 2) itemdat #f (if logpro-used (conc stepname ".html") "")) (if logpro-used (test-set-log! db run-id test-name itemdat (conc stepname ".html"))) (cond ;; WARN from logpro | > | | | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | (begin (thread-sleep! 2) (processloop (+ i 1)))) )) (teststep-set-status! db run-id test-name stepname "end" (vector-ref exit-info 2) itemdat #f (if logpro-used (conc stepname ".html") "")) (if logpro-used (test-set-log! db run-id test-name itemdat (conc stepname ".html"))) (debug:print 4 "Exit value received: " (vector-ref exit-info 2) " logpro-used: " logpro-used) (cond ;; WARN from logpro ((and (eq? (vector-ref exit-info 2) 2) logpro-used) (test-set-status! db run-id test-name "COMPLETE" "WARN" itemdat "Logpro warning found" #f)) ((eq? (vector-ref exit-info 2) 0) (test-set-status! db run-id test-name "COMPLETE" "PASS" itemdat #f #f)) (else (test-set-status! db run-id test-name "COMPLETE" "FAIL" itemdat (conc "Failed at step " stepname) #f))) ) (if (and (steprun-good? logpro-used (vector-ref exit-info 2)) (not (null? tal))) (loop (car tal) (cdr tal) stepname))) |
︙ | ︙ |
Modified tests/tests/ezlog_fail/lookittmp.logpro from [ea65513f61] to [33f0fc0fd2].
1 2 3 4 5 6 7 8 9 | ;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com ;; ;; License GPL. (expect:required in "LogFileBody" > 0 "Must be some files in the dir" #/this hopefully will never match anything eh?/) (expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/) (expect:warning in "LogFileBody" = 0 "Any warning" #/WARNING/) | | | 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" #/this hopefully will never match anything eh?/) (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/ #/.*/)) ;; force an error |
Modified tests/tests/ezlog_warn/lookithome.logpro from [73a7d8a9db] to [09d60e1610].
1 2 3 4 5 | ;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com ;; ;; License GPL. | > > | < < | 1 2 3 4 5 6 7 8 9 10 11 | ;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com ;; ;; License GPL. ;; Force a warn for this test (expect:warning in "LogFileBody" = 0 "Any warning" #/.*/) (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:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/)) ;; but disallow any other errors |
Modified tests/tests/ezlog_warn/lookittmp.logpro from [1d9c0ef873] to [77c9bbdc6c].
1 2 3 4 5 6 7 8 | ;; (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/) | > < | 1 2 3 4 5 6 7 8 9 10 | ;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com ;; ;; License GPL. (expect:warning in "LogFileBody" = 0 "Any warning" #/.*/) (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:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/)) ;; but disallow any other errors |
Modified tree.scm from [9e2a608ad8] to [5ed00197a5].
1 2 3 4 5 6 7 8 9 10 11 | (use iup canvas-draw canvas-draw-iup) (define t #f) (define tree-dialog (dialog #:title "Tree Test" (let ((t1 (treebox #:selection_cb (lambda (obj id state) (print "selection_db with id=" id " state=" state) | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | (use iup canvas-draw canvas-draw-iup) (define t #f) (define tree-dialog (dialog #:title "Tree Test" (let ((t1 (treebox #:selection_cb (lambda (obj id state) (print "selection_db with id=" id " state=" state) (print "SPECIALDATA: " (attribute obj "SPECIALDATA")) )))) (set! t t1) t1))) (show tree-dialog) (map (lambda (elname el) (print "Adding " elname " with value " el) (attribute-set! t elname el) (attribute-set! t "SPECIALDATA" el)) '("VALUE" "NAME" "ADDLEAF" "ADDBRANCH1" "ADDLEAF2" "VALUE") '("0" "Figures" "Other" "triangle" "equilateral" "4") ) (map (lambda (attr) (print attr " is " (attribute t attr))) '("KIND1" "PARENT2" "STATE1")) (main-loop) |
Modified utils/mt_ezstep from [3ac68c5b77] to [a0de763cc0].
︙ | ︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | # # Call like this: # mt_ezstep stepname command .... # stepname=$1;shift command=$* # if a logpro file exists then use it otherwise just run the command, nb// was using 2>&1 if [ -e ${stepname}.logpro ];then $command 2>&1| logpro ${stepname}.logpro ${stepname}.html &> ${stepname}.log allstatus=(${PIPESTATUS[0]} ${PIPESTATUS[1]}) runstatus=${allstatus[0]} logprostatus=${allstatus[1]} else $command &> ${stepname}.log runstatus=$? logprostatus=$runstatus fi # If the test exits with non-zero, we will record FAIL even if logpro # says it is a PASS if [ $runstatus -ne 0 ]; then exitstatus=$runstatus elif [ $logprostatus -eq 0 ]; then exitstatus=$logprostatus elif [ $logprostatus -eq 2 ]; then | > > > > | > > | > | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | # # Call like this: # mt_ezstep stepname command .... # stepname=$1;shift command=$* allstatus=99 runstatus=99 logpropstatus=99 # if a logpro file exists then use it otherwise just run the command, nb// was using 2>&1 if [ -e ${stepname}.logpro ];then $command 2>&1| logpro ${stepname}.logpro ${stepname}.html &> ${stepname}.log allstatus=(${PIPESTATUS[0]} ${PIPESTATUS[1]}) runstatus=${allstatus[0]} logprostatus=${allstatus[1]} else $command &> ${stepname}.log runstatus=$? logprostatus=$runstatus fi # If the test exits with non-zero, we will record FAIL even if logpro # says it is a PASS if [ $runstatus -ne 0 ]; then exitstatus=$runstatus elif [ $logprostatus -eq 0 ]; then exitstatus=$logprostatus elif [ $logprostatus -eq 2 ]; then exitstatus=2 elif [ $logprostatus -eq 1 ]; then exitstatus=1 else exitstatus=0 fi $MT_MEGATEST -env2file .ezsteps/${stepname} exit $exitstatus |