| SHA1 Hash: | 439b0bbdef27d07dcb53cd93656b81ed6990e395 |
|---|---|
| Date: | 2012-01-26 09:23:58 |
| User: | mrwellan |
| Comment: | Merged trunk to fixing-logpro-test_data |
| Timelines: | family | ancestors | fixing-logpro-test_data |
| Diffs: | root of this branch |
| Downloads: | Tarball | ZIP archive |
| Other Links: | files | file ages | manifest |
- branch=fixing-logpro-test_data inherited from [60d6b0411d]
- closed added by [a1832d0203] on 2012-01-26 09:48:11
- sym-fixing-logpro-test_data inherited from [60d6b0411d]
Modified Makefile from [56afbe1a913fe9e0] to [322e8fb253d6513d].
1 1 2 PREFIX=. 2 PREFIX=. > 3 CSCOPTS= 3 4 4 SRCFILES = common.scm items.scm launch.scm \ 5 SRCFILES = common.scm items.scm launch.scm \ 5 ods.scm runconfig.scm server.scm configf.scm \ 6 ods.scm runconfig.scm server.scm configf.scm \ 6 db.scm keys.scm margs.scm megatest-version.scm \ 7 db.scm keys.scm margs.scm megatest-version.scm \ 7 process.scm runs.scm tasks.scm | 8 process.scm runs.scm tasks.scm tests.scm 8 9 9 GUISRCF = dashboard.scm dashboard-tests.scm dashboard-guimonitor.scm | 10 GUISRCF = dashboard.scm dashboard-tests.scm dashboard-guimonitor.scm dashboard- 10 11 11 OFILES = $(SRCFILES:%.scm=%.o) 12 OFILES = $(SRCFILES:%.scm=%.o) 12 GOFILES = $(GUISRCF:%.scm=%.o) 13 GOFILES = $(GUISRCF:%.scm=%.o) 13 14 14 HELPERS=$(addprefix $(PREFIX)/bin/,mt_laststep mt_runstep mt_ezstep) 15 HELPERS=$(addprefix $(PREFIX)/bin/,mt_laststep mt_runstep mt_ezstep) 15 16 16 all : megatest dboard 17 all : megatest dboard 17 18 18 megatest: $(OFILES) megatest.o 19 megatest: $(OFILES) megatest.o 19 csc $(OFILES) megatest.o -o megatest | 20 csc $(CSCOPTS) $(OFILES) megatest.o -o megatest 20 21 21 dboard : $(OFILES) $(GOFILES) 22 dboard : $(OFILES) $(GOFILES) 22 csc $(OFILES) $(GOFILES) -o dboard 23 csc $(OFILES) $(GOFILES) -o dboard 23 24 24 # Special dependencies for the includes 25 # Special dependencies for the includes 25 db.o launch.o runs.o dashboard-tests.o dashboard-guimonitor.o monitor.o dashboar | 26 tests.o db.o launch.o runs.o dashboard-tests.o dashboard-guimonitor.o dashboard- 26 runs.o dashboard.o dashboard-tests.o : run_records.scm | 27 tests.o runs.o dashboard.o dashboard-tests.o dashboard-main.o : run_records.scm 27 keys.o db.o runs.o launch.o megatest.o : key_records.scm | 28 db.o ezsteps.o keys.o launch.o megatest.o monitor.o runs-for-ref.o runs.o tests. 28 tasks.o dashboard-tasks.o : task_records.scm | 29 tests.o tasks.o dashboard-tasks.o : task_records.scm > 30 runs.o : test_records.scm 29 31 30 $(OFILES) $(GOFILES) : common_records.scm 32 $(OFILES) $(GOFILES) : common_records.scm 31 33 32 %.o : %.scm 34 %.o : %.scm 33 csc -c $< | 35 csc $(CSCOPTS) -c $< 34 36 35 $(PREFIX)/bin/megatest : megatest 37 $(PREFIX)/bin/megatest : megatest 36 @echo Installing to PREFIX=$(PREFIX) 38 @echo Installing to PREFIX=$(PREFIX) 37 cp megatest $(PREFIX)/bin/megatest 39 cp megatest $(PREFIX)/bin/megatest 38 40 39 $(HELPERS) : utils/mt_* 41 $(HELPERS) : utils/mt_* 40 cp $< $@ 42 cp $< $@ ................................................................................................................................................................................ 46 48 47 49 48 # install dashboard as dboard so wrapper script can be called dashboard 50 # install dashboard as dboard so wrapper script can be called dashboard 49 $(PREFIX)/bin/dboard : dboard $(FILES) 51 $(PREFIX)/bin/dboard : dboard $(FILES) 50 cp dboard $(PREFIX)/bin/dboard 52 cp dboard $(PREFIX)/bin/dboard 51 utils/mk_dashboard_wrapper $(PREFIX) > $(PREFIX)/bin/dashboard 53 utils/mk_dashboard_wrapper $(PREFIX) > $(PREFIX)/bin/dashboard 52 chmod a+x $(PREFIX)/bin/dashboard 54 chmod a+x $(PREFIX)/bin/dashboard 53 utils/mk_dashboard_wrapper $(PREFIX) > $(PREFIX)/bin/dashboard < 54 chmod a+x $(PREFIX)/bin/dashboard < 55 55 56 install : bin $(PREFIX)/bin/megatest $(PREFIX)/bin/dboard $(PREFIX)/bin/dashboar 56 install : bin $(PREFIX)/bin/megatest $(PREFIX)/bin/dboard $(PREFIX)/bin/dashboar 57 57 58 bin : 58 bin : 59 mkdir $(PREFIX)/bin | 59 mkdir -p $(PREFIX)/bin 60 60 61 test: tests/tests.scm 61 test: tests/tests.scm 62 cd tests;csi -I .. -b -n tests.scm 62 cd tests;csi -I .. -b -n tests.scm 63 63 64 clean : 64 clean : 65 rm -f $(OFILES) $(GOFILES) megatest dboard dboard.o megatest.o 65 rm -f $(OFILES) $(GOFILES) megatest dboard dboard.o megatest.o
Deleted cells.scm version [81e160db9eb032a0]
1 (require-library iup canvas-draw canvas-draw-iup) < 2 < 3 (module cells-test < 4 (cells-dialog) < 5 (import < 6 scheme chicken extras < 7 iup canvas-draw canvas-draw-iup < 8 (only canvas-draw-base pointer->canvas)) < 9 < 10 (define ncols 8) < 11 (define nlins 8) < 12 (define width 32) < 13 (define height 32) < 14 < 15 (define (render-cell handle i j x-min x-max y-min y-max canvas) < 16 (set! (canvas-foreground canvas) < 17 (if (or (and (odd? i) (odd? j)) (and (even? i) (even? j))) < 18 #xffffff < 19 #x000000)) < 20 (canvas-box! canvas x-min x-max y-min y-max)) < 21 < 22 (define cells-dialog < 23 (dialog < 24 #:title "Cells Test" < 25 (cells < 26 #:rastersize (format "~sx~s" (* ncols width) (* nlins height)) < 27 #:ncols-cb (lambda _ ncols) #:width-cb (lambda _ width) < 28 #:nlines-cb (lambda _ nlins) #:height-cb (lambda _ height) < 29 #:draw-cb < 30 (make-cells-draw-cb render-cell)))) < 31 ) < 32 < 33 (import < 34 (only iup show main-loop) < 35 cells-test) < 36 < 37 (show cells-dialog) < 38 (main-loop) <
Modified configf.scm from [ef264b880e908b66] to [9adef42084094ceb].
38 (append newalist (list (list key val))))) 38 (append newalist (list (list key val))))) 39 39 40 (define (config:eval-string-in-environment str) 40 (define (config:eval-string-in-environment str) 41 (let ((cmdres (cmd-run->list (conc "echo " str)))) 41 (let ((cmdres (cmd-run->list (conc "echo " str)))) 42 (if (null? cmdres) "" 42 (if (null? cmdres) "" 43 (caar cmdres)))) 43 (caar cmdres)))) 44 44 > 45 ;;====================================================================== > 46 ;; Make the regexp's needed globally available > 47 ;;====================================================================== > 48 > 49 (define configf:include-rx (regexp "^\\[include\\s+(.*)\\]\\s*$")) > 50 (define configf:section-rx (regexp "^\\[(.*)\\]\\s*$")) > 51 (define configf:blank-l-rx (regexp "^\\s*$")) > 52 (define configf:key-sys-pr (regexp "^(\\S+)\\s+\\[system\\s+(\\S+.*)\\]\\s*$")) > 53 (define configf:key-val-pr (regexp "^(\\S+)\\s+(.*)$")) > 54 (define configf:comment-rx (regexp "^\\s*#.*")) > 55 (define configf:cont-ln-rx (regexp "^(\\s+)(\\S+.*)$")) > 56 45 ;; read a config file, returns hash table of alists 57 ;; read a config file, returns hash table of alists 46 ;; adds to ht if given (must be #f otherwise) 58 ;; adds to ht if given (must be #f otherwise) 47 ;; envion-patt is a regex spec that identifies sections that will be eval'd 59 ;; envion-patt is a regex spec that identifies sections that will be eval'd 48 ;; in the environment on the fly 60 ;; in the environment on the fly 49 61 50 (define (read-config path ht allow-system #!key (environ-patt #f)) 62 (define (read-config path ht allow-system #!key (environ-patt #f)) 51 (debug:print 4 "INFO: read-config " path " allow-system " allow-system " envir 63 (debug:print 4 "INFO: read-config " path " allow-system " allow-system " envir 52 (if (not (file-exists? path)) 64 (if (not (file-exists? path)) 53 (if (not ht)(make-hash-table) ht) 65 (if (not ht)(make-hash-table) ht) 54 (let ((inp (open-input-file path)) 66 (let ((inp (open-input-file path)) 55 (res (if (not ht)(make-hash-table) ht)) | 67 (res (if (not ht)(make-hash-table) ht))) 56 (include-rx (regexp "^\\[include\\s+(.*)\\]\\s*$")) < 57 (section-rx (regexp "^\\[(.*)\\]\\s*$")) < 58 (blank-l-rx (regexp "^\\s*$")) < 59 (key-sys-pr (regexp "^(\\S+)\\s+\\[system\\s+(\\S+.*)\\]\\s*$")) < 60 (key-val-pr (regexp "^(\\S+)\\s+(.*)$")) < 61 (comment-rx (regexp "^\\s*#.*")) < 62 (cont-ln-rx (regexp "^(\\s+)(\\S+.*)$"))) < 63 (let loop ((inl (read-line inp)) 68 (let loop ((inl (read-line inp)) 64 (curr-section-name "default") 69 (curr-section-name "default") 65 (var-flag #f);; turn on for key-var-pr and cont-ln-rx, turn o 70 (var-flag #f);; turn on for key-var-pr and cont-ln-rx, turn o 66 (lead #f)) 71 (lead #f)) 67 (if (eof-object? inl) 72 (if (eof-object? inl) 68 (begin 73 (begin 69 (close-input-port inp) 74 (close-input-port inp) 70 res) 75 res) 71 (regex-case 76 (regex-case 72 inl 77 inl 73 (comment-rx _ (loop (read-line inp) curr-section | 78 (configf:comment-rx _ (loop (read-line inp) curr 74 (blank-l-rx _ (loop (read-line inp) curr-section | 79 (configf:blank-l-rx _ (loop (read-line inp) curr 75 (include-rx ( x include-file ) (begin | 80 (configf:include-rx ( x include-file ) (begin 76 (read-config include-file res al 81 (read-config include-file res al 77 (loop (read-line inp) curr-secti 82 (loop (read-line inp) curr-secti 78 (section-rx ( x section-name ) (loop (read-line inp) section-name | 83 (configf:section-rx ( x section-name ) (loop (read-line inp) sect 79 (key-sys-pr ( x key cmd ) (if allow-system | 84 (configf:key-sys-pr ( x key cmd ) (if allow-system 80 (let ((alist (hash-table-ref/d | 85 (let ((alist (hash-tab > 86 (val-proc (lambd 81 (val (let* ((cmdres ( | 87 (let 82 (status ( | 88 83 (res ( | 89 84 (if (not (eq? s | 90 (i 85 (begin | 91 86 (debug:pr | 92 87 (exit 1)) | 93 88 (if (null? res) | 94 (i 89 "" | 95 90 (string-int | 96 91 (hash-table-set! res curr-se | 97 (hash-table-set! res 92 (config:ass | 98 (co > 99 > 100 > 101 > 102 > 103 93 (loop (read-line inp) curr-s | 104 (loop (read-line inp 94 (loop (read-line inp) curr-sec | 105 (loop (read-line inp) 95 (key-val-pr ( x key val ) (let* ((alist (hash-table-ref/de | 106 (configf:key-val-pr ( x key val ) (let* ((alist (hash-tabl 96 (envar (and environ-patt 107 (envar (and environ-patt 97 (realval (if envar 108 (realval (if envar 98 (config:eval-st 109 (config:eval-st 99 val))) 110 val))) 100 (if envar 111 (if envar 101 (begin 112 (begin 102 (debug:print 4 "INFO: read 113 (debug:print 4 "INFO: read 103 (setenv key realval))) 114 (setenv key realval))) 104 (hash-table-set! res curr-sectio 115 (hash-table-set! res curr-sectio 105 (config:assoc-s 116 (config:assoc-s 106 (loop (read-line inp) curr-secti 117 (loop (read-line inp) curr-secti 107 ;; if a continued line 118 ;; if a continued line 108 (cont-ln-rx ( x whsp val ) (let ((alist (hash-table-ref/defau | 119 (configf:cont-ln-rx ( x whsp val ) (let ((alist (hash-table-r 109 (if var-flag ;; if s 120 (if var-flag ;; if s 110 (let ((newval (conc 121 (let ((newval (conc 111 (config-looku 122 (config-looku 112 ;; trim lead 123 ;; trim lead 113 (if lead 124 (if lead 114 (string-s 125 (string-s 115 "") 126 "") ................................................................................................................................................................................ 134 (list configdat toppath configfile fname)))) 145 (list configdat toppath configfile fname)))) 135 146 136 (define (config-lookup cfgdat section var) 147 (define (config-lookup cfgdat section var) 137 (let ((sectdat (hash-table-ref/default cfgdat section '()))) 148 (let ((sectdat (hash-table-ref/default cfgdat section '()))) 138 (if (null? sectdat) 149 (if (null? sectdat) 139 #f 150 #f 140 (let ((match (assoc var sectdat))) 151 (let ((match (assoc var sectdat))) 141 (if match | 152 (if match ;; (and match (list? match)(> (length match) 1)) 142 (cadr match) 153 (cadr match) 143 #f)) 154 #f)) 144 ))) 155 ))) > 156 > 157 (define (configf:section-vars cfgdat section) > 158 (let ((sectdat (hash-table-ref/default cfgdat section '()))) > 159 (if (null? sectdat) > 160 '() > 161 (map car sectdat)))) 145 162 146 (define (setup) 163 (define (setup) 147 (let* ((configf (find-config)) 164 (let* ((configf (find-config)) 148 (config (if configf (read-config configf #f #t) #f))) 165 (config (if configf (read-config configf #f #t) #f))) 149 (if config 166 (if config 150 (setenv "RUN_AREA_HOME" (pathname-directory configf))) 167 (setenv "RUN_AREA_HOME" (pathname-directory configf))) 151 config)) 168 config)) > 169 > 170 ;;====================================================================== > 171 ;; Non destructive writing of config file > 172 ;;====================================================================== > 173 > 174 (define (configf:compress-multi-lines fdat) > 175 ;; step 1.5 - compress any continued lines > 176 (if (null? fdat) fdat > 177 (let loop ((hed (car fdat)) > 178 (tal (cdr fdat)) > 179 (cur "") > 180 (led #f) > 181 (res '())) > 182 ;; ALL WHITESPACE LEADING LINES ARE TACKED ON!! > 183 ;; 1. remove led whitespace > 184 ;; 2. tack on to hed with "\n" > 185 (let ((match (string-match configf:cont-ln-rx hed))) > 186 (if match ;; blast! have to deal with a multiline > 187 (let* ((lead (cadr match)) > 188 (lval (caddr match)) > 189 (newl (conc cur "\n" lval))) > 190 (if (not led)(set! led lead)) > 191 (if (null? tal) > 192 (set! fdat (append fdat (list newl))) > 193 (loop (car tal)(cdr tal) newl led res))) ;; NB// not tacki > 194 (let ((newres (if led > 195 (append res (list cur hed)) > 196 (append res (list hed))))) > 197 ;; prev was a multiline > 198 (if (null? tal) > 199 newres > 200 (loop (car tal)(cdr tal) "" #f newres)))))))) > 201 > 202 ;; note: I'm cheating a little here. I merely replace "\n" with "\n " > 203 (define (configf:expand-multi-lines fdat) > 204 ;; step 1.5 - compress any continued lines > 205 (if (null? fdat) fdat > 206 (let loop ((hed (car fdat)) > 207 (tal (cdr fdat)) > 208 (res '())) > 209 (let ((newres (append res (list (string-substitute (regexp "\n") "\n > 210 (if (null? tal) > 211 newres > 212 (loop (car tal)(cdr tal) newres)))))) > 213 > 214 (define (configf:file->list fname) > 215 (if (file-exists? fname) > 216 (let ((inp (open-input-file fname))) > 217 (let loop ((inl (read-line inp)) > 218 (res '())) > 219 (if (eof-object? inl) > 220 (begin > 221 (close-input-port inp) > 222 (reverse res)) > 223 (loop (read-line inp)(cons inl))))) > 224 '())) > 225 > 226 ;;====================================================================== > 227 ;; Write a config > 228 ;; 0. Given a refererence data structure "indat" > 229 ;; 1. Open the output file and read it into a list > 230 ;; 2. Flatten any multiline entries > 231 ;; 3. Modify values per contents of "indat" and remove absent values > 232 ;; 4. Append new values to the section (immediately after last legit entry) > 233 ;; 5. Write out the new list > 234 ;;====================================================================== > 235 > 236 (define (configf:write-config indat fname #!key (required-sections '())) > 237 (let* (;; step 1: Open the output file and read it into a list > 238 (fdat (configf:file->list fname)) > 239 (refdat (make-hash-table)) > 240 (sechash (make-hash-table)) ;; current section hash, init with hash for > 241 (new #f) ;; put the line to be used in new, if it is to be deleted > 242 (secname #f)) > 243 > 244 ;; step 2: Flatten multiline entries > 245 (if (not (null? fdat))(set! fdat (configf:compress-multi-line fdat))) > 246 > 247 ;; step 3: Modify values per contents of "indat" and remove absent values > 248 (if (not (null? fdat)) > 249 (let loop ((hed (car fdat)) > 250 (tal (cadr fdat)) > 251 (res '()) > 252 (lnum 0)) > 253 (regex-case > 254 hed > 255 (configf:comment-rx _ (set! res (append res (list he > 256 (configf:blank-l-rx _ (set! res (append res (list he > 257 (configf:section-rx ( x section-name ) (let ((section-hash (hash-tabl > 258 (if (not section-hash) > 259 (let ((newhash (make-hash-table) > 260 (hash-table-set! refhash secti > 261 (set! sechash newhash)) > 262 (set! sechash section-hash)) > 263 (set! new hed) ;; will append this a > 264 (set! secname section-name) > 265 )) > 266 ;; No need to process key cmd, let it fall though to key val > 267 (configf:key-val-pr ( x key val ) > 268 (let ((newval (config-lookup indat sec key))) > 269 ;; can handle newval == #f here => that means key is re > 270 (cond > 271 ((equal? newval val) > 272 (set! res (append res (list hed)))) > 273 ((not newval) ;; key has been removed > 274 (set! new #f)) > 275 ((not (equal? newval val)) > 276 (hash-table-set! sechash key newval) > 277 (set! new (conc key " " newval))) > 278 (else > 279 (debug:print 0 "ERROR: problem parsing line number " > 280 (else > 281 (debug:print 0 "ERROR: Problem parsing line num " lnum " :\n " hed > 282 (if (not (null? tal)) > 283 (loop (car tal)(cdr tal)(if new (append res (list new)) res)(+ lnu > 284 ;; drop to here when done processing, res contains modified list of li > 285 (set! fdat res))) > 286 > 287 ;; step 4: Append new values to the section > 288 (for-each > 289 (lambda (section) > 290 (let ((sdat '()) ;; append needed bits here > 291 (svars (configf:section-vars indat section))) > 292 (for-each > 293 (lambda (var) > 294 (let ((val (config-lookup refdat section var))) > 295 (if (not val) ;; this one is new > 296 (begin > 297 (if (null? sdat)(set! sdat (list (conc "[" section "]")))) > 298 (set! sdat (append sdat (list (conc var " " val)))))))) > 299 svars) > 300 (set! fdat (append fdat sdat)))) > 301 (delete-duplicates (append require-sections (hash-table-keys indat)))) > 302 > 303 ;; step 5: Write out new file > 304 (with-output-to-file fname > 305 (lambda () > 306 (for-each > 307 (lambda (line) > 308 (print line)) > 309 (configf:expand-multi-lines fdat)))))) 152 310
Added dashboard-main.scm version [4cd8b53cd2169ae1]
> 1 ;;====================================================================== > 2 ;; Copyright 2006-2011, Matthew Welland. > 3 ;; > 4 ;; This program is made available under the GNU GPL version 2.0 or > 5 ;; greater. See the accompanying file COPYING for details. > 6 ;; > 7 ;; This program is distributed WITHOUT ANY WARRANTY; without even the > 8 ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR > 9 ;; PURPOSE. > 10 ;;====================================================================== > 11 > 12 ;;====================================================================== > 13 ;; Main Megatest Panel > 14 ;;====================================================================== > 15 > 16 (use format) > 17 (require-library iup) > 18 (import (prefix iup iup:)) > 19 > 20 (use canvas-draw) > 21 > 22 (use sqlite3 srfi-1 posix regex regex-case srfi-69) > 23 (import (prefix sqlite3 sqlite3:)) > 24 > 25 (declare (unit dashboard-main)) > 26 (declare (uses common)) > 27 (declare (uses keys)) > 28 (declare (uses db)) > 29 (declare (uses tasks)) > 30 > 31 (include "common_records.scm") > 32 (include "db_records.scm") > 33 (include "run_records.scm") > 34 (include "task_records.scm") > 35 > 36 (define (main-menu) > 37 (iup:menu ;; a menu is a special attribute to a dialog (think Gnome putting th > 38 (iup:menu-item "Files" (iup:menu ;; Note that you can use either #:action o > 39 (iup:menu-item "Open" action: (lambda (obj) > 40 (show (iup:file-dialog)) > 41 (print "File->open " obj > 42 (iup:menu-item "Save" #:action (lambda (obj)(print "File > 43 (iup:menu-item "Exit" #:action (lambda (obj)(exit))))) > 44 (iup:menu-item "Tools" (iup:menu > 45 (iup:menu-item "Create new blah" #:action (lambda (obj)(p > 46 ;; (iup:menu-item "Show dialog" #:action (lambda (obj > 47 ;; (show message > 48 ;; #:modal? #t > 49 ;; ;; set posi > 50 ;; ;; #:x 'mou > 51 ;; ;; #:y 'mou > 52 ;; ) > 53 )))) > 54 > 55 > 56 (define (mtest) > 57 (let* ((curr-row-num 0) > 58 (rawconfig (read-config (conc *toppath* "/megatest.config") #f ' > 59 (keys-matrix (iup:matrix > 60 #:expand "VERTICAL" > 61 ;; #:scrollbar "YES" > 62 #:numcol 1 > 63 #:numlin 20 > 64 #:numcol-visible 1 > 65 #:numlin-visible 5 > 66 #:click-cb (lambda (obj lin col status) > 67 (print "obj: " obj " lin: " lin " col: > 68 (setup-matrix (iup:matrix > 69 #:expand "YES" > 70 #:numcol 1 > 71 #:numlin 5 > 72 #:numcol-visible 1 > 73 #:numlin-visible 3)) > 74 (jobtools-matrix (iup:matrix > 75 #:expand "YES" > 76 #:numcol 1 > 77 #:numlin 5 > 78 #:numcol-visible 1 > 79 #:numlin-visible 3)) > 80 (validvals-matrix (iup:matrix > 81 #:expand "YES" > 82 #:numcol 1 > 83 #:numlin 2 > 84 #:numcol-visible 1 > 85 #:numlin-visible 2)) > 86 (envovrd-matrix (iup:matrix > 87 #:expand "YES" > 88 #:numcol 1 > 89 #:numlin 20 > 90 #:numcol-visible 1 > 91 #:numlin-visible 8)) > 92 (disks-matrix (iup:matrix > 93 #:expand "YES" > 94 #:numcol 1 > 95 #:numlin 20 > 96 #:numcol-visible 1 > 97 #:numlin-visible 8))) > 98 (iup:attribute-set! keys-matrix "0:0" "Field Num") > 99 (iup:attribute-set! keys-matrix "0:1" "Field Name") > 100 (iup:attribute-set! keys-matrix "WIDTH1" "100") > 101 (iup:attribute-set! disks-matrix "0:0" "Disk Name") > 102 (iup:attribute-set! disks-matrix "0:1" "Disk Path") > 103 (iup:attribute-set! disks-matrix "WIDTH1" "120") > 104 (iup:attribute-set! disks-matrix "WIDTH0" "100") > 105 (iup:attribute-set! disks-matrix "ALIGNMENT1" "ALEFT") > 106 (iup:attribute-set! disks-matrix "FIXTOTEXT" "C1") > 107 (iup:attribute-set! disks-matrix "RESIZEMATRIX" "YES") > 108 ;; fill in keys > 109 (set! curr-row-num 1) > 110 (for-each > 111 (lambda (var) > 112 (iup:attribute-set! keys-matrix (conc curr-row-num ":0") curr-row-num) > 113 (iup:attribute-set! keys-matrix (conc curr-row-num ":1") var) > 114 (set! curr-row-num (+ 1 curr-row-num))) ;; (config-lookup *configdat* "fi > 115 (configf:section-vars rawconfig "fields")) > 116 > 117 ;; fill in existing info > 118 (for-each > 119 (lambda (mat fname) > 120 (set! curr-row-num 1) > 121 (for-each > 122 (lambda (var) > 123 (iup:attribute-set! mat (conc curr-row-num ":0") var) > 124 (iup:attribute-set! mat (conc curr-row-num ":1") (config-lookup rawcon > 125 (set! curr-row-num (+ curr-row-num 1))) > 126 (configf:section-vars rawconfig fname))) > 127 (list setup-matrix jobtools-matrix validvals-matrix envovrd-matrix disks-ma > 128 (list "setup" "jobtools" "validvalues" "env-override" "disks > 129 > 130 (for-each > 131 (lambda (mat) > 132 (iup:attribute-set! mat "0:1" "Value") > 133 (iup:attribute-set! mat "0:0" "Var") > 134 (iup:attribute-set! mat "ALIGNMENT1" "ALEFT") > 135 (iup:attribute-set! mat "FIXTOTEXT" "C1") > 136 (iup:attribute-set! mat "RESIZEMATRIX" "YES") > 137 (iup:attribute-set! mat "WIDTH1" "120") > 138 (iup:attribute-set! mat "WIDTH0" "100") > 139 ) > 140 (list setup-matrix jobtools-matrix validvals-matrix envovrd-matrix)) > 141 > 142 (iup:attribute-set! validvals-matrix "WIDTH1" "290") > 143 (iup:attribute-set! envovrd-matrix "WIDTH1" "290") > 144 > 145 (iup:vbox > 146 (iup:hbox > 147 > 148 (iup:vbox > 149 (let ((tabs (iup:tabs > 150 ;; The required tab > 151 (iup:hbox > 152 ;; The keys > 153 (iup:frame > 154 #:title "Keys (required)" > 155 (iup:vbox > 156 (iup:label (conc "Set the fields for organising your runs > 157 "here. Note: can only be changed before\ > 158 "running the first run when megatest.db\ > 159 "is created.")) > 160 keys-matrix)) > 161 (iup:vbox > 162 ;; The setup section > 163 (iup:frame > 164 #:title "Setup" > 165 (iup:vbox > 166 (iup:label (conc "max_concurrent_jobs : limits total con > 167 "linktree : directory where linktree wi > 168 setup-matrix)) > 169 ;; The jobtools > 170 (iup:frame > 171 #:title "Jobtools" > 172 (iup:vbox > 173 (iup:label (conc "launcher : tool or script to run jobs > 174 "useshell : use system to run your laun > 175 "workhosts : spread jobs out on these h > 176 jobtools-matrix)) > 177 ;; The disks > 178 (iup:frame > 179 #:title "Disks" > 180 (iup:vbox > 181 (iup:label (conc "Enter names and existing paths of loca > 182 disks-matrix)))) > 183 ;; The optional tab > 184 (iup:vbox > 185 ;; The Environment Overrides > 186 (iup:frame > 187 #:title "Env override" > 188 envovrd-matrix) > 189 ;; The valid values > 190 (iup:frame > 191 #:title "Validvalues" > 192 validvals-matrix) > 193 )))) > 194 (iup:attribute-set! tabs "TABTITLE0" "Required settings") > 195 (iup:attribute-set! tabs "TABTITLE1" "Optional settings") > 196 tabs)) > 197 )))) > 198 > 199 (define (rconfig) > 200 (iup:vbox > 201 (iup:frame #:title "Default"))) > 202 > 203 (define (tests) > 204 (iup:hbox > 205 (iup:frame #:title "Tests browser"))) > 206 > 207 (define (runs) > 208 (iup:hbox > 209 (iup:frame #:title "Runs browser"))) > 210 > 211 (define (main-panel) > 212 (iup:dialog > 213 #:title "Menu Test" > 214 #:menu (main-menu) > 215 (let ((tabtop (iup:tabs (mtest) (rconfig) (tests) (runs)))) > 216 (iup:attribute-set! tabtop "TABTITLE0" "Megatest") > 217 (iup:attribute-set! tabtop "TABTITLE1" "Runconfigs") > 218 (iup:attribute-set! tabtop "TABTITLE2" "Tests") > 219 (iup:attribute-set! tabtop "TABTITLE3" "Runs") > 220 tabtop)))
Modified dashboard-tests.scm from [e8ada23103295646] to [8aad97ccf0c03880].
264 (testmeta (if testdat 264 (testmeta (if testdat 265 (let ((tm (db:testmeta-get-record db testname))) 265 (let ((tm (db:testmeta-get-record db testname))) 266 (if tm tm (make-db:testmeta))) 266 (if tm tm (make-db:testmeta))) 267 (make-db:testmeta))) 267 (make-db:testmeta))) 268 268 269 (keystring (string-intersperse 269 (keystring (string-intersperse 270 (map (lambda (keyval) 270 (map (lambda (keyval) 271 (conc ":" (car keyval) " " (cadr keyval))) | 271 ;; (conc ":" (car keyval) " " (cadr keyval))) > 272 (cadr keyval)) 272 keydat) 273 keydat) 273 " ")) | 274 "/")) 274 (item-path (db:test-get-item-path testdat)) 275 (item-path (db:test-get-item-path testdat)) 275 (viewlog (lambda (x) 276 (viewlog (lambda (x) 276 (if (file-exists? logfile) 277 (if (file-exists? logfile) 277 ;(system (conc "firefox " logfile "&")) 278 ;(system (conc "firefox " logfile "&")) 278 (iup:send-url logfile) 279 (iup:send-url logfile) 279 (message-window (conc "File " logfile " not found"))) 280 (message-window (conc "File " logfile " not found"))) 280 (xterm (lambda (x) 281 (xterm (lambda (x) ................................................................................................................................................................................ 330 (command-text-box (iup:textbox #:expand "HORIZONTAL" #:font "Courier Ne 331 (command-text-box (iup:textbox #:expand "HORIZONTAL" #:font "Courier Ne 331 (command-launch-button (iup:button "Execute!" #:action (lambda (x) 332 (command-launch-button (iup:button "Execute!" #:action (lambda (x) 332 (let ((cmd (iu 333 (let ((cmd (iu 333 (system (con 334 (system (con 334 (run-test (lambda (x) 335 (run-test (lambda (x) 335 (iup:attribute-set! 336 (iup:attribute-set! 336 command-text-box "VALUE" 337 command-text-box "VALUE" 337 (conc "megatest -runtests " testname " " keystring " :run | 338 (conc "megatest -runtests " testname " -target " keystrin 338 " -itempatt " (if (equal? item-path "") 339 " -itempatt " (if (equal? item-path "") 339 "%" 340 "%" 340 item-path) 341 item-path) 341 " -keepgoing > run.log" )))) | 342 "" )))) 342 (remove-test (lambda (x) 343 (remove-test (lambda (x) 343 (iup:attribute-set! 344 (iup:attribute-set! 344 command-text-box "VALUE" 345 command-text-box "VALUE" 345 (conc "megatest -remove-runs " keystring " :runname " r | 346 (conc "megatest -remove-runs -target " keystring " :run 346 (if (equal? item-path "") 347 (if (equal? item-path "") 347 "%" 348 "%" 348 item-path) 349 item-path) 349 " > clean.log"))))) | 350 " -v "))))) 350 (cond 351 (cond 351 ((not testdat)(begin (print "ERROR: bad test info for " test-id)(exit 1))) 352 ((not testdat)(begin (print "ERROR: bad test info for " test-id)(exit 1))) 352 ((not rundat)(begin (print "ERROR: found test info but there is a problem w 353 ((not rundat)(begin (print "ERROR: found test info but there is a problem w 353 (else 354 (else 354 ;; (test-set-status! db run-id test-name state status itemdat) 355 ;; (test-set-status! db run-id test-name state status itemdat) 355 (set! self ; 356 (set! self ; 356 (iup:dialog #:close_cb (lambda (a)(exit)) ; #:expand "YES" 357 (iup:dialog #:close_cb (lambda (a)(exit)) ; #:expand "YES" ................................................................................................................................................................................ 429 #:expand "YES" 430 #:expand "YES" 430 #:multiline "YES" 431 #:multiline "YES" 431 #:font "Courier New, -10" 432 #:font "Courier New, -10" 432 #:size "100x100"))) 433 #:size "100x100"))) 433 (hash-table-set! widgets "Test Data" 434 (hash-table-set! widgets "Test Data" 434 (lambda (testdat) ;; 435 (lambda (testdat) ;; 435 (let* ((currval (iup:attribute test-data " 436 (let* ((currval (iup:attribute test-data " 436 (fmtstr "~10a~10a~10a~10a~7a~7a~6a | 437 (fmtstr "~10a~10a~10a~10a~7a~7a~6a 437 (newval (string-intersperse 438 (newval (string-intersperse 438 (append 439 (append 439 (list 440 (list 440 (format #f fmtstr "Cate | 441 (format #f fmtstr "Cate 441 (format #f fmtstr "==== | 442 (format #f fmtstr "==== 442 (map (lambda (x) 443 (map (lambda (x) 443 (format #f fmtstr 444 (format #f fmtstr 444 (db:test- 445 (db:test- 445 (db:test- 446 (db:test- 446 (db:test- 447 (db:test- 447 (db:test- 448 (db:test- 448 (db:test- 449 (db:test- 449 (db:test- 450 (db:test- 450 (db:test- 451 (db:test- > 452 (db:test- 451 (db:test- 453 (db:test- 452 (db:read-test-data 454 (db:read-test-data 453 "\n"))) 455 "\n"))) 454 (if (not (equal? currval newval)) 456 (if (not (equal? currval newval)) 455 (iup:attribute-set! test-data "VALUE 457 (iup:attribute-set! test-data "VALUE 456 test-data))) 458 test-data))) 457 ))) 459 )))
Modified dashboard.scm from [d2972b66b4c926a7] to [f216c4adf5f8ae24].
25 (declare (uses db)) 25 (declare (uses db)) 26 (declare (uses configf)) 26 (declare (uses configf)) 27 (declare (uses process)) 27 (declare (uses process)) 28 (declare (uses launch)) 28 (declare (uses launch)) 29 (declare (uses runs)) 29 (declare (uses runs)) 30 (declare (uses dashboard-tests)) 30 (declare (uses dashboard-tests)) 31 (declare (uses dashboard-guimonitor)) 31 (declare (uses dashboard-guimonitor)) > 32 (declare (uses dashboard-main)) 32 (declare (uses megatest-version)) 33 (declare (uses megatest-version)) 33 34 34 (include "common_records.scm") 35 (include "common_records.scm") 35 (include "db_records.scm") 36 (include "db_records.scm") 36 (include "run_records.scm") 37 (include "run_records.scm") 37 38 38 (define help (conc 39 (define help (conc ................................................................................................................................................................................ 55 (list "-rows" 56 (list "-rows" 56 "-run" 57 "-run" 57 "-test" 58 "-test" 58 "-debug" 59 "-debug" 59 ) 60 ) 60 (list "-h" 61 (list "-h" 61 "-guimonitor" 62 "-guimonitor" > 63 "-main" 62 "-v" 64 "-v" 63 "-q" 65 "-q" 64 ) 66 ) 65 args:arg-hash 67 args:arg-hash 66 0)) 68 0)) 67 69 68 (if (args:get-arg "-h") 70 (if (args:get-arg "-h") ................................................................................................................................................................................ 97 (define *examine-test-dat* (make-hash-table)) 99 (define *examine-test-dat* (make-hash-table)) 98 (define *exit-started* #f) 100 (define *exit-started* #f) 99 (define *status-ignore-hash* (make-hash-table)) 101 (define *status-ignore-hash* (make-hash-table)) 100 (define *state-ignore-hash* (make-hash-table)) 102 (define *state-ignore-hash* (make-hash-table)) 101 103 102 (define *last-db-update-time* 0) 104 (define *last-db-update-time* 0) 103 (define *please-update-buttons* #t) 105 (define *please-update-buttons* #t) > 106 (define *delayed-update* 0) > 107 104 (define *db-file-path* (conc *toppath* "/megatest.db")) 108 (define *db-file-path* (conc *toppath* "/megatest.db")) 105 109 106 (define *tests-sort-reverse* #f) 110 (define *tests-sort-reverse* #f) 107 (define *hide-empty-runs* #f) 111 (define *hide-empty-runs* #f) 108 112 109 (define *verbosity* (cond 113 (define *verbosity* (cond 110 ((args:get-arg "-debug")(string->number (args:get-arg "-deb 114 ((args:get-arg "-debug")(string->number (args:get-arg "-deb ................................................................................................................................................................................ 195 (c2 (map string->number (string-split color2))) 199 (c2 (map string->number (string-split color2))) 196 (delta (map (lambda (a b)(abs (- a b))) c1 c2))) 200 (delta (map (lambda (a b)(abs (- a b))) c1 c2))) 197 (null? (filter (lambda (x)(> x 3)) delta)))) 201 (null? (filter (lambda (x)(> x 3)) delta)))) 198 202 199 ;; keypatts: ( (KEY1 "abc%def")(KEY2 "%") ) 203 ;; keypatts: ( (KEY1 "abc%def")(KEY2 "%") ) 200 (define (update-rundat runnamepatt numruns testnamepatt itemnamepatt keypatts) 204 (define (update-rundat runnamepatt numruns testnamepatt itemnamepatt keypatts) 201 (let ((modtime (file-modification-time *db-file-path*))) 205 (let ((modtime (file-modification-time *db-file-path*))) 202 (if (> modtime *last-db-update-time*) | 206 (if (or (> modtime *last-db-update-time*) > 207 (> *delayed-update* 0)) 203 (begin 208 (begin 204 (set! *please-update-buttons* #t) 209 (set! *please-update-buttons* #t) 205 (set! *last-db-update-time* modtime) 210 (set! *last-db-update-time* modtime) > 211 (set! *delayed-update* (- *delayed-update* 1)) 206 (let* ((allruns (db:get-runs *db* runnamepatt numruns ;; (+ numrun 212 (let* ((allruns (db:get-runs *db* runnamepatt numruns ;; (+ numrun 207 *start-run-offset* keypatts)) 213 *start-run-offset* keypatts)) 208 (header (db:get-header allruns)) 214 (header (db:get-header allruns)) 209 (runs (db:get-rows allruns)) 215 (runs (db:get-rows allruns)) 210 (result '()) 216 (result '()) 211 (maxtests 0) 217 (maxtests 0) 212 (states (hash-table-keys *state-ignore-hash*)) 218 (states (hash-table-keys *state-ignore-hash*)) ................................................................................................................................................................................ 444 450 445 (define (mkstr . x) 451 (define (mkstr . x) 446 (string-intersperse (map conc x) ",")) 452 (string-intersperse (map conc x) ",")) 447 453 448 (define (update-search x val) 454 (define (update-search x val) 449 ;; (print "Setting search for " x " to " val) 455 ;; (print "Setting search for " x " to " val) 450 (hash-table-set! *searchpatts* x val)) 456 (hash-table-set! *searchpatts* x val)) > 457 > 458 (define (mark-for-update) > 459 (set! *last-db-update-time* 0) > 460 (set! *delayed-update* 1) > 461 ) 451 462 452 (define (make-dashboard-buttons nruns ntests keynames) 463 (define (make-dashboard-buttons nruns ntests keynames) 453 (let* ((nkeys (length keynames)) 464 (let* ((nkeys (length keynames)) 454 (runsvec (make-vector nruns)) 465 (runsvec (make-vector nruns)) 455 (header (make-vector nruns)) 466 (header (make-vector nruns)) 456 (lftcol (make-vector ntests)) 467 (lftcol (make-vector ntests)) 457 (keycol (make-vector ntests)) 468 (keycol (make-vector ntests)) ................................................................................................................................................................................ 466 (iup:hbox 477 (iup:hbox 467 (iup:vbox 478 (iup:vbox 468 (iup:frame 479 (iup:frame 469 #:title "filter test and items" 480 #:title "filter test and items" 470 (iup:hbox 481 (iup:hbox 471 (iup:textbox #:size "60x15" #:fontsize "10" #:value "%" 482 (iup:textbox #:size "60x15" #:fontsize "10" #:value "%" 472 #:action (lambda (obj unk val) 483 #:action (lambda (obj unk val) 473 (set! *last-db-update-time* 0) | 484 (mark-for-update) 474 (update-search "test-name" val))) 485 (update-search "test-name" val))) 475 (iup:textbox #:size "60x15" #:fontsize "10" #:value "%" 486 (iup:textbox #:size "60x15" #:fontsize "10" #:value "%" 476 #:action (lambda (obj unk val) 487 #:action (lambda (obj unk val) 477 (set! *last-db-update-time* 0) | 488 (mark-for-update) 478 (update-search "item-name" val))))) 489 (update-search "item-name" val))))) 479 (iup:vbox 490 (iup:vbox 480 (iup:hbox 491 (iup:hbox 481 (iup:button "Sort" #:action (lambda (obj) 492 (iup:button "Sort" #:action (lambda (obj) 482 (set! *tests-sort-reverse* (not *tes 493 (set! *tests-sort-reverse* (not *tes 483 (iup:attribute-set! obj "TITLE" (if 494 (iup:attribute-set! obj "TITLE" (if 484 (set! *last-db-update-time* 0))) | 495 (mark-for-update))) 485 (iup:button "HideEmpty" #:action (lambda (obj) 496 (iup:button "HideEmpty" #:action (lambda (obj) 486 (set! *hide-empty-runs* (not *h 497 (set! *hide-empty-runs* (not *h 487 (iup:attribute-set! obj "TITLE" 498 (iup:attribute-set! obj "TITLE" 488 (set! *last-db-update-time* 0)) | 499 (mark-for-update))) 489 (iup:button "Refresh" #:action (lambda (obj) 500 (iup:button "Refresh" #:action (lambda (obj) 490 (set! *last-db-update-time* 0)) | 501 (mark-for-update)))) 491 (iup:hbox 502 (iup:hbox 492 (iup:button "Quit" #:action (lambda (obj)(sqlite3:finalize! *db*)( 503 (iup:button "Quit" #:action (lambda (obj)(sqlite3:finalize! *db*)( 493 (iup:button "Monitor" #:action (lambda (obj)(system (conc (car (ar 504 (iup:button "Monitor" #:action (lambda (obj)(system (conc (car (ar 494 )) 505 )) 495 ;; (iup:button "<- Left" #:action (lambda (obj)(set! *start-run-offs 506 ;; (iup:button "<- Left" #:action (lambda (obj)(set! *start-run-offs 496 ;; (iup:button "Up ^" #:action (lambda (obj)(set! *start-test-off 507 ;; (iup:button "Up ^" #:action (lambda (obj)(set! *start-test-off 497 ;; (iup:button "Down v" #:action (lambda (obj)(set! *start-test-off 508 ;; (iup:button "Down v" #:action (lambda (obj)(set! *start-test-off ................................................................................................................................................................................ 499 (iup:frame 510 (iup:frame 500 #:title "hide" 511 #:title "hide" 501 (iup:vbox 512 (iup:vbox 502 (apply 513 (apply 503 iup:hbox 514 iup:hbox 504 (map (lambda (status) 515 (map (lambda (status) 505 (iup:toggle status #:action (lambda (obj val) 516 (iup:toggle status #:action (lambda (obj val) 506 (set! *last-db-update-time | 517 (mark-for-update) 507 (if (eq? val 1) 518 (if (eq? val 1) 508 (hash-table-set! *stat 519 (hash-table-set! *stat 509 (hash-table-delete! *s 520 (hash-table-delete! *s 510 '("PASS" "FAIL" "WARN" "CHECK" "WAIVED" "STUCK/DEAD" "n/a"))) 521 '("PASS" "FAIL" "WARN" "CHECK" "WAIVED" "STUCK/DEAD" "n/a"))) 511 (apply 522 (apply 512 iup:hbox 523 iup:hbox 513 (map (lambda (state) 524 (map (lambda (state) 514 (iup:toggle state #:action (lambda (obj val) 525 (iup:toggle state #:action (lambda (obj val) 515 (set! *last-db-update-time | 526 (mark-for-update) 516 (if (eq? val 1) 527 (if (eq? val 1) 517 (hash-table-set! *stat 528 (hash-table-set! *stat 518 (hash-table-delete! *s 529 (hash-table-delete! *s 519 '("RUNNING" "COMPLETED" "INCOMPLETE" "LAUNCHED" "NOT_STARTED" 530 '("RUNNING" "COMPLETED" "INCOMPLETE" "LAUNCHED" "NOT_STARTED" 520 (iup:valuator #:valuechanged_cb (lambda (obj) 531 (iup:valuator #:valuechanged_cb (lambda (obj) 521 (let ((val (inexact->exact (round 532 (let ((val (inexact->exact (round 522 (oldmax (string->number ( 533 (oldmax (string->number ( 523 (maxruns *tot-run-count*)) 534 (maxruns *tot-run-count*)) 524 (set! *start-run-offset* val) 535 (set! *start-run-offset* val) 525 (set! *last-db-update-time* 0) | 536 (mark-for-update) 526 (debug:print 6 "*start-run-offs 537 (debug:print 6 "*start-run-offs 527 (iup:attribute-set! obj "MAX" ( 538 (iup:attribute-set! obj "MAX" ( 528 #:expand "YES" 539 #:expand "YES" 529 #:max (* 10 (length *allruns*))))) 540 #:max (* 10 (length *allruns*))))) 530 ;(iup:button "inc rows" #:action (lambda (obj)(set! *num-tests* (+ *n 541 ;(iup:button "inc rows" #:action (lambda (obj)(set! *num-tests* (+ *n 531 ;(iup:button "dec rows" #:action (lambda (obj)(set! *num-tests* (if ( 542 ;(iup:button "dec rows" #:action (lambda (obj)(set! *num-tests* (if ( 532 ) 543 ) ................................................................................................................................................................................ 537 (iup:label) ;; (iup:valuator) 548 (iup:label) ;; (iup:valuator) 538 (apply iup:vbox 549 (apply iup:vbox 539 (map (lambda (x) 550 (map (lambda (x) 540 (let ((res (iup:hbox 551 (let ((res (iup:hbox 541 (iup:label x #:size "40x15" #: 552 (iup:label x #:size "40x15" #: 542 (iup:textbox #:size "60x15" #: 553 (iup:textbox #:size "60x15" #: 543 #:action (lambda 554 #:action (lambda 544 (set! | 555 (mark- 545 (updat 556 (updat 546 (set! i (+ i 1)) 557 (set! i (+ i 1)) 547 res)) 558 res)) 548 keynames))))) 559 keynames))))) 549 (let loop ((testnum 0) 560 (let loop ((testnum 0) 550 (res '())) 561 (res '())) 551 (cond 562 (cond ................................................................................................................................................................................ 570 #:flat "YES" 581 #:flat "YES" 571 #:alignment "ALEFT" 582 #:alignment "ALEFT" 572 ; #:image img1 583 ; #:image img1 573 ; #:impress img2 584 ; #:impress img2 574 #:size "100x15" 585 #:size "100x15" 575 #:fontsize "10" 586 #:fontsize "10" 576 #:action (lambda (obj) 587 #:action (lambda (obj) 577 (set! *last-db-update-time* 0) | 588 (mark-for-update) 578 (toggle-hide testnum))))) ;; (iup:at 589 (toggle-hide testnum))))) ;; (iup:at 579 (vector-set! lftcol testnum labl) 590 (vector-set! lftcol testnum labl) 580 (loop (+ testnum 1)(cons labl res)))))) 591 (loop (+ testnum 1)(cons labl res)))))) 581 ;; 592 ;; 582 (let loop ((runnum 0) 593 (let loop ((runnum 0) 583 (keynum 0) 594 (keynum 0) 584 (keyvec (make-vector nkeys)) 595 (keyvec (make-vector nkeys)) ................................................................................................................................................................................ 689 (if testid 700 (if testid 690 (examine-test *db* testid) 701 (examine-test *db* testid) 691 (begin 702 (begin 692 (print "ERROR: testid is not a number " (args:get-arg "-test")) 703 (print "ERROR: testid is not a number " (args:get-arg "-test")) 693 (exit 1))))) 704 (exit 1))))) 694 ((args:get-arg "-guimonitor") 705 ((args:get-arg "-guimonitor") 695 (gui-monitor *db*)) 706 (gui-monitor *db*)) > 707 ((args:get-arg "-main") > 708 (iup:show (main-panel))) 696 (else 709 (else 697 (set! uidat (make-dashboard-buttons *num-runs* *num-tests* *dbkeys*)) 710 (set! uidat (make-dashboard-buttons *num-runs* *num-tests* *dbkeys*)) 698 (iup:callback-set! *tim* 711 (iup:callback-set! *tim* 699 "ACTION_CB" 712 "ACTION_CB" 700 (lambda (x) 713 (lambda (x) 701 (run-update x))))) 714 (run-update x))))) 702 ;(print x))))) 715 ;(print x))))) 703 716 704 (iup:main-loop) 717 (iup:main-loop)
Modified db.scm from [29e62d469f625dc3] to [cf37c2a3a0f0491d].
36 (let* ((keys (config-get-fields configdat)) 36 (let* ((keys (config-get-fields configdat)) 37 (havekeys (> (length keys) 0)) 37 (havekeys (> (length keys) 0)) 38 (keystr (keys->keystr keys)) 38 (keystr (keys->keystr keys)) 39 (fieldstr (keys->key/field keys))) 39 (fieldstr (keys->key/field keys))) 40 (for-each (lambda (key) 40 (for-each (lambda (key) 41 (let ((keyn (vector-ref key 0))) 41 (let ((keyn (vector-ref key 0))) 42 (if (member (string-downcase keyn) 42 (if (member (string-downcase keyn) 43 (list "runname" "state" "status" "owner" "e | 43 (list "runname" "state" "status" "owner" "ev 44 "pass_count")) | 44 "pass_count")) 45 (begin 45 (begin 46 (print "ERROR: your key cannot be named " keyn " a 46 (print "ERROR: your key cannot be named " keyn " a 47 (system (conc "rm -f " dbpath)) 47 (system (conc "rm -f " dbpath)) 48 (exit 1))))) 48 (exit 1))))) 49 keys) 49 keys) 50 ;; (sqlite3:execute db "PRAGMA synchronous = OFF;") 50 ;; (sqlite3:execute db "PRAGMA synchronous = OFF;") 51 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS keys (id INTEGER PRIMA 51 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS keys (id INTEGER PRIMA 52 (for-each (lambda (key) 52 (for-each (lambda (key) 53 (sqlite3:execute db "INSERT INTO keys (fieldname,fieldtype 53 (sqlite3:execute db "INSERT INTO keys (fieldname,fieldtype 54 keys) 54 keys) 55 (sqlite3:execute db (conc 55 (sqlite3:execute db (conc 56 "CREATE TABLE IF NOT EXISTS runs (id INTEGER PRIMARY | 56 "CREATE TABLE IF NOT EXISTS runs (id INTEGER PRIM 57 fieldstr (if havekeys "," "") | 57 fieldstr (if havekeys "," "") 58 "runname TEXT," | 58 "runname TEXT," 59 "state TEXT DEFAULT ''," | 59 "state TEXT DEFAULT ''," 60 "status TEXT DEFAULT ''," | 60 "status TEXT DEFAULT ''," 61 "owner TEXT DEFAULT ''," | 61 "owner TEXT DEFAULT ''," 62 "event_time TIMESTAMP," | 62 "event_time TIMESTAMP," 63 "comment TEXT DEFAULT ''," | 63 "comment TEXT DEFAULT ''," 64 "fail_count INTEGER DEFAULT 0," | 64 "fail_count INTEGER DEFAULT 0," 65 "pass_count INTEGER DEFAULT 0," | 65 "pass_count INTEGER DEFAULT 0," 66 "CONSTRAINT runsconstraint UNIQUE (runname" (if have | 66 "CONSTRAINT runsconstraint UNIQUE (runname" (if h 67 (sqlite3:execute db (conc "CREATE INDEX runs_index ON runs (runname" ( 67 (sqlite3:execute db (conc "CREATE INDEX runs_index ON runs (runname" ( 68 (sqlite3:execute db 68 (sqlite3:execute db 69 "CREATE TABLE IF NOT EXISTS tests | 69 "CREATE TABLE IF NOT EXISTS tests 70 (id INTEGER PRIMARY KEY, 70 (id INTEGER PRIMARY KEY, 71 run_id INTEGER, 71 run_id INTEGER, 72 testname TEXT, 72 testname TEXT, 73 host TEXT DEFAULT 'n/a', 73 host TEXT DEFAULT 'n/a', 74 cpuload REAL DEFAULT -1, 74 cpuload REAL DEFAULT -1, 75 diskfree INTEGER DEFAULT -1, 75 diskfree INTEGER DEFAULT -1, 76 uname TEXT DEFAULT 'n/a', 76 uname TEXT DEFAULT 'n/a', ................................................................................................................................................................................ 111 owner TEXT DEFAULT '', 111 owner TEXT DEFAULT '', 112 description TEXT DEFAULT '', 112 description TEXT DEFAULT '', 113 reviewed TIMESTAMP, 113 reviewed TIMESTAMP, 114 iterated TEXT DEFAULT '', 114 iterated TEXT DEFAULT '', 115 avg_runtime REAL, 115 avg_runtime REAL, 116 avg_disk REAL, 116 avg_disk REAL, 117 tags TEXT DEFAULT '', 117 tags TEXT DEFAULT '', > 118 jobgroup TEXT DEFAULT 'default', 118 CONSTRAINT test_meta_constraint UNIQUE (testname 119 CONSTRAINT test_meta_constraint UNIQUE (testname 119 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS test_data (id INTEGER 120 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS test_data (id INTEGER 120 test_id INTEGER, 121 test_id INTEGER, 121 category TEXT DEFAULT '', 122 category TEXT DEFAULT '', 122 variable TEXT, 123 variable TEXT, 123 value REAL, 124 value REAL, 124 expected REAL, 125 expected REAL, ................................................................................................................................................................................ 171 (patch-db)) 172 (patch-db)) 172 ((< mver 1.21) 173 ((< mver 1.21) 173 (sqlite3:execute db "DROP TABLE IF EXISTS metadat;") 174 (sqlite3:execute db "DROP TABLE IF EXISTS metadat;") 174 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS metadat (id INTEGER, var 175 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS metadat (id INTEGER, var 175 CONSTRAINT metadat_constraint UNIQUE (var));") 176 CONSTRAINT metadat_constraint UNIQUE (var));") 176 (db:set-var db "MEGATEST_VERSION" 1.21) ;; set before, just in case the c 177 (db:set-var db "MEGATEST_VERSION" 1.21) ;; set before, just in case the c 177 (sqlite3:execute db test-meta-def) 178 (sqlite3:execute db test-meta-def) 178 ;(for-each | 179 ;(for-each 179 ; (lambda (stmt) | 180 ; (lambda (stmt) 180 ; (sqlite3:execute db stmt)) | 181 ; (sqlite3:execute db stmt)) 181 ; (list | 182 ; (list 182 ; "ALTER TABLE tests ADD COLUMN first_err TEXT;" | 183 ; "ALTER TABLE tests ADD COLUMN first_e 183 ; "ALTER TABLE tests ADD COLUMN first_warn TEXT;" | 184 ; "ALTER TABLE tests ADD COLUMN first_w 184 ; )) | 185 ; )) 185 (patch-db)) 186 (patch-db)) 186 ((< mver 1.24) 187 ((< mver 1.24) 187 (db:set-var db "MEGATEST_VERSION" 1.24) 188 (db:set-var db "MEGATEST_VERSION" 1.24) 188 (sqlite3:execute db "DROP TABLE IF EXISTS test_data;") 189 (sqlite3:execute db "DROP TABLE IF EXISTS test_data;") 189 (sqlite3:execute db "DROP TABLE IF EXISTS test_meta;") 190 (sqlite3:execute db "DROP TABLE IF EXISTS test_meta;") 190 (sqlite3:execute db test-meta-def) 191 (sqlite3:execute db test-meta-def) 191 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS test_data (id INTEGER PRI 192 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS test_data (id INTEGER PRI ................................................................................................................................................................................ 193 category TEXT DEFAULT '', 194 category TEXT DEFAULT '', 194 variable TEXT, 195 variable TEXT, 195 value REAL, 196 value REAL, 196 expected REAL, 197 expected REAL, 197 tol REAL, 198 tol REAL, 198 units TEXT, 199 units TEXT, 199 comment TEXT DEFAULT '', 200 comment TEXT DEFAULT '', 200 status TEXT DEFAULT 'n/a',foss | 201 status TEXT DEFAULT 'n/a', 201 CONSTRAINT test_data UNIQUE (test_id,category,vari 202 CONSTRAINT test_data UNIQUE (test_id,category,vari > 203 (print "WARNING: Table test_data and test_meta where recreated. Please do 202 (patch-db)) 204 (patch-db)) 203 ((< mver 1.27) 205 ((< mver 1.27) 204 (db:set-var db "MEGATEST_VERSION" 1.27) 206 (db:set-var db "MEGATEST_VERSION" 1.27) 205 (sqlite3:execute db "ALTER TABLE test_data ADD COLUMN type TEXT DEFAULT ' 207 (sqlite3:execute db "ALTER TABLE test_data ADD COLUMN type TEXT DEFAULT ' 206 (patch-db)) 208 (patch-db)) 207 ((< mver 1.29) 209 ((< mver 1.29) 208 (db:set-var db "MEGATEST_VERSION" 1.29) 210 (db:set-var db "MEGATEST_VERSION" 1.29) 209 (sqlite3:execute db "ALTER TABLE test_steps ADD COLUMN logfile TEXT DEFAU 211 (sqlite3:execute db "ALTER TABLE test_steps ADD COLUMN logfile TEXT DEFAU 210 (sqlite3:execute db "ALTER TABLE tests ADD COLUMN shortdir TEXT DEFAULT ' 212 (sqlite3:execute db "ALTER TABLE tests ADD COLUMN shortdir TEXT DEFAULT ' > 213 ((< mver 1.36) > 214 (db:set-var db "MEGATEST_VERSION" 1.36) > 215 (sqlite3:execute db "ALTER TABLER test_meta ADD COLUMN jobgroup TEXT DEFA 211 ((< mver megatest-version) 216 ((< mver megatest-version) 212 (db:set-var db "MEGATEST_VERSION" megatest-version)))))) 217 (db:set-var db "MEGATEST_VERSION" megatest-version)))))) 213 218 214 ;;====================================================================== 219 ;;====================================================================== 215 ;; meta get and set vars 220 ;; meta get and set vars 216 ;;====================================================================== 221 ;;====================================================================== 217 222 ................................................................................................................................................................................ 360 ;; states and statuses are required to be lists, empty is ok 365 ;; states and statuses are required to be lists, empty is ok 361 (define (db-get-tests-for-run db run-id testpatt itempatt states statuses) 366 (define (db-get-tests-for-run db run-id testpatt itempatt states statuses) 362 (let ((res '()) 367 (let ((res '()) 363 (states-str (conc "('" (string-intersperse states "','") "')")) 368 (states-str (conc "('" (string-intersperse states "','") "')")) 364 (statuses-str (conc "('" (string-intersperse statuses "','") "')")) 369 (statuses-str (conc "('" (string-intersperse statuses "','") "')")) 365 ) 370 ) 366 (sqlite3:for-each-row 371 (sqlite3:for-each-row 367 (lambda (id run-id testname state status event-time host cpuload diskfree u | 372 (lambda (a . b) ;; id run-id testname state status event-time host cpuload 368 (set! res (cons (vector id run-id testname state status event-time host c | 373 (set! res (cons (apply vector a b) res))) ;; id run-id testname state sta 369 db 374 db 370 (conc "SELECT id,run_id,testname,state,status,event_time,host,cpuload,diskf 375 (conc "SELECT id,run_id,testname,state,status,event_time,host,cpuload,diskf 371 " FROM tests WHERE run_id=? AND testname like ? AND item_path LIKE ? 376 " FROM tests WHERE run_id=? AND testname like ? AND item_path LIKE ? 372 " AND NOT (state in " states-str " AND status IN " statuses-str ") " 377 " AND NOT (state in " states-str " AND status IN " statuses-str ") " 373 ;; " ORDER BY id DESC;" 378 ;; " ORDER BY id DESC;" 374 " ORDER BY event_time ASC;" ;; POTENTIAL ISSUE! CHECK ME! Does anytin 379 " ORDER BY event_time ASC;" ;; POTENTIAL ISSUE! CHECK ME! Does anytin 375 ) 380 ) ................................................................................................................................................................................ 390 395 391 ;; set tests with state currstate and status currstatus to newstate and newstatu 396 ;; set tests with state currstate and status currstatus to newstate and newstatu 392 ;; use currstate = #f and or currstatus = #f to apply to any state or status res 397 ;; use currstate = #f and or currstatus = #f to apply to any state or status res 393 ;; WARNING: SQL injection risk 398 ;; WARNING: SQL injection risk 394 (define (db:set-tests-state-status db run-id testnames currstate currstatus news 399 (define (db:set-tests-state-status db run-id testnames currstate currstatus news 395 (for-each (lambda (testname) 400 (for-each (lambda (testname) 396 (let ((qry (conc "UPDATE tests SET state=?,status=? WHERE " 401 (let ((qry (conc "UPDATE tests SET state=?,status=? WHERE " 397 (if currstate (conc "state='" currstate | 402 (if currstate (conc "state='" currstate "' AND " 398 (if currstatus (conc "status='" currstat | 403 (if currstatus (conc "status='" currstatus "' AND 399 " run_id=? AND testname=? AND NOT (item_ | 404 " run_id=? AND testname=? AND NOT (item_path='' A 400 ;;(debug:print 0 "QRY: " qry) 405 ;;(debug:print 0 "QRY: " qry) 401 (sqlite3:execute db qry run-id newstate newstatus testname testn 406 (sqlite3:execute db qry run-id newstate newstatus testname testn 402 testnames)) 407 testnames)) 403 408 404 (define (db:delete-tests-in-state db run-id state) 409 (define (db:delete-tests-in-state db run-id state) 405 (sqlite3:execute db "DELETE FROM tests WHERE state=? AND run_id=?;" state run- 410 (sqlite3:execute db "DELETE FROM tests WHERE state=? AND run_id=?;" state run- 406 411 ................................................................................................................................................................................ 413 (let ((res 0)) 418 (let ((res 0)) 414 (sqlite3:for-each-row 419 (sqlite3:for-each-row 415 (lambda (count) 420 (lambda (count) 416 (set! res count)) 421 (set! res count)) 417 db 422 db 418 "SELECT count(id) FROM tests WHERE state = 'RUNNING' OR state = 'LAUNCHED' 423 "SELECT count(id) FROM tests WHERE state = 'RUNNING' OR state = 'LAUNCHED' 419 res)) 424 res)) > 425 > 426 (define (db:get-count-tests-running-in-jobgroup db jobgroup) > 427 (if (not jobgroup) > 428 0 ;; > 429 (let ((res 0)) > 430 (sqlite3:for-each-row > 431 (lambda (count) > 432 (set! res count)) > 433 db > 434 "SELECT count(id) FROM tests WHERE state = 'RUNNING' OR state = 'LAUNCH > 435 AND testname in (SELECT testname FROM test_meta WHERE jobgroup=?;" > 436 jobgroup) > 437 res))) 420 438 421 ;; done with run when: 439 ;; done with run when: 422 ;; 0 tests in LAUNCHED, NOT_STARTED, REMOTEHOSTSTART, RUNNING 440 ;; 0 tests in LAUNCHED, NOT_STARTED, REMOTEHOSTSTART, RUNNING 423 (define (db:estimated-tests-remaining db run-id) 441 (define (db:estimated-tests-remaining db run-id) 424 (let ((res 0)) 442 (let ((res 0)) 425 (sqlite3:for-each-row 443 (sqlite3:for-each-row 426 (lambda (count) 444 (lambda (count) ................................................................................................................................................................................ 452 res)) 470 res)) 453 471 454 472 455 (define (db:test-set-comment db run-id testname item-path comment) 473 (define (db:test-set-comment db run-id testname item-path comment) 456 (sqlite3:execute 474 (sqlite3:execute 457 db 475 db 458 "UPDATE tests SET comment=? WHERE run_id=? AND testname=? AND item_path=?;" 476 "UPDATE tests SET comment=? WHERE run_id=? AND testname=? AND item_path=?;" 459 comment run-id testname item-path)) | 477 comment run-id testname item-path)) 460 478 461 ;; 479 ;; 462 (define (db:test-set-rundir! db run-id testname item-path rundir) 480 (define (db:test-set-rundir! db run-id testname item-path rundir) 463 (sqlite3:execute 481 (sqlite3:execute 464 db 482 db 465 "UPDATE tests SET rundir=? WHERE run_id=? AND testname=? AND item_path=?;" 483 "UPDATE tests SET rundir=? WHERE run_id=? AND testname=? AND item_path=?;" 466 rundir run-id testname item-path)) | 484 rundir run-id testname item-path)) 467 485 468 ;;====================================================================== 486 ;;====================================================================== 469 ;; Tests meta data 487 ;; Tests meta data 470 ;;====================================================================== 488 ;;====================================================================== 471 489 472 ;; read the record given a testname 490 ;; read the record given a testname 473 (define (db:testmeta-get-record db testname) 491 (define (db:testmeta-get-record db testname) ................................................................................................................................................................................ 495 (debug:print 4 "test-id " test-id ", csvdata: " csvdata) 513 (debug:print 4 "test-id " test-id ", csvdata: " csvdata) 496 (let ((csvlist (csv->list (make-csv-reader 514 (let ((csvlist (csv->list (make-csv-reader 497 (open-input-string csvdata) 515 (open-input-string csvdata) 498 '((strip-leading-whitespace? #t) 516 '((strip-leading-whitespace? #t) 499 (strip-trailing-whitespace? #t)) )))) ;; (csv->li 517 (strip-trailing-whitespace? #t)) )))) ;; (csv->li 500 (for-each 518 (for-each 501 (lambda (csvrow) 519 (lambda (csvrow) 502 (let* ((padded-row (take (append csvrow (list #f #f #f #f #f #f #f #f)) | 520 (let* ((padded-row (take (append csvrow (list #f #f #f #f #f #f #f #f #f 503 (category (list-ref padded-row 0)) 521 (category (list-ref padded-row 0)) 504 (variable (list-ref padded-row 1)) 522 (variable (list-ref padded-row 1)) 505 (value (any->number-if-possible (list-ref padded-row 2))) 523 (value (any->number-if-possible (list-ref padded-row 2))) 506 (expected (any->number-if-possible (list-ref padded-row 3))) 524 (expected (any->number-if-possible (list-ref padded-row 3))) 507 (tol (any->number-if-possible (list-ref padded-row 4))) ;; 525 (tol (any->number-if-possible (list-ref padded-row 4))) ;; 508 (units (list-ref padded-row 5)) 526 (units (list-ref padded-row 5)) 509 (comment (list-ref padded-row 6)) 527 (comment (list-ref padded-row 6)) 510 (status (let ((s (list-ref padded-row 7))) 528 (status (let ((s (list-ref padded-row 7))) 511 (if (and (string? s)(or (string-match (regexp "^\\s 529 (if (and (string? s)(or (string-match (regexp "^\\s 512 (string-match (regexp "^n/a 530 (string-match (regexp "^n/a 513 #f 531 #f 514 s)))) ;; if specified on the input then use, el | 532 s))) ;; if specified on the input then use, els > 533 (type (list-ref padded-row 8))) 515 ;; look up expected,tol,units from previous best fit test if they are a 534 ;; look up expected,tol,units from previous best fit test if they are a 516 (debug:print 4 "BEFORE: category: " category " variable: " variable " v 535 (debug:print 4 "BEFORE: category: " category " variable: " variable " v 517 ", expected: " expected " tol: " tol " units: " units " st | 536 ", expected: " expected " tol: " tol " units: " units " st 518 537 519 (if (and (or (not expected)(equal? expected "")) 538 (if (and (or (not expected)(equal? expected "")) 520 (or (not tol) (equal? expected "")) 539 (or (not tol) (equal? expected "")) 521 (or (not units) (equal? expected ""))) 540 (or (not units) (equal? expected ""))) 522 (let-values (((new-expected new-tol new-units)(db:get-prev-tol-for- 541 (let-values (((new-expected new-tol new-units)(db:get-prev-tol-for- 523 (set! expected new-expected) | 542 (set! expected new-expected) 524 (set! tol new-tol) | 543 (set! tol new-tol) 525 (set! units new-units))) | 544 (set! units new-units))) 526 545 527 (debug:print 4 "AFTER: category: " category " variable: " variable " v 546 (debug:print 4 "AFTER: category: " category " variable: " variable " v 528 ", expected: " expected " tol: " tol " units: " units " st 547 ", expected: " expected " tol: " tol " units: " units " st 529 ;; calculate status if NOT specified 548 ;; calculate status if NOT specified 530 (if (and (not status)(number? expected)(number? value)) ;; need expecte 549 (if (and (not status)(number? expected)(number? value)) ;; need expecte 531 (if (number? tol) ;; if tol is a number then we do the standard com 550 (if (number? tol) ;; if tol is a number then we do the standard com 532 (let* ((max-val (+ expected tol)) 551 (let* ((max-val (+ expected tol)) ................................................................................................................................................................................ 539 ((>) (if (> value expected) "pass" "fail")) 558 ((>) (if (> value expected) "pass" "fail")) 540 ((<) (if (< value expected) "pass" "fail")) 559 ((<) (if (< value expected) "pass" "fail")) 541 ((>=) (if (>= value expected) "pass" "fail")) 560 ((>=) (if (>= value expected) "pass" "fail")) 542 ((<=) (if (<= value expected) "pass" "fail")) 561 ((<=) (if (<= value expected) "pass" "fail")) 543 (else (conc "ERROR: bad tol comparator " tol)))))) 562 (else (conc "ERROR: bad tol comparator " tol)))))) 544 (debug:print 4 "AFTER2: category: " category " variable: " variable " v 563 (debug:print 4 "AFTER2: category: " category " variable: " variable " v 545 ", expected: " expected " tol: " tol " units: " units " st 564 ", expected: " expected " tol: " tol " units: " units " st 546 (sqlite3:execute db "INSERT OR REPLACE INTO test_data (test_id,category | 565 (sqlite3:execute db "INSERT OR REPLACE INTO test_data (test_id,category 547 test-id category variable value expected tol units (if comment com | 566 test-id category variable value expected tol units (if 548 csvlist))) 567 csvlist))) 549 568 550 ;; get a list of test_data records matching categorypatt 569 ;; get a list of test_data records matching categorypatt 551 (define (db:read-test-data db test-id categorypatt) 570 (define (db:read-test-data db test-id categorypatt) 552 (let ((res '())) 571 (let ((res '())) 553 (sqlite3:for-each-row 572 (sqlite3:for-each-row 554 (lambda (id test_id category variable value expected tol units comment stat | 573 (lambda (id test_id category variable value expected tol units comment stat 555 (set! res (cons (vector id test_id category variable value expected tol u | 574 (set! res (cons (vector id test_id category variable value expected tol u 556 db 575 db 557 "SELECT id,test_id,category,variable,value,expected,tol,units,comment,statu | 576 "SELECT id,test_id,category,variable,value,expected,tol,units,comment,statu 558 (reverse res))) 577 (reverse res))) 559 578 560 (define (db:load-test-data db run-id test-name itemdat) 579 (define (db:load-test-data db run-id test-name itemdat) 561 (let* ((item-path (item-list->path itemdat)) 580 (let* ((item-path (item-list->path itemdat)) 562 (testdat (db:get-test-info db run-id test-name item-path)) 581 (testdat (db:get-test-info db run-id test-name item-path)) 563 (test-id (if testdat (db:test-get-id testdat) #f))) 582 (test-id (if testdat (db:test-get-id testdat) #f))) 564 ;; (debug:print 1 "Enter records to insert in the test_data table, seven fie 583 ;; (debug:print 1 "Enter records to insert in the test_data table, seven fie ................................................................................................................................................................................ 586 SET fail_count=(SELECT count(id) FROM test_data WHERE test_id=? AND status 605 SET fail_count=(SELECT count(id) FROM test_data WHERE test_id=? AND status 587 pass_count=(SELECT count(id) FROM test_data WHERE test_id=? AND status 606 pass_count=(SELECT count(id) FROM test_data WHERE test_id=? AND status 588 WHERE id=?;" 607 WHERE id=?;" 589 test-id test-id test-id) 608 test-id test-id test-id) 590 ;; if the test is not FAIL then set status based on the fail and pass counts. 609 ;; if the test is not FAIL then set status based on the fail and pass counts. 591 (thread-sleep! 1) 610 (thread-sleep! 1) 592 (sqlite3:execute 611 (sqlite3:execute 593 db | 612 db ;;; NOTE: Should this be WARN,FAIL? A WARN is not a FAIL????? BUG FIXME 594 "UPDATE tests 613 "UPDATE tests 595 SET status=CASE WHEN (SELECT fail_count FROM tests WHERE id=?) > 0 614 SET status=CASE WHEN (SELECT fail_count FROM tests WHERE id=?) > 0 596 THEN 'FAIL' 615 THEN 'FAIL' 597 WHEN (SELECT pass_count FROM tests WHERE id=?) > 0 AND 616 WHEN (SELECT pass_count FROM tests WHERE id=?) > 0 AND 598 (SELECT status FROM tests WHERE id=?) NOT IN ('WARN', 617 (SELECT status FROM tests WHERE id=?) NOT IN ('WARN', 599 THEN 'PASS' 618 THEN 'PASS' 600 ELSE status 619 ELSE status 601 END WHERE id=?;" 620 END WHERE id=?;" 602 test-id test-id test-id)) | 621 test-id test-id test-id test-id)) 603 622 604 (define (db:get-prev-tol-for-test db test-id category variable) 623 (define (db:get-prev-tol-for-test db test-id category variable) 605 ;; Finish me? 624 ;; Finish me? 606 (values #f #f #f)) 625 (values #f #f #f)) 607 626 608 ;;====================================================================== 627 ;;====================================================================== 609 ;; S T E P S 628 ;; S T E P S 610 ;;====================================================================== 629 ;;====================================================================== 611 630 612 (define (db:step-get-time-as-string vec) 631 (define (db:step-get-time-as-string vec) 613 (seconds->time-string (db:step-get-event_time vec))) | 632 (seconds->time-string (db:step-get-event_time vec))) 614 633 615 ;; db-get-test-steps-for-run 634 ;; db-get-test-steps-for-run 616 (define (db:get-steps-for-test db test-id) 635 (define (db:get-steps-for-test db test-id) 617 (let ((res '())) 636 (let ((res '())) 618 (sqlite3:for-each-row 637 (sqlite3:for-each-row 619 (lambda (id test-id stepname state status event-time logfile) 638 (lambda (id test-id stepname state status event-time logfile) 620 (set! res (cons (vector id test-id stepname state status event-time (if ( 639 (set! res (cons (vector id test-id stepname state status event-time (if ( ................................................................................................................................................................................ 660 ", get-status: " (db:step-get 679 ", get-status: " (db:step-get 661 (if (and (number? startt)(number? endt)) 680 (if (and (number? startt)(number? endt)) 662 (seconds->hr-min-sec (- endt startt)) 681 (seconds->hr-min-sec (- endt startt)) 663 (if (> (string-length (db:step-get-logfile step)) 682 (if (> (string-length (db:step-get-logfile step)) 664 0) 683 0) 665 (vector-set! record 5 (db:step-get-logfile step)))) 684 (vector-set! record 5 (db:step-get-logfile step)))) 666 (else 685 (else 667 (vector-set! record 2 (db:step-get-state step)) | 686 (vector-set! record 2 (db:step-get-state step)) 668 (vector-set! record 3 (db:step-get-status step)) | 687 (vector-set! record 3 (db:step-get-status step)) 669 (vector-set! record 4 (db:step-get-event_time step)))) | 688 (vector-set! record 4 (db:step-get-event_time step)))) 670 (hash-table-set! res (db:step-get-stepname step) record) 689 (hash-table-set! res (db:step-get-stepname step) record) 671 (debug:print 6 "record(after) = " record 690 (debug:print 6 "record(after) = " record 672 "\nid: " (db:step-get-id step) 691 "\nid: " (db:step-get-id step) 673 "\nstepname: " (db:step-get-stepname step) 692 "\nstepname: " (db:step-get-stepname step) 674 "\nstate: " (db:step-get-state step) 693 "\nstate: " (db:step-get-state step) 675 "\nstatus: " (db:step-get-status step) 694 "\nstatus: " (db:step-get-status step) 676 "\ntime: " (db:step-get-event_time step)))) 695 "\ntime: " (db:step-get-event_time step)))) ................................................................................................................................................................................ 697 (if (not (and (equal? (db:test-get-state 716 (if (not (and (equal? (db:test-get-state 698 (member (db:test-get-statu 717 (member (db:test-get-statu 699 (set! result (cons waitontest-name r 718 (set! result (cons waitontest-name r 700 tests) 719 tests) 701 (if (not ever-seen)(set! result (cons waitontest-name resu 720 (if (not ever-seen)(set! result (cons waitontest-name resu 702 waiton) 721 waiton) 703 (delete-duplicates result)))) 722 (delete-duplicates result)))) > 723 > 724 ;; the new prereqs calculation, looks also at itempath if specified > 725 ;; all prereqs must be met: > 726 ;; if prereq test with itempath='' is COMPLETED and PASS, WARN, CHECK, or WAI > 727 ;; if prereq test with itempath=ref-item-path and COMPLETED with PASS, WARN, > 728 (define (db:get-prereqs-not-met db run-id waitons ref-item-path) > 729 (if (or (not waitons) > 730 (null? waitons)) > 731 '() > 732 (let* ((unmet-pre-reqs '()) > 733 (result '())) > 734 (for-each > 735 (lambda (waitontest-name) > 736 ;; by getting the tests with matching name we are looking only at the > 737 ;; and related sub items > 738 (let ((tests (db-get-tests-for-run db run-id waitontest-n > 739 (ever-seen #f) > 740 (parent-waiton-met #f) > 741 (item-waiton-met #f)) > 742 (for-each > 743 (lambda (test) > 744 ;; (if (equal? waitontest-name (db:test-get-testname test)) ;; b > 745 (let* ((state (db:test-get-state test)) > 746 (status (db:test-get-status test)) > 747 (item-path (db:test-get-item-path test)) > 748 (is-completed (equal? state "COMPLETED")) > 749 (is-ok (member status '("PASS" "WARN" "CHECK" > 750 (same-itempath (equal? ref-item-path item-path))) > 751 (set! ever-seen #t) > 752 (cond > 753 ;; case 1, non-item (parent test) is > 754 ((and (equal? item-path "") ;; this is the parent test > 755 is-completed > 756 is-ok) > 757 (set! parent-waiton-met #t)) > 758 ((and same-itempath > 759 is-completed > 760 is-ok) > 761 (set! item-waiton-met #t))))) > 762 tests) > 763 (if (not (or parent-waiton-met item-waiton-met)) > 764 (set! result (cons waitontest-name result))) > 765 ;; if the test is not found then clearly the waiton is not met... > 766 (if (not ever-seen)(set! result (cons waitontest-name result))))) > 767 waitons) > 768 (delete-duplicates result)))) 704 769 705 ;;====================================================================== 770 ;;====================================================================== 706 ;; Extract ods file from the db 771 ;; Extract ods file from the db 707 ;;====================================================================== 772 ;;====================================================================== 708 773 709 ;; runspatt is a comma delimited list of run patterns 774 ;; runspatt is a comma delimited list of run patterns 710 ;; keypatt-alist must contain *all* keys with an associated pattern: '( ("KEY1" 775 ;; keypatt-alist must contain *all* keys with an associated pattern: '( ("KEY1" ................................................................................................................................................................................ 734 "Diskfree" ; 16 799 "Diskfree" ; 16 735 "Uname" ; 17 800 "Uname" ; 17 736 "Rundir" ; 18 801 "Rundir" ; 18 737 "Host" ; 19 802 "Host" ; 19 738 "Cpu Load" ; 20 803 "Cpu Load" ; 20 739 ))) 804 ))) 740 (results (list runsheader)) 805 (results (list runsheader)) 741 (testdata-header (list "Run Id" "Testname" "Item Path" "Category" "Vari | 806 (testdata-header (list "Run Id" "Testname" "Item Path" "Category" "Vari 742 (debug:print 2 "Using " tempdir " for constructing the ods file. keyqry: " k < 743 ;; "Expected Value" < 744 ;; "Value Found" < 745 ;; "Tolerance" < 746 (apply sqlite3:for-each-row < 747 (lambda (test-id . b) < 748 (set! test-ids (cons test-id test-ids)) ;; test-id is now testname < 749 (set! results (append results ;; note, drop the test-id < 750 (list < 751 (if pathmod < 752 (let* ((vb (apply vector b)) < 753 (keyvals (let loop ((i 0) < 754 (res '())) < 755 (if (>= i numkeys) < 756 res < 757 (loop (+ i 1) < 758 (append res (lis < 759 (runname (vector-ref vb 1)) < 760 (testname (vector-ref vb (+ 2 numkeys < 761 (item-path (vector-ref vb (+ 3 numkeys < 762 (final-log (vector-ref vb (+ 7 numkeys < 763 (run-dir (vector-ref vb (+ 18 numkeys < 764 (log-fpath (conc run-dir "/" final-log < 765 (debug:print 4 "log: " log-fpath " exists: " < 766 (vector-set! vb (+ 7 numkeys) (if (file-exis < 767 (let ((new < 768 < 769 < 770 < 771 < 772 ;; for n < 773 (set! ne < 774 (if wind < 775 (if (> *ve < 776 (conc < 777 ""))) < 778 (vector->list vb)) < 779 b))))) < 780 db < 781 (conc "SELECT | 807 (mainqry (conc "SELECT 782 t.testname,r.id,runname," keysstr ",t.testname, 808 t.testname,r.id,runname," keysstr ",t.testname, 783 t.item_path,tm.description,t.state,t.status, 809 t.item_path,tm.description,t.state,t.status, 784 final_logf,run_duration, 810 final_logf,run_duration, 785 strftime('%m/%d/%Y %H:%M:%S',datetime(t.event_time,'unixepoch'),'l 811 strftime('%m/%d/%Y %H:%M:%S',datetime(t.event_time,'unixepoch'),'l 786 tm.tags,r.owner,t.comment, 812 tm.tags,r.owner,t.comment, 787 author, 813 author, 788 tm.owner,reviewed, 814 tm.owner,reviewed, 789 diskfree,uname,rundir, 815 diskfree,uname,rundir, 790 host,cpuload 816 host,cpuload 791 FROM tests AS t INNER JOIN runs AS r ON t.run_id=r.id INNER JOIN tes | 817 FROM tests AS t JOIN runs AS r ON t.run_id=r.id JOIN test_meta AS tm 792 WHERE runname LIKE ? AND " keyqry ";") | 818 WHERE runname LIKE ? AND " keyqry ";"))) > 819 (debug:print 2 "Using " tempdir " for constructing the ods file. keyqry: " k > 820 "\n mainqry: " mainqry) > 821 ;; "Expected Value" > 822 ;; "Value Found" > 823 ;; "Tolerance" > 824 (apply sqlite3:for-each-row > 825 (lambda (test-id . b) > 826 (set! test-ids (cons test-id test-ids)) ;; test-id is now testnam > 827 (set! results (append results ;; note, drop the test-id > 828 (list > 829 (if pathmod > 830 (let* ((vb (apply vector b)) > 831 (keyvals (let loop ((i 0) > 832 (res '())) > 833 (if (>= i numkeys) > 834 res > 835 (loop (+ i 1) > 836 (append re > 837 (runname (vector-ref vb 1)) > 838 (testname (vector-ref vb (+ 2 n > 839 (item-path (vector-ref vb (+ 3 n > 840 (final-log (vector-ref vb (+ 7 n > 841 (run-dir (vector-ref vb (+ 18 n > 842 (log-fpath (conc run-dir "/" fin > 843 (debug:print 4 "log: " log-fpath " exi > 844 (vector-set! vb (+ 7 numkeys) (if (fil > 845 (let > 846 > 847 > 848 > 849 > 850 ;; > 851 (s > 852 (i > 853 (if > 854 > 855 > 856 (vector->list vb)) > 857 b))))) > 858 db > 859 mainqry 793 runspatt (map cadr keypatt-alist)) | 860 runspatt (map cadr keypatt-alist)) > 861 (debug:print 2 "Found " (length test-ids) " records") 794 (set! results (list (cons "Runs" results))) 862 (set! results (list (cons "Runs" results))) 795 ;; now, for each test, collect the test_data info and add a new sheet 863 ;; now, for each test, collect the test_data info and add a new sheet 796 (for-each 864 (for-each 797 (lambda (test-id) 865 (lambda (test-id) 798 (let ((test-data (list testdata-header)) 866 (let ((test-data (list testdata-header)) 799 (curr-test-name #f)) 867 (curr-test-name #f)) 800 (sqlite3:for-each-row 868 (sqlite3:for-each-row ................................................................................................................................................................................ 814 (ods:list->ods 882 (ods:list->ods 815 tempdir 883 tempdir 816 (if (string-match (regexp "^[/~]+.*") outputfile) ;; full path? 884 (if (string-match (regexp "^[/~]+.*") outputfile) ;; full path? 817 outputfile 885 outputfile 818 (begin 886 (begin 819 (debug:print 0 "WARNING: path given, " outputfile " is relative, pref 887 (debug:print 0 "WARNING: path given, " outputfile " is relative, pref 820 (conc (current-directory) "/" outputfile))) 888 (conc (current-directory) "/" outputfile))) 821 results))) | 889 results) > 890 ;; brutal clean up > 891 (system "rm -rf tempdir"))) 822 892 823 ;; (db:extract-ods-file db "outputfile.ods" '(("sysname" "%")("fsname" "%")("dat 893 ;; (db:extract-ods-file db "outputfile.ods" '(("sysname" "%")("fsname" "%")("dat
Modified db_records.scm from [e1374dd7ef60af48] to [c935a2b5a61cb14a].
63 (define-inline (db:test-data-get-variable vec) (vector-ref vec 3)) 63 (define-inline (db:test-data-get-variable vec) (vector-ref vec 3)) 64 (define-inline (db:test-data-get-value vec) (vector-ref vec 4)) 64 (define-inline (db:test-data-get-value vec) (vector-ref vec 4)) 65 (define-inline (db:test-data-get-expected vec) (vector-ref vec 5)) 65 (define-inline (db:test-data-get-expected vec) (vector-ref vec 5)) 66 (define-inline (db:test-data-get-tol vec) (vector-ref vec 6)) 66 (define-inline (db:test-data-get-tol vec) (vector-ref vec 6)) 67 (define-inline (db:test-data-get-units vec) (vector-ref vec 7)) 67 (define-inline (db:test-data-get-units vec) (vector-ref vec 7)) 68 (define-inline (db:test-data-get-comment vec) (vector-ref vec 8)) 68 (define-inline (db:test-data-get-comment vec) (vector-ref vec 8)) 69 (define-inline (db:test-data-get-status vec) (vector-ref vec 9)) 69 (define-inline (db:test-data-get-status vec) (vector-ref vec 9)) > 70 (define-inline (db:test-data-get-type vec) (vector-ref vec 10)) 70 71 71 ;;====================================================================== 72 ;;====================================================================== 72 ;; S T E P S 73 ;; S T E P S 73 ;;====================================================================== 74 ;;====================================================================== 74 ;; Run steps 75 ;; Run steps 75 ;; make-vector-record "Run steps" db step id test_id stepname step_complete step 76 ;; make-vector-record "Run steps" db step id test_id stepname step_complete step 76 (define (make-db:step)(make-vector 7)) 77 (define (make-db:step)(make-vector 7))
Modified docs/html/dashboard-test.png from [cce50d06816718bd] to [ebb55ccc44651341].
cannot compute difference between binary files
Modified docs/html/dashboard.png from [d9430cd2eb1342b7] to [b70293a29747dd2f].
cannot compute difference between binary files
Modified docs/html/megatest.html from [6792205dc7dc5a4d] to [8244fd728ad589be].
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 4 <head> 4 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 6 <meta name="generator" content="http://www.nongnu.org/elyxer/"/> 6 <meta name="generator" content="http://www.nongnu.org/elyxer/"/> 7 <meta name="create-date" content="2011-09-24"/> | 7 <meta name="create-date" content="2011-12-15"/> 8 <link rel="stylesheet" href="http://www.nongnu.org/elyxer/lyx.css" type="text/cs | 8 <link rel="stylesheet" href="http://elyxer.nongnu.org/lyx.css" type="text/css" m 9 <title>Megatest User Manual</title> 9 <title>Megatest User Manual</title> 10 </head> 10 </head> 11 <body> 11 <body> 12 <div id="globalWrapper"> 12 <div id="globalWrapper"> 13 <div class="Standard"> 13 <div class="Standard"> 14 14 15 </div> 15 </div> ................................................................................................................................................................................ 25 <h2 class="author"> 25 <h2 class="author"> 26 Matthew Welland 26 Matthew Welland 27 </h2> 27 </h2> 28 <h2 class="Date"> 28 <h2 class="Date"> 29 Sept. 20, 29 Sept. 20, 30 </h2> 30 </h2> 31 <div class="Standard"> 31 <div class="Standard"> 32 < > 32 <span class="unknown">\thispagestyle</span>empty 33 </div> 33 </div> 34 <div class="Standard"> 34 <div class="Standard"> 35 <p><br/> 35 <p><br/> 36 </p> 36 </p> 37 2011 Matthew Welland. All rights reserved. | 37 ©2011 Matthew Welland. All rights reserved. 38 </div> 38 </div> 39 <div class="Standard"> 39 <div class="Standard"> 40 Megatest is free software released under the General Public License v2.0. Please 40 Megatest is free software released under the General Public License v2.0. Please 41 </div> 41 </div> 42 <div class="Standard"> 42 <div class="Standard"> 43 <div class="medskip"> < 44 < 45 </div> < 46 Email: matt@kiatoa.com. | 43 <div class="medskip"> </div>Email: matt@kiatoa.com. 47 </div> 44 </div> 48 <div class="Standard"> 45 <div class="Standard"> 49 Web: www.kiatoa.com/fossils/megatest 46 Web: www.kiatoa.com/fossils/megatest 50 </div> 47 </div> 51 <div class="Standard"> 48 <div class="Standard"> 52 <div class="medskip"> < 53 < 54 </div> < 55 This document is believed to be acurate at the time of writing but as with any o | 49 <div class="medskip"> </div>This document is believed to be acurate at the time 56 </div> 50 </div> 57 <div class="Standard"> 51 <div class="Standard"> 58 This document is a snapshot in time and the Megatest software has likely been ch | 52 This document is a snapshot in time and Megatest software has likely changed sin 59 </div> 53 </div> 60 <div class="Standard"> 54 <div class="Standard"> 61 <p><br/> 55 <p><br/> 62 </p> 56 </p> 63 57 64 </div> 58 </div> 65 <h1 class="Section-"> 59 <h1 class="Section-"> ................................................................................................................................................................................ 68 <div class="Standard"> 62 <div class="Standard"> 69 <i>Notable revisions of the software are occasionally documented here</i>. 63 <i>Notable revisions of the software are occasionally documented here</i>. 70 </div> 64 </div> 71 <div class="Standard"> 65 <div class="Standard"> 72 <div class="center"> 66 <div class="center"> 73 <table> 67 <table> 74 <tr> 68 <tr> 75 <td align="center" valign="top"> | 69 <td align="center" valign="top" style="width: 0.5in;"> 76 Version 70 Version 77 </td> 71 </td> 78 <td align="center" valign="top"> | 72 <td align="center" valign="top" style="width: 0.5in;"> 79 Author 73 Author 80 </td> 74 </td> 81 <td align="justify" valign="top"> | 75 <td align="justify" valign="top" style="width: 3in;"> 82 Description 76 Description 83 </td> 77 </td> 84 <td align="center" valign="top"> | 78 <td align="center" valign="top" style="width: 1in;"> 85 Date 79 Date 86 </td> 80 </td> 87 81 88 </tr> 82 </tr> 89 <tr> 83 <tr> 90 <td align="center" valign="top"> | 84 <td align="center" valign="top" style="width: 0.5in;"> 91 v1.25 85 v1.25 92 </td> 86 </td> 93 <td align="center" valign="top"> | 87 <td align="center" valign="top" style="width: 0.5in;"> 94 matt 88 matt 95 </td> 89 </td> 96 <td align="justify" valign="top"> | 90 <td align="justify" valign="top" style="width: 3in;"> 97 converted to new document template 91 converted to new document template 98 </td> 92 </td> 99 <td align="center" valign="top"> | 93 <td align="center" valign="top" style="width: 1in;"> 100 <div class="PlainVisible"> | 94 <span class="unknown">\thedate</span> 101 < 102 </div> < 103 < 104 </td> 95 </td> 105 96 106 </tr> 97 </tr> 107 98 108 </table> 99 </table> 109 100 110 </div> 101 </div> 111 102 112 </div> 103 </div> > 104 <div class="Standard"> > 105 <p><br/> > 106 </p> 113 <div class="fulltoc"> 107 <div class="fulltoc"> 114 <div class="tocheader"> 108 <div class="tocheader"> 115 Table of Contents 109 Table of Contents 116 </div> 110 </div> 117 <div class="tocindent"> 111 <div class="tocindent"> 118 <div class="toc"> 112 <div class="toc"> 119 <a class="Link" href="#toc-Section--1">Section: Megatest/document Revision Histo 113 <a class="Link" href="#toc-Section--1">Section: Megatest/document Revision Histo ................................................................................................................................................................................ 160 <a class="Link" href="#toc-Subsection-3.5">Subsection 3.5: Create your test runn 154 <a class="Link" href="#toc-Subsection-3.5">Subsection 3.5: Create your test runn 161 </div> 155 </div> 162 <div class="toc"> 156 <div class="toc"> 163 <a class="Link" href="#toc-Subsection-3.6">Subsection 3.6: Run megatest and watc 157 <a class="Link" href="#toc-Subsection-3.6">Subsection 3.6: Run megatest and watc 164 </div> 158 </div> 165 </div> 159 </div> 166 <div class="toc"> 160 <div class="toc"> 167 <a class="Link" href="#toc-Section-4">Section 4: How to Write Tests</a> | 161 <a class="Link" href="#toc-Section-4">Section 4: Choose Flow or Unstructured Run > 162 </div> > 163 <div class="toc"> > 164 <a class="Link" href="#toc-Section-5">Section 5: How to Write Tests</a> > 165 </div> > 166 <div class="tocindent"> > 167 <div class="toc"> > 168 <a class="Link" href="#toc-Subsection-5.1">Subsection 5.1: A Simple Test with on > 169 </div> > 170 <div class="toc"> > 171 <a class="Link" href="#toc-Subsection-5.2">Subsection 5.2: Create your testconfi > 172 </div> > 173 <div class="toc"> > 174 <a class="Link" href="#toc-Subsection-5.3">Subsection 5.3: Create the main.csh s > 175 </div> > 176 <div class="toc"> > 177 <a class="Link" href="#toc-Subsection-5.4">Subsection 5.4: Simple Test with Mult > 178 </div> > 179 </div> > 180 <div class="toc"> > 181 <a class="Link" href="#toc-Section-6">Section 6: Simple Test with Multiple Steps > 182 </div> > 183 <div class="tocindent"> > 184 <div class="toc"> > 185 <a class="Link" href="#toc-Subsection-6.1">Subsection 6.1: The Makefile</a> > 186 </div> > 187 <div class="toc"> > 188 <a class="Link" href="#toc-Subsection-6.2">Subsection 6.2: The main.csh file</a> > 189 </div> > 190 </div> > 191 <div class="toc"> > 192 <a class="Link" href="#toc-Section-7">Section 7: Simple Test with Iteration</a> 168 </div> 193 </div> 169 <div class="tocindent"> 194 <div class="tocindent"> 170 <div class="toc"> 195 <div class="toc"> 171 <a class="Link" href="#toc-Subsection-4.1">Subsection 4.1: A Simple Test with on | 196 <a class="Link" href="#toc-Subsection-7.1">Subsection 7.1: Update your testconfi 172 </div> 197 </div> 173 <div class="toc"> 198 <div class="toc"> 174 <a class="Link" href="#toc-Subsection-4.2">Subsection 4.2: Create your testconfi | 199 <a class="Link" href="#toc-Subsection-7.2">Subsection 7.2: Rewrite your main.csh 175 </div> 200 </div> 176 <div class="toc"> 201 <div class="toc"> 177 <a class="Link" href="#toc-Subsection-4.3">Subsection 4.3: Create the main.csh s | 202 <a class="Link" href="#toc-Subsection-7.3">Subsection 7.3: Tests with Inter-test 178 </div> 203 </div> 179 <div class="toc"> 204 <div class="toc"> > 205 <a class="Link" href="#toc-Subsection-7.4">Subsection 7.4: Rolling up Miscellane > 206 </div> > 207 <div class="toc"> 180 <a class="Link" href="#toc-Subsection-4.4">Subsection 4.4: Simple Test with Mult | 208 <a class="Link" href="#toc-Subsection-7.5">Subsection 7.5: Rolling up Runs</a> 181 </div> 209 </div> 182 </div> 210 </div> 183 <div class="toc"> 211 <div class="toc"> > 212 <a class="Link" href="#toc-Section-8">Section 8: Dashboard</a> > 213 </div> > 214 <div class="toc"> > 215 <a class="Link" href="#toc-Section-9">Section 9: Generating an OpenDocument Spre > 216 </div> > 217 <div class="toc"> 184 <a class="Link" href="#toc-Section-5">Section 5: Simple Test with Multiple Steps | 218 <a class="Link" href="#toc-Section-10">Section 10: Flows</a> > 219 </div> > 220 <div class="toc"> > 221 <a class="Link" href="#toc-Section-11">Section 11: Flow Specification and Runnin 185 </div> 222 </div> 186 <div class="tocindent"> 223 <div class="tocindent"> 187 <div class="toc"> 224 <div class="toc"> 188 <a class="Link" href="#toc-Subsection-5.1">Subsection 5.1: The Makefile</a> | 225 <a class="Link" href="#toc-Subsection-11.1">Subsection 11.1: Write your flow fil 189 </div> 226 </div> 190 <div class="toc"> 227 <div class="toc"> 191 <a class="Link" href="#toc-Subsection-5.2">Subsection 5.2: The main.csh file</a> | 228 <a class="Link" href="#toc-Subsection-11.2">Subsection 11.2: Run the flow</a> 192 </div> 229 </div> 193 </div> 230 </div> 194 <div class="toc"> 231 <div class="toc"> 195 <a class="Link" href="#toc-Section-6">Section 6: Simple Test with Iteration</a> | 232 <a class="Link" href="#toc-Section-12">Section 12: Monitor based running</a> 196 </div> 233 </div> 197 <div class="tocindent"> 234 <div class="tocindent"> 198 <div class="toc"> 235 <div class="toc"> 199 <a class="Link" href="#toc-Subsection-6.1">Subsection 6.1: Update your testconfi < 200 </div> < 201 <div class="toc"> < 202 <a class="Link" href="#toc-Subsection-6.2">Subsection 6.2: Rewrite your main.csh < 203 </div> < 204 <div class="toc"> < 205 <a class="Link" href="#toc-Subsection-6.3">Subsection 6.3: Tests with Inter-test < 206 </div> < 207 <div class="toc"> < 208 <a class="Link" href="#toc-Subsection-6.4">Subsection 6.4: Rolling up Miscellane < 209 </div> < 210 <div class="toc"> < 211 <a class="Link" href="#toc-Subsection-6.5">Subsection 6.5: Rolling up Runs</a> | 236 <a class="Link" href="#toc-Subsection-12.1">Subsection 12.1: Monitor logic</a> 212 </div> 237 </div> 213 </div> 238 </div> 214 <div class="toc"> 239 <div class="toc"> 215 <a class="Link" href="#toc-Section-7">Section 7: Dashboard</a> | 240 <a class="Link" href="#toc-Section-13">Section 13: Reference</a> 216 </div> < 217 <div class="toc"> < 218 <a class="Link" href="#toc-Section-8">Section 8: Generating an OpenDocument Spre < 219 </div> < 220 <div class="toc"> < 221 <a class="Link" href="#toc-Section-9">Section 9: Reference</a> < 222 </div> 241 </div> 223 <div class="tocindent"> 242 <div class="tocindent"> 224 <div class="toc"> 243 <div class="toc"> 225 <a class="Link" href="#toc-Subsection-9.1">Subsection 9.1: Configuration file Sy | 244 <a class="Link" href="#toc-Subsection-13.1">Subsection 13.1: Configuration file 226 </div> 245 </div> 227 <div class="tocindent"> 246 <div class="tocindent"> 228 <div class="toc"> 247 <div class="toc"> 229 <a class="Link" href="#toc-Subsubsection-9.1.1">Subsubsection 9.1.1: Sections</a | 248 <a class="Link" href="#toc-Subsubsection-13.1.1">Subsubsection 13.1.1: Sections< > 249 </div> > 250 <div class="toc"> > 251 <a class="Link" href="#toc-Subsubsection-13.1.2">Subsubsection 13.1.2: Variables > 252 </div> > 253 <div class="toc"> > 254 <a class="Link" href="#toc-Subsubsection-13.1.3">Subsubsection 13.1.3: Includes< > 255 </div> > 256 <div class="toc"> > 257 <a class="Link" href="#toc-Subsubsection-13.1.4">Subsubsection 13.1.4: Setting a 230 </div> 258 </div> 231 <div class="toc"> 259 <div class="toc"> 232 <a class="Link" href="#toc-Subsubsection-9.1.2">Subsubsection 9.1.2: Variables</ | 260 <a class="Link" href="#toc-Subsubsection-13.1.5">Subsubsection 13.1.5: Notes</a> > 261 </div> 233 </div> 262 </div> 234 <div class="toc"> 263 <div class="toc"> 235 <a class="Link" href="#toc-Subsubsection-9.1.3">Subsubsection 9.1.3: Includes</a | 264 <a class="Link" href="#toc-Subsection-13.2">Subsection 13.2: Environment variabl 236 </div> 265 </div> 237 <div class="toc"> 266 <div class="toc"> 238 <a class="Link" href="#toc-Subsubsection-9.1.4">Subsubsection 9.1.4: Setting a v < 239 </div> < 240 <div class="toc"> < 241 <a class="Link" href="#toc-Subsubsection-9.1.5">Subsubsection 9.1.5: Notes</a> < 242 </div> < 243 </div> < 244 <div class="toc"> < 245 <a class="Link" href="#toc-Subsection-9.2">Subsection 9.2: Environment variables | 267 <a class="Link" href="#toc-Subsection-13.3">Subsection 13.3: megatest.config</a> 246 </div> 268 </div> 247 <div class="toc"> 269 <div class="toc"> 248 <a class="Link" href="#toc-Subsection-9.3">Subsection 9.3: megatest.config</a> | 270 <a class="Link" href="#toc-Subsection-13.4">Subsection 13.4: runconfigs.config f 249 </div> 271 </div> 250 <div class="toc"> 272 <div class="toc"> 251 <a class="Link" href="#toc-Subsection-9.4">Subsection 9.4: runconfigs.config fil < 252 </div> < 253 <div class="toc"> < 254 <a class="Link" href="#toc-Subsection-9.5">Subsection 9.5: Writing tests</a> | 273 <a class="Link" href="#toc-Subsection-13.5">Subsection 13.5: Writing tests</a> 255 </div> 274 </div> 256 <div class="tocindent"> 275 <div class="tocindent"> 257 <div class="toc"> 276 <div class="toc"> > 277 <a class="Link" href="#toc-Subsubsection-13.5.1">Subsubsection 13.5.1: testconfi > 278 </div> > 279 <div class="toc"> 258 <a class="Link" href="#toc-Subsubsection-9.5.1">Subsubsection 9.5.1: testconfig | 280 <a class="Link" href="#toc-Subsubsection-13.5.2">Subsubsection 13.5.2: Command l > 281 </div> > 282 </div> 259 </div> 283 </div> 260 <div class="toc"> 284 <div class="toc"> 261 <a class="Link" href="#toc-Subsubsection-9.5.2">Subsubsection 9.5.2: Command lin | 285 <a class="Link" href="#toc-Appendix-A">Appendix A: Data</a> 262 </div> < 263 </div> < 264 </div> 286 </div> 265 <div class="toc"> 287 <div class="toc"> 266 <a class="Link" href="#toc-Section-A">Section A: Data</a> | 288 <a class="Link" href="#toc-Appendix-B">Appendix B: References</a> 267 </div> 289 </div> 268 <div class="toc"> < 269 <a class="Link" href="#toc-Section-B">Section B: References</a> < 270 </div> 290 </div> > 291 271 </div> 292 </div> 272 293 273 </div> 294 </div> 274 <div class="Standard"> 295 <div class="Standard"> 275 <p><br/> 296 <p><br/> 276 </p> 297 </p> 277 298 ................................................................................................................................................................................ 279 <h1 class="Section"> 300 <h1 class="Section"> 280 <a class="toc" name="toc-Section-1">1</a> Introduction 301 <a class="toc" name="toc-Section-1">1</a> Introduction 281 </h1> 302 </h1> 282 <h2 class="Subsection"> 303 <h2 class="Subsection"> 283 <a class="toc" name="toc-Subsection-1.1">1.1</a> Megatest design philosophy 304 <a class="toc" name="toc-Subsection-1.1">1.1</a> Megatest design philosophy 284 </h2> 305 </h2> 285 <div class="Standard"> 306 <div class="Standard"> 286 Megatest is intended to provide the minimum needed resources to make writing a s | 307 Megatest is intended to provide the minimum needed resources to make writing a s 287 </div> 308 </div> 288 <h2 class="Subsection"> 309 <h2 class="Subsection"> 289 <a class="toc" name="toc-Subsection-1.2">1.2</a> Megatest architecture 310 <a class="toc" name="toc-Subsection-1.2">1.2</a> Megatest architecture 290 </h2> 311 </h2> 291 <div class="Standard"> 312 <div class="Standard"> 292 All data to specify the tests and configure the system is stored in plain text f | 313 All data to specify the tests and configure the system is stored in plain text f 293 </div> 314 </div> 294 <h1 class="Section"> 315 <h1 class="Section"> 295 <a class="toc" name="toc-Section-2">2</a> Installation 316 <a class="toc" name="toc-Section-2">2</a> Installation 296 </h1> 317 </h1> 297 <h2 class="Subsection"> 318 <h2 class="Subsection"> 298 <a class="toc" name="toc-Subsection-2.1">2.1</a> Dependencies 319 <a class="toc" name="toc-Subsection-2.1">2.1</a> Dependencies 299 </h2> 320 </h2> 300 <div class="Standard"> 321 <div class="Standard"> 301 Chicken scheme and a number of “eggs” are required for building megatest. See th | 322 Chicken scheme and a number of “eggs” are required for building mega 302 </div> 323 </div> 303 <h2 class="Subsection"> 324 <h2 class="Subsection"> 304 <a class="toc" name="toc-Subsection-2.2">2.2</a> Build and Install 325 <a class="toc" name="toc-Subsection-2.2">2.2</a> Build and Install 305 </h2> 326 </h2> 306 <div class="Standard"> 327 <div class="Standard"> 307 Run “make test” to create the megatest executable. You may wish to copy the exec 328 Run “make test” to create the megatest executable. You may wish to copy the exec 308 </div> 329 </div> ................................................................................................................................................................................ 406 427 407 dashboard & 428 dashboard & 408 </pre> 429 </pre> 409 </div> 430 </div> 410 431 411 </div> 432 </div> 412 <h1 class="Section"> 433 <h1 class="Section"> 413 <a class="toc" name="toc-Section-4">4</a> How to Write Tests | 434 <a class="toc" name="toc-Section-4">4</a> Choose Flow or Unstructured Run? > 435 </h1> > 436 <div class="Standard"> > 437 A flow is a structured and specifically sequenced set of tests. See the Flows ch > 438 </div> > 439 <h1 class="Section"> > 440 <a class="toc" name="toc-Section-5">5</a> How to Write Tests 414 </h1> 441 </h1> 415 <h2 class="Subsection"> 442 <h2 class="Subsection"> 416 <a class="toc" name="toc-Subsection-4.1">4.1</a> A Simple Test with one Step | 443 <a class="toc" name="toc-Subsection-5.1">5.1</a> A Simple Test with one Step 417 </h2> 444 </h2> 418 <div class="Standard"> 445 <div class="Standard"> 419 <div class="listing"> 446 <div class="listing"> 420 <pre class="listing">mkdir simpletest 447 <pre class="listing">mkdir simpletest 421 cd simpletest 448 cd simpletest 422 </pre> 449 </pre> 423 </div> 450 </div> 424 451 425 </div> 452 </div> 426 <h2 class="Subsection"> 453 <h2 class="Subsection"> 427 <a class="toc" name="toc-Subsection-4.2">4.2</a> Create your testconfig file | 454 <a class="toc" name="toc-Subsection-5.2">5.2</a> Create your testconfig file 428 </h2> 455 </h2> 429 <div class="Standard"> 456 <div class="Standard"> 430 <div class="listing"> 457 <div class="listing"> 431 <pre class="listing"># testconfig 458 <pre class="listing"># testconfig 432 459 433 [setup] 460 [setup] 434 runscript main.csh 461 runscript main.csh 435 </pre> 462 </pre> 436 </div> 463 </div> 437 464 438 </div> 465 </div> 439 <h2 class="Subsection"> 466 <h2 class="Subsection"> 440 <a class="toc" name="toc-Subsection-4.3">4.3</a> Create the main.csh script | 467 <a class="toc" name="toc-Subsection-5.3">5.3</a> Create the main.csh script 441 </h2> 468 </h2> 442 <div class="Standard"> 469 <div class="Standard"> 443 Note: Using csh is NOT recommended. Use bash, perl, ruby, zsh or anything other 470 Note: Using csh is NOT recommended. Use bash, perl, ruby, zsh or anything other 444 </div> 471 </div> 445 <div class="Standard"> 472 <div class="Standard"> 446 <div class="left"> 473 <div class="left"> 447 <div class="listing"> 474 <div class="listing"> ................................................................................................................................................................................ 460 </div> 487 </div> 461 488 462 </div> 489 </div> 463 <div class="Standard"> 490 <div class="Standard"> 464 You can now run megatest and the created test directory will contain the new fil 491 You can now run megatest and the created test directory will contain the new fil 465 </div> 492 </div> 466 <h2 class="Subsection"> 493 <h2 class="Subsection"> 467 <a class="toc" name="toc-Subsection-4.4">4.4</a> Simple Test with Multiple Steps | 494 <a class="toc" name="toc-Subsection-5.4">5.4</a> Simple Test with Multiple Steps 468 </h2> 495 </h2> 469 <div class="Standard"> 496 <div class="Standard"> 470 To run multiple steps simply add them to the main.csh file. Here we add a step t 497 To run multiple steps simply add them to the main.csh file. Here we add a step t 471 </div> 498 </div> 472 <div class="Standard"> 499 <div class="Standard"> 473 <div class="listing"> 500 <div class="listing"> 474 <pre class="listing">#!/bin/tcsh -x 501 <pre class="listing">#!/bin/tcsh -x ................................................................................................................................................................................ 482 $MT_MEGATEST -runstep run_simulation_cpu2 -logpro runsim.logpro "runsim cpu2" 509 $MT_MEGATEST -runstep run_simulation_cpu2 -logpro runsim.logpro "runsim cpu2" 483 $MT_MEGATEST -test-status :state COMPLETED :status $? 510 $MT_MEGATEST -test-status :state COMPLETED :status $? 484 </pre> 511 </pre> 485 </div> 512 </div> 486 513 487 </div> 514 </div> 488 <h1 class="Section"> 515 <h1 class="Section"> 489 <a class="toc" name="toc-Section-5">5</a> Simple Test with Multiple Steps, Some | 516 <a class="toc" name="toc-Section-6">6</a> Simple Test with Multiple Steps, Some 490 </h1> 517 </h1> 491 <h2 class="Subsection"> 518 <h2 class="Subsection"> 492 <a class="toc" name="toc-Subsection-5.1">5.1</a> The Makefile | 519 <a class="toc" name="toc-Subsection-6.1">6.1</a> The Makefile 493 </h2> 520 </h2> 494 <div class="Standard"> 521 <div class="Standard"> 495 A good way to run steps in parallel within a single test, especially when there 522 A good way to run steps in parallel within a single test, especially when there 496 </div> 523 </div> 497 <div class="Standard"> 524 <div class="Standard"> 498 <div class="listing"> 525 <div class="listing"> 499 <pre class="listing"># Example Makefile to run two steps in parallel 526 <pre class="listing"># Example Makefile to run two steps in parallel ................................................................................................................................................................................ 504 run_simulation_$(CPUS).html : $(RTLDIR)/$(CPUS) 531 run_simulation_$(CPUS).html : $(RTLDIR)/$(CPUS) 505 $(MT_MEGATEST) -runstep run_simulation_$(CPUS) -logpro runsim.logpro "ru 532 $(MT_MEGATEST) -runstep run_simulation_$(CPUS) -logpro runsim.logpro "ru 506 </pre> 533 </pre> 507 </div> 534 </div> 508 535 509 </div> 536 </div> 510 <h2 class="Subsection"> 537 <h2 class="Subsection"> 511 <a class="toc" name="toc-Subsection-5.2">5.2</a> The main.csh file | 538 <a class="toc" name="toc-Subsection-6.2">6.2</a> The main.csh file 512 </h2> 539 </h2> 513 <div class="Standard"> 540 <div class="Standard"> 514 <div class="listing"> 541 <div class="listing"> 515 <pre class="listing">#!/bin/tcsh -x 542 <pre class="listing">#!/bin/tcsh -x 516 543 517 # run the cpu1 and cpu2 simulations in parallel. 544 # run the cpu1 and cpu2 simulations in parallel. 518 # The -j parameter tells make how many jobs it may run in parallel 545 # The -j parameter tells make how many jobs it may run in parallel ................................................................................................................................................................................ 523 550 524 $MT_MEGATEST -test-status :state COMPLETED :status $? 551 $MT_MEGATEST -test-status :state COMPLETED :status $? 525 </pre> 552 </pre> 526 </div> 553 </div> 527 554 528 </div> 555 </div> 529 <h1 class="Section"> 556 <h1 class="Section"> 530 <a class="toc" name="toc-Section-6">6</a> Simple Test with Iteration | 557 <a class="toc" name="toc-Section-7">7</a> Simple Test with Iteration 531 </h1> 558 </h1> 532 <div class="Standard"> 559 <div class="Standard"> 533 Since no jobs run after the cpu1 and cpu2 simulations in this test it is possibl 560 Since no jobs run after the cpu1 and cpu2 simulations in this test it is possibl 534 </div> 561 </div> 535 <h2 class="Subsection"> 562 <h2 class="Subsection"> 536 <a class="toc" name="toc-Subsection-6.1">6.1</a> Update your testconfig file for | 563 <a class="toc" name="toc-Subsection-7.1">7.1</a> Update your testconfig file for 537 </h2> 564 </h2> 538 <div class="Standard"> 565 <div class="Standard"> 539 <div class="listing"> 566 <div class="listing"> 540 <pre class="listing">[setup] 567 <pre class="listing">[setup] 541 runscript main.csh 568 runscript main.csh 542 <div class="left"> 569 <div class="left"> 543 570 ................................................................................................................................................................................ 546 [items] 573 [items] 547 CPU cpu1 cpu2 574 CPU cpu1 cpu2 548 </pre> 575 </pre> 549 </div> 576 </div> 550 577 551 </div> 578 </div> 552 <h2 class="Subsection"> 579 <h2 class="Subsection"> 553 <a class="toc" name="toc-Subsection-6.2">6.2</a> Rewrite your main.csh for itera | 580 <a class="toc" name="toc-Subsection-7.2">7.2</a> Rewrite your main.csh for itera 554 </h2> 581 </h2> 555 <div class="Standard"> 582 <div class="Standard"> 556 <div class="listing"> 583 <div class="listing"> 557 <pre class="listing">#!/bin/tcsh -x 584 <pre class="listing">#!/bin/tcsh -x 558 585 559 # run the cpu simulation but now use the environment variable $CPU 586 # run the cpu simulation but now use the environment variable $CPU 560 # to select what cpu to run the simulation against 587 # to select what cpu to run the simulation against ................................................................................................................................................................................ 565 # a string passed in. 592 # a string passed in. 566 $MT_MEGATEST -test-status :state COMPLETED :status $? 593 $MT_MEGATEST -test-status :state COMPLETED :status $? 567 </pre> 594 </pre> 568 </div> 595 </div> 569 596 570 </div> 597 </div> 571 <h2 class="Subsection"> 598 <h2 class="Subsection"> 572 <a class="toc" name="toc-Subsection-6.3">6.3</a> Tests with Inter-test dependenc | 599 <a class="toc" name="toc-Subsection-7.3">7.3</a> Tests with Inter-test dependenc 573 </h2> 600 </h2> 574 <div class="Standard"> 601 <div class="Standard"> 575 Sometimes a test depends on the output from a previous test or it may not make s 602 Sometimes a test depends on the output from a previous test or it may not make s 576 </div> 603 </div> 577 <div class="Standard"> 604 <div class="Standard"> 578 <div class="listing"> 605 <div class="listing"> 579 <pre class="listing"># testconfig for the "system" test 606 <pre class="listing"># testconfig for the "system" test ................................................................................................................................................................................ 581 runscript main.csh 608 runscript main.csh 582 waiton cpu mem 609 waiton cpu mem 583 </pre> 610 </pre> 584 </div> 611 </div> 585 612 586 </div> 613 </div> 587 <h2 class="Subsection"> 614 <h2 class="Subsection"> 588 <a class="toc" name="toc-Subsection-6.4">6.4</a> Rolling up Miscellaneous Data | 615 <a class="toc" name="toc-Subsection-7.4">7.4</a> Rolling up Miscellaneous Data 589 </h2> 616 </h2> 590 <div class="Standard"> 617 <div class="Standard"> 591 Use the -load-test-data switch to roll up arbitrary data from a test into the te 618 Use the -load-test-data switch to roll up arbitrary data from a test into the te 592 </div> 619 </div> 593 <div class="Standard"> 620 <div class="Standard"> 594 <div class="listing"> 621 <div class="listing"> 595 <pre class="listing"># Fields are: 622 <pre class="listing"># Fields are: ................................................................................................................................................................................ 624 </li> 651 </li> 625 <li> 652 <li> 626 If status is specified its value overrides the above calculations. 653 If status is specified its value overrides the above calculations. 627 </li> 654 </li> 628 655 629 </ul> 656 </ul> 630 <h2 class="Subsection"> 657 <h2 class="Subsection"> 631 <a class="toc" name="toc-Subsection-6.5">6.5</a> Rolling up Runs | 658 <a class="toc" name="toc-Subsection-7.5">7.5</a> Rolling up Runs 632 </h2> 659 </h2> 633 <div class="Standard"> 660 <div class="Standard"> 634 To roll up a number of tests in a sequence of runs to a single run use the -roll 661 To roll up a number of tests in a sequence of runs to a single run use the -roll 635 </div> 662 </div> 636 <div class="Standard"> 663 <div class="Standard"> 637 <div class="listing"> 664 <div class="listing"> 638 <pre class="listing">megatest -rollup :sysname ubuntu :fsname nfs :datapath none 665 <pre class="listing">megatest -rollup :sysname ubuntu :fsname nfs :datapath none ................................................................................................................................................................................ 640 </div> 667 </div> 641 668 642 </div> 669 </div> 643 <div class="Standard"> 670 <div class="Standard"> 644 All keys must be specified and the runname is the name of the run that will be c 671 All keys must be specified and the runname is the name of the run that will be c 645 </div> 672 </div> 646 <h1 class="Section"> 673 <h1 class="Section"> 647 <a class="toc" name="toc-Section-7">7</a> Dashboard | 674 <a class="toc" name="toc-Section-8">8</a> Dashboard 648 </h1> 675 </h1> 649 <div class="Standard"> 676 <div class="Standard"> 650 <div class="listing"> 677 <div class="listing"> 651 <pre class="listing">> dashboard & 678 <pre class="listing">> dashboard & 652 </pre> 679 </pre> 653 </div> 680 </div> 654 681 655 </div> 682 </div> 656 <div class="Standard"> 683 <div class="Standard"> 657 <img class="embedded" src="dashboard.png" alt="figure dashboard.png" style="widt | 684 <img class="embedded" src="dashboard.png" alt="figure dashboard.png" style="widt 658 685 659 </div> 686 </div> 660 <div class="Standard"> 687 <div class="Standard"> 661 Pushing one of the buttons on the main dashboard will bring up the test specific 688 Pushing one of the buttons on the main dashboard will bring up the test specific 662 </div> 689 </div> 663 <div class="Standard"> 690 <div class="Standard"> 664 <img class="embedded" src="dashboard-test.png" alt="figure dashboard-test.png" s | 691 <img class="embedded" src="dashboard-test.png" alt="figure dashboard-test.png" s 665 692 666 </div> 693 </div> 667 <h1 class="Section"> 694 <h1 class="Section"> 668 <a class="toc" name="toc-Section-8">8</a> Generating an OpenDocument Spreadsheet | 695 <a class="toc" name="toc-Section-9">9</a> Generating an OpenDocument Spreadsheet 669 </h1> 696 </h1> 670 <div class="Standard"> 697 <div class="Standard"> 671 And OpenDocument multi-paned spreadsheet can be generated from the megatest.db f 698 And OpenDocument multi-paned spreadsheet can be generated from the megatest.db f 672 </div> 699 </div> 673 <div class="Standard"> 700 <div class="Standard"> 674 <div class="listing"> 701 <div class="listing"> 675 <pre class="listing">megatest -extract-ods results.ods :runname % 702 <pre class="listing">megatest -extract-ods results.ods :runname % ................................................................................................................................................................................ 677 </div> 704 </div> 678 705 679 </div> 706 </div> 680 <div class="Standard"> 707 <div class="Standard"> 681 You can optionally specify the keys for your database to limit further the runs 708 You can optionally specify the keys for your database to limit further the runs 682 </div> 709 </div> 683 <h1 class="Section"> 710 <h1 class="Section"> 684 <a class="toc" name="toc-Section-9">9</a> Reference | 711 <a class="toc" name="toc-Section-10">10</a> Flows > 712 </h1> > 713 <div class="Standard"> > 714 A flow specifies the tests to run, the order and dependencies and is managed by > 715 </div> > 716 <h1 class="Section"> > 717 <a class="toc" name="toc-Section-11">11</a> Flow Specification and Running (Not > 718 </h1> > 719 <h2 class="Subsection"> > 720 <a class="toc" name="toc-Subsection-11.1">11.1</a> Write your flow file > 721 </h2> > 722 <div class="Standard"> > 723 flows/<flowname>.config > 724 </div> > 725 <div class="Standard"> > 726 <div class="listing"> > 727 <pre class="listing"># Flow: <flowname> > 728 [flowconfig] > 729 # turn on item level dependencies > 730 itemdeps on > 731 > 732 [flowsteps] > 733 # <testname>[,<predecessor>] > 734 > 735 # Run the test "copydata" > 736 copydata > 737 > 738 # Run the test "setup" after copydata completes with PASS, WARN or WAIVE > 739 setup,copydata > 740 > 741 # once the test "setup" completes successfully run sim1, sim2 and sim3 > 742 sim1,setup > 743 sim2,setup > 744 sim3,setup > 745 </pre> > 746 </div> > 747 > 748 </div> > 749 <h2 class="Subsection"> > 750 <a class="toc" name="toc-Subsection-11.2">11.2</a> Run the flow > 751 </h2> > 752 <div class="Standard"> > 753 <div class="listing"> > 754 <pre class="listing">megatest -runflow <flowname> :FIELD1 val1 :FIELD2 val > 755 </pre> > 756 </div> > 757 > 758 </div> > 759 <h1 class="Section"> > 760 <a class="toc" name="toc-Section-12">12</a> Monitor based running > 761 </h1> > 762 <h2 class="Subsection"> > 763 <a class="toc" name="toc-Subsection-12.1">12.1</a> Monitor logic > 764 </h2> > 765 <div class="Standard"> > 766 Note: The monitor is usable but incomplete as of Megatest v1.31. Click on the &l > 767 </div> > 768 <div class="Standard"> > 769 <img class="embedded" src="monitor-state-diagram.png" alt="figure monitor-state- > 770 > 771 </div> > 772 <h1 class="Section"> > 773 <a class="toc" name="toc-Section-13">13</a> Reference 685 </h1> 774 </h1> 686 <h2 class="Subsection"> 775 <h2 class="Subsection"> 687 <a class="toc" name="toc-Subsection-9.1">9.1</a> Configuration file Syntax | 776 <a class="toc" name="toc-Subsection-13.1">13.1</a> Configuration file Syntax 688 </h2> 777 </h2> > 778 <div class="Standard"> > 779 Note: whitespace is preserved including at the end of line. Ensure your entries > 780 </div> 689 <h3 class="Subsubsection"> 781 <h3 class="Subsubsection"> 690 <a class="toc" name="toc-Subsubsection-9.1.1">9.1.1</a> Sections | 782 <a class="toc" name="toc-Subsubsection-13.1.1">13.1.1</a> Sections 691 </h3> 783 </h3> 692 <div class="Standard"> 784 <div class="Standard"> 693 <div class="listing"> 785 <div class="listing"> 694 <pre class="listing">[section name] 786 <pre class="listing">[section name] 695 </pre> 787 </pre> 696 </div> 788 </div> 697 789 698 </div> 790 </div> 699 <div class="Standard"> 791 <div class="Standard"> 700 This creates a section named “section name” 792 This creates a section named “section name” 701 </div> 793 </div> 702 <h3 class="Subsubsection"> 794 <h3 class="Subsubsection"> 703 <a class="toc" name="toc-Subsubsection-9.1.2">9.1.2</a> Variables | 795 <a class="toc" name="toc-Subsubsection-13.1.2">13.1.2</a> Variables 704 </h3> 796 </h3> 705 <div class="Standard"> 797 <div class="Standard"> 706 <div class="listing"> 798 <div class="listing"> 707 <pre class="listing">VARX has this value 799 <pre class="listing">VARX has this value 708 </pre> 800 </pre> 709 </div> 801 </div> 710 802 711 </div> 803 </div> 712 <div class="Standard"> 804 <div class="Standard"> 713 The variable “VARX” will have the value “has this value” 805 The variable “VARX” will have the value “has this value” 714 </div> 806 </div> 715 <h3 class="Subsubsection"> 807 <h3 class="Subsubsection"> 716 <a class="toc" name="toc-Subsubsection-9.1.3">9.1.3</a> Includes | 808 <a class="toc" name="toc-Subsubsection-13.1.3">13.1.3</a> Includes 717 </h3> 809 </h3> 718 <div class="Standard"> 810 <div class="Standard"> 719 <div class="listing"> 811 <div class="listing"> 720 <pre class="listing">[include filename] 812 <pre class="listing">[include filename] 721 </pre> 813 </pre> 722 </div> 814 </div> 723 815 724 </div> 816 </div> 725 <div class="Standard"> 817 <div class="Standard"> 726 The file named “filename” will be included as if part of the calling file. NOTE: 818 The file named “filename” will be included as if part of the calling file. NOTE: 727 </div> 819 </div> 728 <h3 class="Subsubsection"> 820 <h3 class="Subsubsection"> 729 <a class="toc" name="toc-Subsubsection-9.1.4">9.1.4</a> Setting a variable by ru | 821 <a class="toc" name="toc-Subsubsection-13.1.4">13.1.4</a> Setting a variable by 730 </h3> 822 </h3> 731 <div class="Standard"> 823 <div class="Standard"> 732 <div class="listing"> 824 <div class="listing"> 733 <pre class="listing">VARNAME [system ls /tmp] 825 <pre class="listing">VARNAME [system ls /tmp] 734 </pre> 826 </pre> 735 </div> 827 </div> 736 828 737 </div> 829 </div> 738 <div class="Standard"> 830 <div class="Standard"> 739 The variable “VARNAME” will get a value created by the Unix command “ls /tmp”. A 831 The variable “VARNAME” will get a value created by the Unix command “ls /tmp”. A 740 </div> 832 </div> 741 <h3 class="Subsubsection"> 833 <h3 class="Subsubsection"> 742 <a class="toc" name="toc-Subsubsection-9.1.5">9.1.5</a> Notes | 834 <a class="toc" name="toc-Subsubsection-13.1.5">13.1.5</a> Notes 743 </h3> 835 </h3> 744 <ul> 836 <ul> 745 <li> 837 <li> 746 Some variables are infered as lists. Each token on the line separated by whitesp 838 Some variables are infered as lists. Each token on the line separated by whitesp 747 </li> 839 </li> 748 <li> 840 <li> 749 Comments (lines starting with #) and blank lines are ignored. 841 Comments (lines starting with #) and blank lines are ignored. 750 </li> 842 </li> 751 843 752 </ul> 844 </ul> 753 <h2 class="Subsection"> 845 <h2 class="Subsection"> 754 <a class="toc" name="toc-Subsection-9.2">9.2</a> Environment variables | 846 <a class="toc" name="toc-Subsection-13.2">13.2</a> Environment variables 755 </h2> 847 </h2> 756 <div class="Standard"> 848 <div class="Standard"> 757 <table> 849 <table> 758 <tr> 850 <tr> 759 <td align="left" valign="top"> | 851 <td align="left" valign="top" style="width: 10%;"> 760 Variable 852 Variable 761 </td> 853 </td> 762 <td align="left" valign="top"> | 854 <td align="left" valign="top" style="width: 50%;"> 763 Purpose 855 Purpose 764 </td> 856 </td> 765 857 766 </tr> 858 </tr> 767 <tr> 859 <tr> 768 <td align="left" valign="top"> | 860 <td align="left" valign="top" style="width: 10%;"> 769 MT_CMDINFO 861 MT_CMDINFO 770 </td> 862 </td> 771 <td align="left" valign="top"> | 863 <td align="left" valign="top" style="width: 50%;"> 772 Conveys test variables to the megatest test runner. 864 Conveys test variables to the megatest test runner. 773 </td> 865 </td> 774 866 775 </tr> 867 </tr> 776 <tr> 868 <tr> 777 <td align="left" valign="top"> | 869 <td align="left" valign="top" style="width: 10%;"> 778 MT_TEST_RUN_DIR 870 MT_TEST_RUN_DIR 779 </td> 871 </td> 780 <td align="left" valign="top"> | 872 <td align="left" valign="top" style="width: 50%;"> 781 Directory assigned by megatest for the test to run. 873 Directory assigned by megatest for the test to run. 782 </td> 874 </td> 783 875 784 </tr> 876 </tr> 785 <tr> 877 <tr> 786 <td align="left" valign="top"> | 878 <td align="left" valign="top" style="width: 10%;"> 787 MT_TEST_NAME 879 MT_TEST_NAME 788 </td> 880 </td> 789 <td align="left" valign="top"> | 881 <td align="left" valign="top" style="width: 50%;"> 790 Name of the test, corrosponds to the directory name under tests. 882 Name of the test, corrosponds to the directory name under tests. 791 </td> 883 </td> 792 884 793 </tr> 885 </tr> 794 <tr> 886 <tr> 795 <td align="left" valign="top"> | 887 <td align="left" valign="top" style="width: 10%;"> 796 MT_ITEM_INFO 888 MT_ITEM_INFO 797 </td> 889 </td> 798 <td align="left" valign="top"> | 890 <td align="left" valign="top" style="width: 50%;"> 799 Iterated tests will set this to a sequence of key/values ((KEY val) ...) 891 Iterated tests will set this to a sequence of key/values ((KEY val) ...) 800 </td> 892 </td> 801 893 802 </tr> 894 </tr> 803 <tr> 895 <tr> 804 <td align="left" valign="top"> | 896 <td align="left" valign="top" style="width: 10%;"> 805 MT_RUN_AREA_HOME 897 MT_RUN_AREA_HOME 806 </td> 898 </td> 807 <td align="left" valign="top"> | 899 <td align="left" valign="top" style="width: 50%;"> 808 Directory where megatest was launched from and where the tests code can be found 900 Directory where megatest was launched from and where the tests code can be found 809 </td> 901 </td> 810 902 811 </tr> 903 </tr> 812 <tr> 904 <tr> 813 <td align="left" valign="top"> | 905 <td align="left" valign="top" style="width: 10%;"> 814 MT_RUNNAME 906 MT_RUNNAME 815 </td> 907 </td> 816 <td align="left" valign="top"> | 908 <td align="left" valign="top" style="width: 50%;"> 817 Name of this run as set by the :runname parameter 909 Name of this run as set by the :runname parameter 818 </td> 910 </td> 819 911 820 </tr> 912 </tr> 821 <tr> 913 <tr> 822 <td align="left" valign="top"> | 914 <td align="left" valign="top" style="width: 10%;"> 823 MT_MEGATEST 915 MT_MEGATEST 824 </td> 916 </td> 825 <td align="left" valign="top"> | 917 <td align="left" valign="top" style="width: 50%;"> 826 Path/Filename to megatest executable. Found either from called path or but using 918 Path/Filename to megatest executable. Found either from called path or but using 827 </td> 919 </td> 828 920 829 </tr> 921 </tr> 830 <tr> 922 <tr> 831 <td align="left" valign="top"> | 923 <td align="left" valign="top" style="width: 10%;"> 832 <field1> .... 924 <field1> .... 833 </td> 925 </td> 834 <td align="left" valign="top"> | 926 <td align="left" valign="top" style="width: 50%;"> 835 The field values as set on the megatest -runall command line (e.g. :field1 abc) 927 The field values as set on the megatest -runall command line (e.g. :field1 abc) 836 </td> 928 </td> 837 929 838 </tr> 930 </tr> 839 931 840 </table> 932 </table> 841 933 842 </div> 934 </div> 843 <h2 class="Subsection"> 935 <h2 class="Subsection"> 844 <a class="toc" name="toc-Subsection-9.3">9.3</a> megatest.config | 936 <a class="toc" name="toc-Subsection-13.3">13.3</a> megatest.config 845 </h2> 937 </h2> 846 <div class="Standard"> 938 <div class="Standard"> 847 <table> 939 <table> 848 <tr> 940 <tr> 849 <td align="left" valign="top"> | 941 <td align="left" valign="top" style="width: 10%;"> 850 section 942 section 851 </td> 943 </td> 852 <td align="left" valign="top"> | 944 <td align="left" valign="top" style="width: 15%;"> 853 variable 945 variable 854 </td> 946 </td> 855 <td align="left" valign="top"> | 947 <td align="left" valign="top" style="width: 20%;"> 856 value 948 value 857 </td> 949 </td> 858 <td align="left" valign="top"> | 950 <td align="left" valign="top" style="width: 6%;"> 859 required 951 required 860 </td> 952 </td> 861 <td align="left" valign="top"> | 953 <td align="left" valign="top" style="width: 20%;"> 862 comment 954 comment 863 </td> 955 </td> 864 956 865 </tr> 957 </tr> 866 <tr> 958 <tr> 867 <td align="left" valign="top"> | 959 <td align="left" valign="top" style="width: 10%;"> 868 [setup] 960 [setup] 869 </td> 961 </td> 870 <td align="left" valign="top"> | 962 <td align="left" valign="top" style="width: 15%;"> 871 max_concurrent_jobs 963 max_concurrent_jobs 872 </td> 964 </td> 873 <td align="left" valign="top"> | 965 <td align="left" valign="top" style="width: 20%;"> 874 if variable is not defined no limit on jobs 966 if variable is not defined no limit on jobs 875 </td> 967 </td> 876 <td align="left" valign="top"> | 968 <td align="left" valign="top" style="width: 6%;"> 877 no 969 no 878 </td> 970 </td> 879 <td align="left" valign="top"> | 971 <td align="left" valign="top" style="width: 20%;"> 880 972 881 </td> 973 </td> 882 974 883 </tr> 975 </tr> 884 <tr> 976 <tr> 885 <td align="left" valign="top"> | 977 <td align="left" valign="top" style="width: 10%;"> 886 978 887 </td> 979 </td> 888 <td align="left" valign="top"> | 980 <td align="left" valign="top" style="width: 15%;"> 889 executable 981 executable 890 </td> 982 </td> 891 <td align="left" valign="top"> | 983 <td align="left" valign="top" style="width: 20%;"> 892 full path to megatest binary 984 full path to megatest binary 893 </td> 985 </td> 894 <td align="left" valign="top"> | 986 <td align="left" valign="top" style="width: 6%;"> 895 no 987 no 896 </td> 988 </td> 897 <td align="left" valign="top"> | 989 <td align="left" valign="top" style="width: 20%;"> 898 Use only if necessary, megatest will extract the location from where it used to 990 Use only if necessary, megatest will extract the location from where it used to 899 </td> 991 </td> 900 992 901 </tr> 993 </tr> 902 <tr> 994 <tr> 903 <td align="left" valign="top"> | 995 <td align="left" valign="top" style="width: 10%;"> 904 996 905 </td> 997 </td> 906 <td align="left" valign="top"> | 998 <td align="left" valign="top" style="width: 15%;"> 907 runsdir 999 runsdir 908 </td> 1000 </td> 909 <td align="left" valign="top"> | 1001 <td align="left" valign="top" style="width: 20%;"> 910 full path to where the link tree to all runs will be created 1002 full path to where the link tree to all runs will be created 911 </td> 1003 </td> 912 <td align="left" valign="top"> | 1004 <td align="left" valign="top" style="width: 6%;"> 913 no 1005 no 914 </td> 1006 </td> 915 <td align="left" valign="top"> | 1007 <td align="left" valign="top" style="width: 20%;"> 916 Because your runs may be spread out over several disk partitions a central link 1008 Because your runs may be spread out over several disk partitions a central link 917 </td> 1009 </td> 918 1010 919 </tr> 1011 </tr> 920 <tr> 1012 <tr> 921 <td align="left" valign="top"> | 1013 <td align="left" valign="top" style="width: 10%;"> 922 [fields] 1014 [fields] 923 </td> 1015 </td> 924 <td align="left" valign="top"> | 1016 <td align="left" valign="top" style="width: 15%;"> 925 string of letters, numbers and underscore 1017 string of letters, numbers and underscore 926 </td> 1018 </td> 927 <td align="left" valign="top"> | 1019 <td align="left" valign="top" style="width: 20%;"> 928 string of letters, numbers and underscore 1020 string of letters, numbers and underscore 929 </td> 1021 </td> 930 <td align="left" valign="top"> | 1022 <td align="left" valign="top" style="width: 6%;"> 931 at least one 1023 at least one 932 </td> 1024 </td> 933 <td align="left" valign="top"> | 1025 <td align="left" valign="top" style="width: 20%;"> 934 1026 935 </td> 1027 </td> 936 1028 937 </tr> 1029 </tr> 938 <tr> 1030 <tr> 939 <td align="left" valign="top"> | 1031 <td align="left" valign="top" style="width: 10%;"> 940 [jobtools] 1032 [jobtools] 941 </td> 1033 </td> 942 <td align="left" valign="top"> | 1034 <td align="left" valign="top" style="width: 15%;"> 943 launcher 1035 launcher 944 </td> 1036 </td> 945 <td align="left" valign="top"> | 1037 <td align="left" valign="top" style="width: 20%;"> 946 command line used to launch jobs - the job command (megatest -execute) will be a 1038 command line used to launch jobs - the job command (megatest -execute) will be a 947 </td> 1039 </td> 948 <td align="left" valign="top"> | 1040 <td align="left" valign="top" style="width: 6%;"> 949 no 1041 no 950 </td> 1042 </td> 951 <td align="left" valign="top"> | 1043 <td align="left" valign="top" style="width: 20%;"> 952 1044 953 </td> 1045 </td> 954 1046 955 </tr> 1047 </tr> 956 <tr> 1048 <tr> 957 <td align="left" valign="top"> | 1049 <td align="left" valign="top" style="width: 10%;"> 958 1050 959 </td> 1051 </td> 960 <td align="left" valign="top"> | 1052 <td align="left" valign="top" style="width: 15%;"> 961 workhosts 1053 workhosts 962 </td> 1054 </td> 963 <td align="left" valign="top"> | 1055 <td align="left" valign="top" style="width: 20%;"> 964 list of hostnames to run jobs on NOT SUPPORTED RIGHT NOW 1056 list of hostnames to run jobs on NOT SUPPORTED RIGHT NOW 965 </td> 1057 </td> 966 <td align="left" valign="top"> | 1058 <td align="left" valign="top" style="width: 6%;"> 967 n/a 1059 n/a 968 </td> 1060 </td> 969 <td align="left" valign="top"> | 1061 <td align="left" valign="top" style="width: 20%;"> 970 1062 971 </td> 1063 </td> 972 1064 973 </tr> 1065 </tr> 974 <tr> 1066 <tr> > 1067 <td align="left" valign="top" style="width: 10%;"> > 1068 [jobgroups] > 1069 </td> > 1070 <td align="left" valign="top" style="width: 15%;"> > 1071 string of letters, numbers and underscore > 1072 </td> > 1073 <td align="left" valign="top" style="width: 20%;"> > 1074 number > 1075 </td> 975 <td align="left" valign="top"> | 1076 <td align="left" valign="top" style="width: 6%;"> > 1077 no > 1078 </td> > 1079 <td align="left" valign="top" style="width: 20%;"> > 1080 Control number of jobs allowed to concurrently run in categories. See [jobgroup] > 1081 </td> > 1082 > 1083 </tr> > 1084 <tr> > 1085 <td align="left" valign="top" style="width: 10%;"> 976 [env-override] 1086 [env-override] 977 </td> 1087 </td> 978 <td align="left" valign="top"> | 1088 <td align="left" valign="top" style="width: 15%;"> 979 string of letters, numbers and underscore 1089 string of letters, numbers and underscore 980 </td> 1090 </td> 981 <td align="left" valign="top"> | 1091 <td align="left" valign="top" style="width: 20%;"> 982 any string 1092 any string 983 </td> 1093 </td> 984 <td align="left" valign="top"> | 1094 <td align="left" valign="top" style="width: 6%;"> 985 no 1095 no 986 </td> 1096 </td> 987 <td align="left" valign="top"> | 1097 <td align="left" valign="top" style="width: 20%;"> 988 These are set on the test launching machine, not the test running machine. Typic 1098 These are set on the test launching machine, not the test running machine. Typic 989 </td> 1099 </td> 990 1100 991 </tr> 1101 </tr> 992 <tr> 1102 <tr> 993 <td align="left" valign="top"> | 1103 <td align="left" valign="top" style="width: 10%;"> 994 [disks] 1104 [disks] 995 </td> 1105 </td> 996 <td align="left" valign="top"> | 1106 <td align="left" valign="top" style="width: 15%;"> 997 string of letters, numbers and underscore 1107 string of letters, numbers and underscore 998 </td> 1108 </td> 999 <td align="left" valign="top"> | 1109 <td align="left" valign="top" style="width: 20%;"> 1000 a valid path writable by the test launching process and by the test process 1110 a valid path writable by the test launching process and by the test process 1001 </td> 1111 </td> 1002 <td align="left" valign="top"> | 1112 <td align="left" valign="top" style="width: 6%;"> 1003 yes 1113 yes 1004 </td> 1114 </td> 1005 <td align="left" valign="top"> | 1115 <td align="left" valign="top" style="width: 20%;"> 1006 The disk usage balancing algorithm is to choose the disk with the least space fo 1116 The disk usage balancing algorithm is to choose the disk with the least space fo 1007 </td> 1117 </td> 1008 1118 1009 </tr> 1119 </tr> 1010 1120 1011 </table> 1121 </table> 1012 1122 1013 </div> 1123 </div> 1014 <h2 class="Subsection"> 1124 <h2 class="Subsection"> 1015 <a class="toc" name="toc-Subsection-9.4">9.4</a> runconfigs.config file | 1125 <a class="toc" name="toc-Subsection-13.4">13.4</a> runconfigs.config file 1016 </h2> 1126 </h2> 1017 <div class="Standard"> 1127 <div class="Standard"> 1018 <table> 1128 <table> 1019 <tr> 1129 <tr> 1020 <td align="left" valign="top"> | 1130 <td align="left" valign="top" style="width: 20%;"> 1021 section 1131 section 1022 </td> 1132 </td> 1023 <td align="left" valign="top"> | 1133 <td align="left" valign="top" style="width: 12%;"> 1024 variable 1134 variable 1025 </td> 1135 </td> 1026 <td align="left" valign="top"> | 1136 <td align="left" valign="top" style="width: 3%;"> 1027 value 1137 value 1028 </td> 1138 </td> 1029 <td align="left" valign="top"> | 1139 <td align="left" valign="top" style="width: 4%;"> 1030 required? 1140 required? 1031 </td> 1141 </td> 1032 <td align="left" valign="top"> | 1142 <td align="left" valign="top" style="width: 30%;"> 1033 comment 1143 comment 1034 </td> 1144 </td> 1035 1145 1036 </tr> 1146 </tr> 1037 <tr> 1147 <tr> 1038 <td align="left" valign="top"> | 1148 <td align="left" valign="top" style="width: 20%;"> 1039 [default] 1149 [default] 1040 </td> 1150 </td> 1041 <td align="left" valign="top"> | 1151 <td align="left" valign="top" style="width: 12%;"> 1042 string of letters, numbers and underscore 1152 string of letters, numbers and underscore 1043 </td> 1153 </td> 1044 <td align="left" valign="top"> | 1154 <td align="left" valign="top" style="width: 3%;"> 1045 any 1155 any 1046 </td> 1156 </td> 1047 <td align="left" valign="top"> | 1157 <td align="left" valign="top" style="width: 4%;"> 1048 no 1158 no 1049 </td> 1159 </td> 1050 <td align="left" valign="top"> | 1160 <td align="left" valign="top" style="width: 30%;"> 1051 variables set in this section will be available for all runs, defining the same 1161 variables set in this section will be available for all runs, defining the same 1052 </td> 1162 </td> 1053 1163 1054 </tr> 1164 </tr> 1055 <tr> 1165 <tr> 1056 <td align="left" valign="top"> | 1166 <td align="left" valign="top" style="width: 20%;"> 1057 [field1value/field2value...] 1167 [field1value/field2value...] 1058 </td> 1168 </td> 1059 <td align="left" valign="top"> | 1169 <td align="left" valign="top" style="width: 12%;"> 1060 string of letters, numbers and underscore 1170 string of letters, numbers and underscore 1061 </td> 1171 </td> 1062 <td align="left" valign="top"> | 1172 <td align="left" valign="top" style="width: 3%;"> 1063 any 1173 any 1064 </td> 1174 </td> 1065 <td align="left" valign="top"> | 1175 <td align="left" valign="top" style="width: 4%;"> 1066 no 1176 no 1067 </td> 1177 </td> 1068 <td align="left" valign="top"> | 1178 <td align="left" valign="top" style="width: 30%;"> 1069 the values in this section will be set for any run where field1 is field1value, 1179 the values in this section will be set for any run where field1 is field1value, 1070 </td> 1180 </td> 1071 1181 1072 </tr> 1182 </tr> 1073 1183 1074 </table> 1184 </table> 1075 1185 ................................................................................................................................................................................ 1111 <div class="Code"> 1221 <div class="Code"> 1112 ENCRYPTION true 1222 ENCRYPTION true 1113 </div> 1223 </div> 1114 <div class="Code"> 1224 <div class="Code"> 1115 TESTPATH /nfs/testing/megacorp_runs 1225 TESTPATH /nfs/testing/megacorp_runs 1116 </div> 1226 </div> 1117 <h2 class="Subsection"> 1227 <h2 class="Subsection"> 1118 <a class="toc" name="toc-Subsection-9.5">9.5</a> Writing tests | 1228 <a class="toc" name="toc-Subsection-13.5">13.5</a> Writing tests 1119 </h2> 1229 </h2> 1120 <h3 class="Subsubsection"> 1230 <h3 class="Subsubsection"> 1121 <a class="toc" name="toc-Subsubsection-9.5.1">9.5.1</a> testconfig file | 1231 <a class="toc" name="toc-Subsubsection-13.5.1">13.5.1</a> testconfig file 1122 </h3> 1232 </h3> 1123 <div class="Standard"> 1233 <div class="Standard"> 1124 <table> 1234 <table> 1125 <tr> 1235 <tr> 1126 <td align="left" valign="top"> | 1236 <td align="left" valign="top" style="width: 8%;"> 1127 section 1237 section 1128 </td> 1238 </td> 1129 <td align="left" valign="top"> | 1239 <td align="left" valign="top" style="width: 6%;"> 1130 variable 1240 variable 1131 </td> 1241 </td> 1132 <td align="left" valign="top"> | 1242 <td align="left" valign="top" style="width: 12%;"> 1133 value 1243 value 1134 </td> 1244 </td> 1135 <td align="left" valign="top"> | 1245 <td align="left" valign="top" style="width: 6%;"> 1136 required? 1246 required? 1137 </td> 1247 </td> 1138 <td align="left" valign="top"> | 1248 <td align="left" valign="top" style="width: 30%;"> 1139 comments 1249 comments 1140 </td> 1250 </td> 1141 1251 1142 </tr> 1252 </tr> 1143 <tr> 1253 <tr> 1144 <td align="left" valign="top"> | 1254 <td align="left" valign="top" style="width: 8%;"> 1145 [setup] 1255 [setup] 1146 </td> 1256 </td> 1147 <td align="left" valign="top"> | 1257 <td align="left" valign="top" style="width: 6%;"> 1148 runscript 1258 runscript 1149 </td> 1259 </td> 1150 <td align="left" valign="top"> | 1260 <td align="left" valign="top" style="width: 12%;"> 1151 name of script to execute for this test 1261 name of script to execute for this test 1152 </td> 1262 </td> 1153 <td align="left" valign="top"> | 1263 <td align="left" valign="top" style="width: 6%;"> 1154 yes 1264 yes 1155 </td> 1265 </td> 1156 <td align="left" valign="top"> | 1266 <td align="left" valign="top" style="width: 30%;"> 1157 The script must be executable and either provide the full path or put a copy at 1267 The script must be executable and either provide the full path or put a copy at 1158 </td> 1268 </td> 1159 1269 1160 </tr> 1270 </tr> 1161 <tr> 1271 <tr> 1162 <td align="left" valign="top"> | 1272 <td align="left" valign="top" style="width: 8%;"> 1163 [requirements] 1273 [requirements] 1164 </td> 1274 </td> 1165 <td align="left" valign="top"> | 1275 <td align="left" valign="top" style="width: 6%;"> 1166 waiton 1276 waiton 1167 </td> 1277 </td> 1168 <td align="left" valign="top"> | 1278 <td align="left" valign="top" style="width: 12%;"> 1169 list of valid test names 1279 list of valid test names 1170 </td> 1280 </td> 1171 <td align="left" valign="top"> | 1281 <td align="left" valign="top" style="width: 6%;"> 1172 no 1282 no 1173 </td> 1283 </td> 1174 <td align="left" valign="top"> | 1284 <td align="left" valign="top" style="width: 30%;"> 1175 This test will not run until the named tests are state completed and status PASS 1285 This test will not run until the named tests are state completed and status PASS 1176 </td> 1286 </td> 1177 1287 1178 </tr> 1288 </tr> 1179 <tr> 1289 <tr> 1180 <td align="left" valign="top"> | 1290 <td align="left" valign="top" style="width: 8%;"> > 1291 > 1292 </td> > 1293 <td align="left" valign="top" style="width: 6%;"> > 1294 jobgroup > 1295 </td> > 1296 <td align="left" valign="top" style="width: 12%;"> > 1297 > 1298 </td> > 1299 <td align="left" valign="top" style="width: 6%;"> > 1300 > 1301 </td> > 1302 <td align="left" valign="top" style="width: 30%;"> > 1303 > 1304 </td> > 1305 > 1306 </tr> > 1307 <tr> > 1308 <td align="left" valign="top" style="width: 8%;"> 1181 [items] 1309 [items] 1182 </td> 1310 </td> 1183 <td align="left" valign="top"> | 1311 <td align="left" valign="top" style="width: 6%;"> 1184 any valid 1312 any valid 1185 </td> 1313 </td> 1186 <td align="left" valign="top"> | 1314 <td align="left" valign="top" style="width: 12%;"> 1187 list of values 1315 list of values 1188 </td> 1316 </td> 1189 <td align="left" valign="top"> | 1317 <td align="left" valign="top" style="width: 6%;"> > 1318 no > 1319 </td> > 1320 <td align="left" valign="top" style="width: 30%;"> > 1321 The test will be repeated once for each item with the variable name set to the v > 1322 </td> > 1323 > 1324 </tr> > 1325 <tr> > 1326 <td align="left" valign="top" style="width: 8%;"> > 1327 [eztests] > 1328 </td> > 1329 <td align="left" valign="top" style="width: 6%;"> > 1330 any valid > 1331 </td> > 1332 <td align="left" valign="top" style="width: 12%;"> > 1333 stepname command > 1334 </td> > 1335 <td align="left" valign="top" style="width: 6%;"> 1190 no 1336 no 1191 </td> 1337 </td> 1192 <td align="left" valign="top"> | 1338 <td align="left" valign="top" style="width: 30%;"> 1193 The test will be repeated once for each item with the variable name set to the v | 1339 Use in addition to or instead of runscript for easy implementation of steps. If 1194 </td> 1340 </td> 1195 1341 1196 </tr> 1342 </tr> 1197 1343 1198 </table> 1344 </table> 1199 1345 1200 </div> 1346 </div> 1201 <h3 class="Subsubsection"> 1347 <h3 class="Subsubsection"> 1202 <a class="toc" name="toc-Subsubsection-9.5.2">9.5.2</a> Command line | 1348 <a class="toc" name="toc-Subsubsection-13.5.2">13.5.2</a> Command line 1203 </h3> 1349 </h3> 1204 <div class="Standard"> 1350 <div class="Standard"> 1205 <table> 1351 <table> 1206 <tr> 1352 <tr> 1207 <td align="left" valign="top"> 1353 <td align="left" valign="top"> 1208 switch or param 1354 switch or param 1209 </td> 1355 </td> 1210 <td align="left" valign="top"> 1356 <td align="left" valign="top"> 1211 parameter 1357 parameter 1212 </td> 1358 </td> 1213 <td align="left" valign="top"> | 1359 <td align="left" valign="top" style="width: 30%;"> 1214 purpose 1360 purpose 1215 </td> 1361 </td> 1216 <td align="left" valign="top"> 1362 <td align="left" valign="top"> 1217 comments 1363 comments 1218 </td> 1364 </td> 1219 1365 1220 </tr> 1366 </tr> ................................................................................................................................................................................ 1221 <tr> 1367 <tr> 1222 <td align="left" valign="top"> 1368 <td align="left" valign="top"> 1223 -h 1369 -h 1224 </td> 1370 </td> 1225 <td align="left" valign="top"> 1371 <td align="left" valign="top"> 1226 1372 1227 </td> 1373 </td> 1228 <td align="left" valign="top"> | 1374 <td align="left" valign="top" style="width: 30%;"> 1229 brief help 1375 brief help 1230 </td> 1376 </td> 1231 <td align="left" valign="top"> 1377 <td align="left" valign="top"> 1232 1378 1233 </td> 1379 </td> 1234 1380 1235 </tr> 1381 </tr> ................................................................................................................................................................................ 1236 <tr> 1382 <tr> 1237 <td align="left" valign="top"> 1383 <td align="left" valign="top"> 1238 -runall 1384 -runall 1239 </td> 1385 </td> 1240 <td align="left" valign="top"> 1386 <td align="left" valign="top"> 1241 1387 1242 </td> 1388 </td> 1243 <td align="left" valign="top"> | 1389 <td align="left" valign="top" style="width: 30%;"> 1244 run all tests 1390 run all tests 1245 </td> 1391 </td> 1246 <td align="left" valign="top"> 1392 <td align="left" valign="top"> 1247 1393 1248 </td> 1394 </td> 1249 1395 1250 </tr> 1396 </tr> ................................................................................................................................................................................ 1251 <tr> 1397 <tr> 1252 <td align="left" valign="top"> 1398 <td align="left" valign="top"> 1253 -runtests 1399 -runtests 1254 </td> 1400 </td> 1255 <td align="left" valign="top"> 1401 <td align="left" valign="top"> 1256 test1,test2,... 1402 test1,test2,... 1257 </td> 1403 </td> 1258 <td align="left" valign="top"> | 1404 <td align="left" valign="top" style="width: 30%;"> 1259 run one or more tests 1405 run one or more tests 1260 </td> 1406 </td> 1261 <td align="left" valign="top"> 1407 <td align="left" valign="top"> 1262 1408 1263 </td> 1409 </td> 1264 1410 1265 </tr> 1411 </tr> ................................................................................................................................................................................ 1266 <tr> 1412 <tr> 1267 <td align="left" valign="top"> 1413 <td align="left" valign="top"> 1268 -step 1414 -step 1269 </td> 1415 </td> 1270 <td align="left" valign="top"> 1416 <td align="left" valign="top"> 1271 stepname 1417 stepname 1272 </td> 1418 </td> 1273 <td align="left" valign="top"> | 1419 <td align="left" valign="top" style="width: 30%;"> 1274 record a step 1420 record a step 1275 </td> 1421 </td> 1276 <td align="left" valign="top"> 1422 <td align="left" valign="top"> 1277 requires :state and :status 1423 requires :state and :status 1278 </td> 1424 </td> 1279 1425 1280 </tr> 1426 </tr> ................................................................................................................................................................................ 1281 <tr> 1427 <tr> 1282 <td align="left" valign="top"> 1428 <td align="left" valign="top"> 1283 -test-status 1429 -test-status 1284 </td> 1430 </td> 1285 <td align="left" valign="top"> 1431 <td align="left" valign="top"> 1286 1432 1287 </td> 1433 </td> 1288 <td align="left" valign="top"> | 1434 <td align="left" valign="top" style="width: 30%;"> 1289 record the test status 1435 record the test status 1290 </td> 1436 </td> 1291 <td align="left" valign="top"> 1437 <td align="left" valign="top"> 1292 requires :state and :status 1438 requires :state and :status 1293 </td> 1439 </td> 1294 1440 1295 </tr> 1441 </tr> ................................................................................................................................................................................ 1296 <tr> 1442 <tr> 1297 <td align="left" valign="top"> 1443 <td align="left" valign="top"> 1298 -setlog 1444 -setlog 1299 </td> 1445 </td> 1300 <td align="left" valign="top"> 1446 <td align="left" valign="top"> 1301 logfilename 1447 logfilename 1302 </td> 1448 </td> 1303 <td align="left" valign="top"> | 1449 <td align="left" valign="top" style="width: 30%;"> 1304 set the logfile name for a test 1450 set the logfile name for a test 1305 </td> 1451 </td> 1306 <td align="left" valign="top"> 1452 <td align="left" valign="top"> 1307 path is assumed to be relative to the test run directory 1453 path is assumed to be relative to the test run directory 1308 </td> 1454 </td> 1309 1455 1310 </tr> 1456 </tr> ................................................................................................................................................................................ 1311 <tr> 1457 <tr> 1312 <td align="left" valign="top"> 1458 <td align="left" valign="top"> 1313 -set-toplog 1459 -set-toplog 1314 </td> 1460 </td> 1315 <td align="left" valign="top"> 1461 <td align="left" valign="top"> 1316 logfilename 1462 logfilename 1317 </td> 1463 </td> 1318 <td align="left" valign="top"> | 1464 <td align="left" valign="top" style="width: 30%;"> 1319 set the logfile name for the top test in an iterated test run 1465 set the logfile name for the top test in an iterated test run 1320 </td> 1466 </td> 1321 <td align="left" valign="top"> 1467 <td align="left" valign="top"> 1322 each sub test can have its own logfile set 1468 each sub test can have its own logfile set 1323 </td> 1469 </td> 1324 1470 1325 </tr> 1471 </tr> 1326 <tr> 1472 <tr> 1327 <td align="left" valign="top"> 1473 <td align="left" valign="top"> 1328 -m 1474 -m 1329 </td> 1475 </td> 1330 <td align="left" valign="top"> 1476 <td align="left" valign="top"> 1331 “comment” | 1477 “comment” 1332 </td> 1478 </td> 1333 <td align="left" valign="top"> | 1479 <td align="left" valign="top" style="width: 30%;"> 1334 sets a comment for the step, test or run 1480 sets a comment for the step, test or run 1335 </td> 1481 </td> 1336 <td align="left" valign="top"> 1482 <td align="left" valign="top"> 1337 1483 1338 </td> 1484 </td> 1339 1485 1340 </tr> 1486 </tr> ................................................................................................................................................................................ 1341 <tr> 1487 <tr> 1342 <td align="left" valign="top"> 1488 <td align="left" valign="top"> 1343 :runname 1489 :runname 1344 </td> 1490 </td> 1345 <td align="left" valign="top"> 1491 <td align="left" valign="top"> 1346 [a-zA-Z0-9_-]+ 1492 [a-zA-Z0-9_-]+ 1347 </td> 1493 </td> 1348 <td align="left" valign="top"> | 1494 <td align="left" valign="top" style="width: 30%;"> 1349 directory in which this run will be stored in the test run area 1495 directory in which this run will be stored in the test run area 1350 </td> 1496 </td> 1351 <td align="left" valign="top"> 1497 <td align="left" valign="top"> 1352 1498 1353 </td> 1499 </td> 1354 1500 1355 </tr> 1501 </tr> ................................................................................................................................................................................ 1356 <tr> 1502 <tr> 1357 <td align="left" valign="top"> 1503 <td align="left" valign="top"> 1358 :state 1504 :state 1359 </td> 1505 </td> 1360 <td align="left" valign="top"> 1506 <td align="left" valign="top"> 1361 any value 1507 any value 1362 </td> 1508 </td> 1363 <td align="left" valign="top"> | 1509 <td align="left" valign="top" style="width: 30%;"> 1364 Set the step or test state, this is stored in the state field in the steps or te 1510 Set the step or test state, this is stored in the state field in the steps or te 1365 </td> 1511 </td> 1366 <td align="left" valign="top"> 1512 <td align="left" valign="top"> 1367 For tests Megatest recognises “INCOMPLETE”, “COMPLETE” | 1513 For tests Megatest recognises “INCOMPLETE”, “COMPLETE” 1368 </td> 1514 </td> 1369 1515 1370 </tr> 1516 </tr> 1371 <tr> 1517 <tr> 1372 <td align="left" valign="top"> 1518 <td align="left" valign="top"> 1373 :status 1519 :status 1374 </td> 1520 </td> 1375 <td align="left" valign="top"> 1521 <td align="left" valign="top"> 1376 any value 1522 any value 1377 </td> 1523 </td> 1378 <td align="left" valign="top"> | 1524 <td align="left" valign="top" style="width: 30%;"> 1379 Set the step or test status, this is stored in the status field in the steps or 1525 Set the step or test status, this is stored in the status field in the steps or 1380 </td> 1526 </td> 1381 <td align="left" valign="top"> 1527 <td align="left" valign="top"> 1382 For tests Megatest recognises “PASS”, “FAIL”, and “CHECK” | 1528 For tests Megatest recognises “PASS”, “FAIL”, and &ldquo 1383 </td> 1529 </td> 1384 1530 1385 </tr> 1531 </tr> 1386 <tr> 1532 <tr> 1387 <td align="left" valign="top"> 1533 <td align="left" valign="top"> 1388 -list-runs 1534 -list-runs 1389 </td> 1535 </td> 1390 <td align="left" valign="top"> 1536 <td align="left" valign="top"> 1391 any value, % is wildcard 1537 any value, % is wildcard 1392 </td> 1538 </td> 1393 <td align="left" valign="top"> | 1539 <td align="left" valign="top" style="width: 30%;"> 1394 Respects -itempatt and -testpatt for filters 1540 Respects -itempatt and -testpatt for filters 1395 </td> 1541 </td> 1396 <td align="left" valign="top"> 1542 <td align="left" valign="top"> 1397 1543 1398 </td> 1544 </td> 1399 1545 1400 </tr> 1546 </tr> ................................................................................................................................................................................ 1401 <tr> 1547 <tr> 1402 <td align="left" valign="top"> 1548 <td align="left" valign="top"> 1403 -testpatt 1549 -testpatt 1404 </td> 1550 </td> 1405 <td align="left" valign="top"> 1551 <td align="left" valign="top"> 1406 any value, % is wildcard 1552 any value, % is wildcard 1407 </td> 1553 </td> 1408 <td align="left" valign="top"> | 1554 <td align="left" valign="top" style="width: 30%;"> 1409 1555 1410 </td> 1556 </td> 1411 <td align="left" valign="top"> 1557 <td align="left" valign="top"> 1412 1558 1413 </td> 1559 </td> 1414 1560 1415 </tr> 1561 </tr> ................................................................................................................................................................................ 1416 <tr> 1562 <tr> 1417 <td align="left" valign="top"> 1563 <td align="left" valign="top"> 1418 -itempatt 1564 -itempatt 1419 </td> 1565 </td> 1420 <td align="left" valign="top"> 1566 <td align="left" valign="top"> 1421 any value, % is wildcard 1567 any value, % is wildcard 1422 </td> 1568 </td> 1423 <td align="left" valign="top"> | 1569 <td align="left" valign="top" style="width: 30%;"> 1424 1570 1425 </td> 1571 </td> 1426 <td align="left" valign="top"> 1572 <td align="left" valign="top"> 1427 1573 1428 </td> 1574 </td> 1429 1575 1430 </tr> 1576 </tr> ................................................................................................................................................................................ 1431 <tr> 1577 <tr> 1432 <td align="left" valign="top"> 1578 <td align="left" valign="top"> 1433 -showkeys 1579 -showkeys 1434 </td> 1580 </td> 1435 <td align="left" valign="top"> 1581 <td align="left" valign="top"> 1436 1582 1437 </td> 1583 </td> 1438 <td align="left" valign="top"> | 1584 <td align="left" valign="top" style="width: 30%;"> 1439 Print the keys being used for this database 1585 Print the keys being used for this database 1440 </td> 1586 </td> 1441 <td align="left" valign="top"> 1587 <td align="left" valign="top"> 1442 1588 1443 </td> 1589 </td> 1444 1590 1445 </tr> 1591 </tr> ................................................................................................................................................................................ 1446 <tr> 1592 <tr> 1447 <td align="left" valign="top"> 1593 <td align="left" valign="top"> 1448 -force 1594 -force 1449 </td> 1595 </td> 1450 <td align="left" valign="top"> 1596 <td align="left" valign="top"> 1451 1597 1452 </td> 1598 </td> 1453 <td align="left" valign="top"> | 1599 <td align="left" valign="top" style="width: 30%;"> 1454 Test will not re-run if in the “PASS”, “CHECK” or “KILLED”, using -force will fo | 1600 Test will not re-run if in the “PASS”, “CHECK” or &ldquo 1455 </td> 1601 </td> 1456 <td align="left" valign="top"> 1602 <td align="left" valign="top"> 1457 WARNING: The -force switch will bypass any “waiton” dependencies. | 1603 WARNING: The -force switch will bypass any “waiton” dependencies. 1458 </td> 1604 </td> 1459 1605 1460 </tr> 1606 </tr> 1461 <tr> 1607 <tr> 1462 <td align="left" valign="top"> 1608 <td align="left" valign="top"> 1463 -xterm 1609 -xterm 1464 </td> 1610 </td> 1465 <td align="left" valign="top"> 1611 <td align="left" valign="top"> 1466 1612 1467 </td> 1613 </td> 1468 <td align="left" valign="top"> | 1614 <td align="left" valign="top" style="width: 30%;"> 1469 Launch an xterm instead of run the test. The xterm will have the environment tha 1615 Launch an xterm instead of run the test. The xterm will have the environment tha 1470 </td> 1616 </td> 1471 <td align="left" valign="top"> 1617 <td align="left" valign="top"> 1472 1618 1473 </td> 1619 </td> 1474 1620 1475 </tr> 1621 </tr> ................................................................................................................................................................................ 1476 <tr> 1622 <tr> 1477 <td align="left" valign="top"> 1623 <td align="left" valign="top"> 1478 -remove-runs 1624 -remove-runs 1479 </td> 1625 </td> 1480 <td align="left" valign="top"> 1626 <td align="left" valign="top"> 1481 1627 1482 </td> 1628 </td> 1483 <td align="left" valign="top"> | 1629 <td align="left" valign="top" style="width: 30%;"> 1484 Remove a run, test or subtest from the database and the disk. Cannot be undone. 1630 Remove a run, test or subtest from the database and the disk. Cannot be undone. 1485 </td> 1631 </td> 1486 <td align="left" valign="top"> 1632 <td align="left" valign="top"> 1487 1633 1488 </td> 1634 </td> 1489 1635 1490 </tr> 1636 </tr> ................................................................................................................................................................................ 1491 <tr> 1637 <tr> 1492 <td align="left" valign="top"> 1638 <td align="left" valign="top"> 1493 <i>Test helpers</i> 1639 <i>Test helpers</i> 1494 </td> 1640 </td> 1495 <td align="left" valign="top"> 1641 <td align="left" valign="top"> 1496 1642 1497 </td> 1643 </td> 1498 <td align="left" valign="top"> | 1644 <td align="left" valign="top" style="width: 30%;"> 1499 1645 1500 </td> 1646 </td> 1501 <td align="left" valign="top"> 1647 <td align="left" valign="top"> 1502 1648 1503 </td> 1649 </td> 1504 1650 1505 </tr> 1651 </tr> ................................................................................................................................................................................ 1506 <tr> 1652 <tr> 1507 <td align="left" valign="top"> 1653 <td align="left" valign="top"> 1508 -runstep 1654 -runstep 1509 </td> 1655 </td> 1510 <td align="left" valign="top"> 1656 <td align="left" valign="top"> 1511 1657 1512 </td> 1658 </td> 1513 <td align="left" valign="top"> | 1659 <td align="left" valign="top" style="width: 30%;"> 1514 Used inside a test to run a step, record the start and end of the step and optio 1660 Used inside a test to run a step, record the start and end of the step and optio 1515 </td> 1661 </td> 1516 <td align="left" valign="top"> 1662 <td align="left" valign="top"> 1517 1663 1518 </td> 1664 </td> 1519 1665 1520 </tr> 1666 </tr> ................................................................................................................................................................................ 1521 <tr> 1667 <tr> 1522 <td align="left" valign="top"> 1668 <td align="left" valign="top"> 1523 -logpro 1669 -logpro 1524 </td> 1670 </td> 1525 <td align="left" valign="top"> 1671 <td align="left" valign="top"> 1526 1672 1527 </td> 1673 </td> 1528 <td align="left" valign="top"> | 1674 <td align="left" valign="top" style="width: 30%;"> 1529 If using logpro to asses the PASS/FAIL status of the step you specify the logpro | 1675 If using logpro to acess the PASS/FAIL status of the step you specify the logpro 1530 </td> 1676 </td> 1531 <td align="left" valign="top"> 1677 <td align="left" valign="top"> 1532 1678 1533 </td> 1679 </td> 1534 1680 1535 </tr> 1681 </tr> 1536 1682 1537 </table> 1683 </table> 1538 1684 1539 </div> 1685 </div> 1540 <h1 class="Section"> 1686 <h1 class="Section"> 1541 <a class="toc" name="toc-Section-A">A</a> Data | 1687 <a class="toc" name="toc-Appendix-A">A</a> Data 1542 </h1> 1688 </h1> 1543 <h1 class="Section"> 1689 <h1 class="Section"> 1544 <a class="toc" name="toc-Section-B">B</a> References | 1690 <a class="toc" name="toc-Appendix-B">B</a> References 1545 </h1> 1691 </h1> 1546 1692 1547 <hr class="footer"/> 1693 <hr class="footer"/> 1548 <div class="footer" id="generated-by"> 1694 <div class="footer" id="generated-by"> 1549 Document generated by <a href="http://elyxer.nongnu.org/">eLyXer 1.0.0 (2010-07- | 1695 Document generated by <a href="http://elyxer.nongnu.org/">eLyXer 1.2.2 (2011-06- 1550 </div> 1696 </div> 1551 </div> 1697 </div> 1552 </body> 1698 </body> 1553 </html> 1699 </html>
Added docs/html/monitor-state-diagram.png version [47d4851333cc098e]
cannot compute difference between binary files
Modified docs/megatest.lyx from [d71eb3594c0999ca] to [8cf3af19a75c29af].
283 \end_layout 283 \end_layout 284 284 285 \begin_layout Standard 285 \begin_layout Standard 286 \begin_inset VSpace medskip 286 \begin_inset VSpace medskip 287 \end_inset 287 \end_inset 288 288 289 This document is believed to be acurate at the time of writing but as with 289 This document is believed to be acurate at the time of writing but as with 290 any opensource project the source code itself is the final arbiter of the | 290 any opensource project the source code itself is the reference. 291 softwares behaviour. < 292 It is the responsibility of the end user to validate that the code will 291 It is the responsibility of the end user to validate that the code will 293 perform as they expect. 292 perform as they expect. 294 The author assumes no responsibility for any inaccuracies that this document 293 The author assumes no responsibility for any inaccuracies that this document 295 may contain. 294 may contain. 296 In no event will Matthew Welland be liable for direct, indirect, special, 295 In no event will Matthew Welland be liable for direct, indirect, special, 297 exemplary, incidental, or consequential damages resulting from any defect 296 exemplary, incidental, or consequential damages resulting from any defect 298 or omission in this document, even if advised of the possibility of such 297 or omission in this document, even if advised of the possibility of such 299 damages. 298 damages. 300 299 301 \end_layout 300 \end_layout 302 301 303 \begin_layout Standard 302 \begin_layout Standard 304 This document is a snapshot in time and the Megatest software has likely | 303 This document is a snapshot in time and Megatest software has likely changed 305 been changed since publication. | 304 since publication. 306 This document and the product that it describes may be improved at any | 305 This document and Megatest may be improved at any time, without notice 307 time, without notice or obligation. | 306 or obligation. 308 307 309 \end_layout 308 \end_layout 310 309 311 \begin_layout Standard 310 \begin_layout Standard 312 \begin_inset Newpage newpage 311 \begin_inset Newpage newpage 313 \end_inset 312 \end_inset 314 313 ................................................................................................................................................................................ 457 456 458 \begin_layout Subsection 457 \begin_layout Subsection 459 Megatest design philosophy 458 Megatest design philosophy 460 \end_layout 459 \end_layout 461 460 462 \begin_layout Standard 461 \begin_layout Standard 463 Megatest is intended to provide the minimum needed resources to make writing 462 Megatest is intended to provide the minimum needed resources to make writing > 463 a suite of tests and implementing continuous build for software, design 464 a suite of tests for software, design engineering or process control (via | 464 engineering or process control (via owlfs for example) without being specialize 465 owlfs for example) without being specialized for any specific problem space. | 465 d for any specific problem space. 466 Megatest in of itself does not know what constitutes a PASS or FAIL of 466 Megatest in of itself does not know what constitutes a PASS or FAIL of 467 a test. 467 a test. 468 In most cases megatest is best used in conjunction with logpro or a similar 468 In most cases megatest is best used in conjunction with logpro or a similar 469 tool to parse, analyze and decide on the test outcome. 469 tool to parse, analyze and decide on the test outcome. 470 A call to megatest can then be made to record the result. < 471 < 472 \end_layout 470 \end_layout 473 471 474 \begin_layout Subsection 472 \begin_layout Subsection 475 Megatest architecture 473 Megatest architecture 476 \end_layout 474 \end_layout 477 475 478 \begin_layout Standard 476 \begin_layout Standard ................................................................................................................................................................................ 1673 \begin_layout Section 1671 \begin_layout Section 1674 Monitor based running 1672 Monitor based running 1675 \end_layout 1673 \end_layout 1676 1674 1677 \begin_layout Subsection 1675 \begin_layout Subsection 1678 Monitor logic 1676 Monitor logic 1679 \end_layout 1677 \end_layout > 1678 > 1679 \begin_layout Standard > 1680 Note: The monitor is usable but incomplete as of Megatest v1.31. > 1681 Click on the > 1682 \begin_inset Quotes eld > 1683 \end_inset > 1684 > 1685 Monitor > 1686 \begin_inset Quotes erd > 1687 \end_inset > 1688 > 1689 button on the dashboard to start the monitor and give it a try. > 1690 \end_layout 1680 1691 1681 \begin_layout Standard 1692 \begin_layout Standard 1682 \begin_inset Graphics 1693 \begin_inset Graphics 1683 filename monitor-state-diagram.svg 1694 filename monitor-state-diagram.svg 1684 1695 1685 \end_inset 1696 \end_inset 1686 1697 ................................................................................................................................................................................ 1690 \begin_layout Section 1701 \begin_layout Section 1691 Reference 1702 Reference 1692 \end_layout 1703 \end_layout 1693 1704 1694 \begin_layout Subsection 1705 \begin_layout Subsection 1695 Configuration file Syntax 1706 Configuration file Syntax 1696 \end_layout 1707 \end_layout > 1708 > 1709 \begin_layout Standard > 1710 Note: whitespace is preserved including at the end of line. > 1711 Ensure your entries only have whitespace at the end of line when needed > 1712 to avoid problems. > 1713 \end_layout 1697 1714 1698 \begin_layout Subsubsection 1715 \begin_layout Subsubsection 1699 Sections 1716 Sections 1700 \end_layout 1717 \end_layout 1701 1718 1702 \begin_layout Standard 1719 \begin_layout Standard 1703 \begin_inset listings 1720 \begin_inset listings ................................................................................................................................................................................ 2006 2023 2007 \begin_layout Subsection 2024 \begin_layout Subsection 2008 megatest.config 2025 megatest.config 2009 \end_layout 2026 \end_layout 2010 2027 2011 \begin_layout Standard 2028 \begin_layout Standard 2012 \begin_inset Tabular 2029 \begin_inset Tabular 2013 <lyxtabular version="3" rows="9" columns="5"> | 2030 <lyxtabular version="3" rows="10" columns="5"> 2014 <features tabularvalignment="middle" tabularwidth="80page%"> 2031 <features tabularvalignment="middle" tabularwidth="80page%"> 2015 <column alignment="left" valignment="top" width="10page%"> 2032 <column alignment="left" valignment="top" width="10page%"> 2016 <column alignment="left" valignment="top" width="15page%"> 2033 <column alignment="left" valignment="top" width="15page%"> 2017 <column alignment="left" valignment="top" width="20page%"> 2034 <column alignment="left" valignment="top" width="20page%"> 2018 <column alignment="left" valignment="top" width="6page%"> 2035 <column alignment="left" valignment="top" width="6page%"> 2019 <column alignment="left" valignment="top" width="20page%"> 2036 <column alignment="left" valignment="top" width="20page%"> 2020 <row> 2037 <row> ................................................................................................................................................................................ 2342 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline 2359 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline 2343 \begin_inset Text 2360 \begin_inset Text 2344 2361 2345 \begin_layout Plain Layout 2362 \begin_layout Plain Layout 2346 2363 2347 \end_layout 2364 \end_layout 2348 2365 > 2366 \end_inset > 2367 </cell> > 2368 </row> > 2369 <row> > 2370 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox= > 2371 \begin_inset Text > 2372 > 2373 \begin_layout Plain Layout > 2374 [jobgroups] > 2375 \end_layout > 2376 > 2377 \end_inset > 2378 </cell> > 2379 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox= > 2380 \begin_inset Text > 2381 > 2382 \begin_layout Plain Layout > 2383 string of letters, numbers and underscore > 2384 \end_layout > 2385 > 2386 \end_inset > 2387 </cell> > 2388 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox= > 2389 \begin_inset Text > 2390 > 2391 \begin_layout Plain Layout > 2392 number > 2393 \end_layout > 2394 > 2395 \end_inset > 2396 </cell> > 2397 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox= > 2398 \begin_inset Text > 2399 > 2400 \begin_layout Plain Layout > 2401 no > 2402 \end_layout > 2403 > 2404 \end_inset > 2405 </cell> > 2406 <cell alignment="center" valignment="top" topline="true" leftline="true" rightli > 2407 \begin_inset Text > 2408 > 2409 \begin_layout Plain Layout > 2410 Control number of jobs allowed to concurrently run in categories. > 2411 See [jobgroup] in testconfig > 2412 \end_layout > 2413 2349 \end_inset 2414 \end_inset 2350 </cell> 2415 </cell> 2351 </row> 2416 </row> 2352 <row> 2417 <row> 2353 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="n 2418 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="n 2354 \begin_inset Text 2419 \begin_inset Text 2355 2420 ................................................................................................................................................................................ 2741 2806 2742 \begin_layout Subsubsection 2807 \begin_layout Subsubsection 2743 testconfig file 2808 testconfig file 2744 \end_layout 2809 \end_layout 2745 2810 2746 \begin_layout Standard 2811 \begin_layout Standard 2747 \begin_inset Tabular 2812 \begin_inset Tabular 2748 <lyxtabular version="3" rows="4" columns="5"> | 2813 <lyxtabular version="3" rows="6" columns="5"> 2749 <features tabularvalignment="middle" tabularwidth="80page%"> 2814 <features tabularvalignment="middle" tabularwidth="80page%"> 2750 <column alignment="left" valignment="top" width="8page%"> 2815 <column alignment="left" valignment="top" width="8page%"> 2751 <column alignment="left" valignment="top" width="6page%"> 2816 <column alignment="left" valignment="top" width="6page%"> 2752 <column alignment="left" valignment="top" width="12page%"> 2817 <column alignment="left" valignment="top" width="12page%"> 2753 <column alignment="left" valignment="top" width="6page%"> 2818 <column alignment="left" valignment="top" width="6page%"> 2754 <column alignment="left" valignment="top" width="30page%"> 2819 <column alignment="left" valignment="top" width="30page%"> 2755 <row> 2820 <row> ................................................................................................................................................................................ 2892 PASS 2957 PASS 2893 \end_layout 2958 \end_layout 2894 2959 2895 \end_inset 2960 \end_inset 2896 </cell> 2961 </cell> 2897 </row> 2962 </row> 2898 <row> 2963 <row> > 2964 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox= > 2965 \begin_inset Text > 2966 > 2967 \begin_layout Plain Layout > 2968 > 2969 \end_layout > 2970 > 2971 \end_inset > 2972 </cell> > 2973 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox= > 2974 \begin_inset Text > 2975 > 2976 \begin_layout Plain Layout > 2977 jobgroup > 2978 \end_layout > 2979 > 2980 \end_inset > 2981 </cell> > 2982 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox= > 2983 \begin_inset Text > 2984 > 2985 \begin_layout Plain Layout > 2986 > 2987 \end_layout > 2988 > 2989 \end_inset > 2990 </cell> > 2991 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox= > 2992 \begin_inset Text > 2993 > 2994 \begin_layout Plain Layout > 2995 > 2996 \end_layout > 2997 > 2998 \end_inset > 2999 </cell> > 3000 <cell alignment="center" valignment="top" topline="true" leftline="true" rightli > 3001 \begin_inset Text > 3002 > 3003 \begin_layout Plain Layout > 3004 > 3005 \end_layout > 3006 > 3007 \end_inset > 3008 </cell> > 3009 </row> > 3010 <row> 2899 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftlin | 3011 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="n 2900 \begin_inset Text 3012 \begin_inset Text 2901 3013 2902 \begin_layout Plain Layout 3014 \begin_layout Plain Layout 2903 [items] 3015 [items] 2904 \end_layout 3016 \end_layout 2905 3017 2906 \end_inset 3018 \end_inset 2907 </cell> 3019 </cell> 2908 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftlin | 3020 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="n 2909 \begin_inset Text 3021 \begin_inset Text 2910 3022 2911 \begin_layout Plain Layout 3023 \begin_layout Plain Layout 2912 any valid 3024 any valid 2913 \end_layout 3025 \end_layout 2914 3026 2915 \end_inset 3027 \end_inset 2916 </cell> 3028 </cell> 2917 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftlin | 3029 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="n 2918 \begin_inset Text 3030 \begin_inset Text 2919 3031 2920 \begin_layout Plain Layout 3032 \begin_layout Plain Layout 2921 list of values 3033 list of values 2922 \end_layout 3034 \end_layout 2923 3035 2924 \end_inset 3036 \end_inset 2925 </cell> 3037 </cell> 2926 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftlin | 3038 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="n 2927 \begin_inset Text 3039 \begin_inset Text 2928 3040 2929 \begin_layout Plain Layout 3041 \begin_layout Plain Layout 2930 no 3042 no 2931 \end_layout 3043 \end_layout 2932 3044 2933 \end_inset 3045 \end_inset 2934 </cell> 3046 </cell> 2935 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftlin | 3047 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline 2936 \begin_inset Text 3048 \begin_inset Text 2937 3049 2938 \begin_layout Plain Layout 3050 \begin_layout Plain Layout 2939 The test will be repeated once for each item with the variable name set 3051 The test will be repeated once for each item with the variable name set 2940 to the value. 3052 to the value. 2941 If there is more than one variable then the test will be run against all 3053 If there is more than one variable then the test will be run against all 2942 unique combinations of the values 3054 unique combinations of the values 2943 \end_layout 3055 \end_layout 2944 3056 > 3057 \end_inset > 3058 </cell> > 3059 </row> > 3060 <row> > 3061 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftl > 3062 \begin_inset Text > 3063 > 3064 \begin_layout Plain Layout > 3065 [eztests] > 3066 \end_layout > 3067 > 3068 \end_inset > 3069 </cell> > 3070 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftl > 3071 \begin_inset Text > 3072 > 3073 \begin_layout Plain Layout > 3074 any valid > 3075 \end_layout > 3076 > 3077 \end_inset > 3078 </cell> > 3079 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftl > 3080 \begin_inset Text > 3081 > 3082 \begin_layout Plain Layout > 3083 stepname command > 3084 \end_layout > 3085 > 3086 \end_inset > 3087 </cell> > 3088 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftl > 3089 \begin_inset Text > 3090 > 3091 \begin_layout Plain Layout > 3092 no > 3093 \end_layout > 3094 > 3095 \end_inset > 3096 </cell> > 3097 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftl > 3098 \begin_inset Text > 3099 > 3100 \begin_layout Plain Layout > 3101 Use in addition to or instead of runscript for easy implementation of steps. > 3102 If <stepname>.logpro exists it will be applied to the <stepname>.log and > 3103 resulting exit code will be used to determine PASS/FAIL/WARN > 3104 \end_layout > 3105 2945 \end_inset 3106 \end_inset 2946 </cell> 3107 </cell> 2947 </row> 3108 </row> 2948 </lyxtabular> 3109 </lyxtabular> 2949 3110 2950 \end_inset 3111 \end_inset 2951 3112 ................................................................................................................................................................................ 3868 4029 3869 \end_inset 4030 \end_inset 3870 </cell> 4031 </cell> 3871 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftlin 4032 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftlin 3872 \begin_inset Text 4033 \begin_inset Text 3873 4034 3874 \begin_layout Plain Layout 4035 \begin_layout Plain Layout 3875 If using logpro to asses the PASS/FAIL status of the step you specify the | 4036 If using logpro to acess the PASS/FAIL status of the step you specify the 3876 logpro file with this parameter. 4037 logpro file with this parameter. 3877 \end_layout 4038 \end_layout 3878 4039 3879 \end_inset 4040 \end_inset 3880 </cell> 4041 </cell> 3881 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftlin 4042 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftlin 3882 \begin_inset Text 4043 \begin_inset Text
Added docs/monitor-state-diagram.svg version [5c370cf9de317dcc]
> 1 <?xml version="1.0" encoding="UTF-8" standalone="no"?> > 2 <!-- Created with Inkscape (http://www.inkscape.org/) --> > 3 > 4 <svg > 5 xmlns:dc="http://purl.org/dc/elements/1.1/" > 6 xmlns:cc="http://creativecommons.org/ns#" > 7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > 8 xmlns:svg="http://www.w3.org/2000/svg" > 9 xmlns="http://www.w3.org/2000/svg" > 10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" > 11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" > 12 width="382.82721" > 13 height="334.97675" > 14 id="svg2" > 15 version="1.1" > 16 inkscape:version="0.48.1 r9760" > 17 sodipodi:docname="monitor-state-diagram.svg"> > 18 <defs > 19 id="defs4"> > 20 <marker > 21 inkscape:stockid="Arrow1Lend" > 22 orient="auto" > 23 refY="0" > 24 refX="0" > 25 id="Arrow1Lend" > 26 style="overflow:visible"> > 27 <path > 28 id="path3777" > 29 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 30 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 31 transform="matrix(-0.8,0,0,-0.8,-10,0)" > 32 inkscape:connector-curvature="0" /> > 33 </marker> > 34 <marker > 35 inkscape:stockid="Arrow1Lend" > 36 orient="auto" > 37 refY="0" > 38 refX="0" > 39 id="Arrow1Lend-8" > 40 style="overflow:visible"> > 41 <path > 42 inkscape:connector-curvature="0" > 43 id="path3777-9" > 44 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 45 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 46 transform="matrix(-0.8,0,0,-0.8,-10,0)" /> > 47 </marker> > 48 <marker > 49 inkscape:stockid="Arrow1Lend" > 50 orient="auto" > 51 refY="0" > 52 refX="0" > 53 id="Arrow1Lend-9" > 54 style="overflow:visible"> > 55 <path > 56 inkscape:connector-curvature="0" > 57 id="path3777-5" > 58 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 59 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 60 transform="matrix(-0.8,0,0,-0.8,-10,0)" /> > 61 </marker> > 62 <marker > 63 inkscape:stockid="Arrow1Lend" > 64 orient="auto" > 65 refY="0" > 66 refX="0" > 67 id="Arrow1Lend-4" > 68 style="overflow:visible"> > 69 <path > 70 inkscape:connector-curvature="0" > 71 id="path3777-8" > 72 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 73 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 74 transform="matrix(-0.8,0,0,-0.8,-10,0)" /> > 75 </marker> > 76 <marker > 77 inkscape:stockid="Arrow1Lend" > 78 orient="auto" > 79 refY="0" > 80 refX="0" > 81 id="Arrow1Lend-7" > 82 style="overflow:visible"> > 83 <path > 84 inkscape:connector-curvature="0" > 85 id="path3777-2" > 86 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 87 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 88 transform="matrix(-0.8,0,0,-0.8,-10,0)" /> > 89 </marker> > 90 <marker > 91 inkscape:stockid="Arrow1Lend" > 92 orient="auto" > 93 refY="0" > 94 refX="0" > 95 id="Arrow1Lend-2" > 96 style="overflow:visible"> > 97 <path > 98 inkscape:connector-curvature="0" > 99 id="path3777-26" > 100 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 101 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 102 transform="matrix(-0.8,0,0,-0.8,-10,0)" /> > 103 </marker> > 104 </defs> > 105 <sodipodi:namedview > 106 id="base" > 107 pagecolor="#ffffff" > 108 bordercolor="#666666" > 109 borderopacity="1.0" > 110 inkscape:pageopacity="0.0" > 111 inkscape:pageshadow="2" > 112 inkscape:zoom="1.0240234" > 113 inkscape:cx="197.40711" > 114 inkscape:cy="50.784201" > 115 inkscape:document-units="px" > 116 inkscape:current-layer="layer1" > 117 showgrid="false" > 118 inkscape:window-width="1336" > 119 inkscape:window-height="907" > 120 inkscape:window-x="405" > 121 inkscape:window-y="31" > 122 inkscape:window-maximized="0" > 123 fit-margin-top="0" > 124 fit-margin-left="0" > 125 fit-margin-right="0" > 126 fit-margin-bottom="0" /> > 127 <metadata > 128 id="metadata7"> > 129 <rdf:RDF> > 130 <cc:Work > 131 rdf:about=""> > 132 <dc:format>image/svg+xml</dc:format> > 133 <dc:type > 134 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> > 135 <dc:title /> > 136 </cc:Work> > 137 </rdf:RDF> > 138 </metadata> > 139 <g > 140 inkscape:label="Layer 1" > 141 inkscape:groupmode="layer" > 142 id="layer1" > 143 transform="translate(-88.36515,-238.40424)"> > 144 <text > 145 xml:space="preserve" > 146 style="font-size:18px;font-style:normal;font-weight:normal;line-height:12 > 147 x="119.1379" > 148 y="302.37936" > 149 id="text2985" > 150 sodipodi:linespacing="125%"><tspan > 151 sodipodi:role="line" > 152 id="tspan2987" > 153 x="119.1379" > 154 y="302.37936">New</tspan></text> > 155 <text > 156 xml:space="preserve" > 157 style="font-size:18px;font-style:normal;font-weight:normal;line-height:12 > 158 x="171.87106" > 159 y="404.91605" > 160 id="text2989" > 161 sodipodi:linespacing="125%"><tspan > 162 sodipodi:role="line" > 163 id="tspan2991" > 164 x="171.87106" > 165 y="404.91605">processing</tspan></text> > 166 <text > 167 xml:space="preserve" > 168 style="font-size:18px;font-style:normal;font-weight:normal;line-height:12 > 169 x="344.71866" > 170 y="408.8222" > 171 id="text2993" > 172 sodipodi:linespacing="125%"><tspan > 173 sodipodi:role="line" > 174 id="tspan2995" > 175 x="344.71866" > 176 y="408.8222">waiting</tspan></text> > 177 <text > 178 xml:space="preserve" > 179 style="font-size:18px;font-style:normal;font-weight:normal;line-height:12 > 180 x="175.77724" > 181 y="530.88977" > 182 id="text2997" > 183 sodipodi:linespacing="125%"><tspan > 184 sodipodi:role="line" > 185 id="tspan2999" > 186 x="175.77724" > 187 y="530.88977">done</tspan></text> > 188 <path > 189 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stro > 190 d="m 168.94145,296.52011 c 50.03998,8.38374 51.51168,48.28767 51.75662,85 > 191 id="path3001" > 192 inkscape:connector-curvature="0" > 193 sodipodi:nodetypes="cc" /> > 194 <path > 195 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stro > 196 d="m 222.64982,413.70493 c -1.71665,59.16383 -23.68191,54.14691 -24.41351 > 197 id="path3001-2" > 198 inkscape:connector-curvature="0" > 199 sodipodi:nodetypes="cc" /> > 200 <path > 201 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stro > 202 d="m 238.76406,415.04172 c 45.26369,68.23333 101.21533,61.78246 141.59833 > 203 id="path3001-2-0-7-7" > 204 inkscape:connector-curvature="0" > 205 sodipodi:nodetypes="cc" /> > 206 <path > 207 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stro > 208 d="M 379.38586,385.25271 C 334.12217,317.01938 278.17053,323.47025 237.78 > 209 id="path3001-2-0-7-7-1" > 210 inkscape:connector-curvature="0" > 211 sodipodi:nodetypes="cc" /> > 212 <rect > 213 style="opacity:0.17254902;fill:none;stroke:#000000;stroke-width:1;stroke- > 214 id="rect4335" > 215 width="381.82721" > 216 height="333.97675" > 217 x="88.86515" > 218 y="238.90424" /> > 219 </g> > 220 </svg>
Added docs/test-launch-state-diagram.svg version [6e88c87b22e4b389]
> 1 <?xml version="1.0" encoding="UTF-8" standalone="no"?> > 2 <!-- Created with Inkscape (http://www.inkscape.org/) --> > 3 > 4 <svg > 5 xmlns:dc="http://purl.org/dc/elements/1.1/" > 6 xmlns:cc="http://creativecommons.org/ns#" > 7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > 8 xmlns:svg="http://www.w3.org/2000/svg" > 9 xmlns="http://www.w3.org/2000/svg" > 10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" > 11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" > 12 width="382.82721" > 13 height="334.97675" > 14 id="svg2" > 15 version="1.1" > 16 inkscape:version="0.48.2 r9819" > 17 sodipodi:docname="test-launch-state-diagram.svg"> > 18 <defs > 19 id="defs4"> > 20 <marker > 21 inkscape:stockid="Arrow1Lend" > 22 orient="auto" > 23 refY="0" > 24 refX="0" > 25 id="Arrow1Lend" > 26 style="overflow:visible"> > 27 <path > 28 id="path3777" > 29 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 30 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 31 transform="matrix(-0.8,0,0,-0.8,-10,0)" > 32 inkscape:connector-curvature="0" /> > 33 </marker> > 34 <marker > 35 inkscape:stockid="Arrow1Lend" > 36 orient="auto" > 37 refY="0" > 38 refX="0" > 39 id="Arrow1Lend-8" > 40 style="overflow:visible"> > 41 <path > 42 inkscape:connector-curvature="0" > 43 id="path3777-9" > 44 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 45 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 46 transform="matrix(-0.8,0,0,-0.8,-10,0)" /> > 47 </marker> > 48 <marker > 49 inkscape:stockid="Arrow1Lend" > 50 orient="auto" > 51 refY="0" > 52 refX="0" > 53 id="Arrow1Lend-9" > 54 style="overflow:visible"> > 55 <path > 56 inkscape:connector-curvature="0" > 57 id="path3777-5" > 58 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 59 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 60 transform="matrix(-0.8,0,0,-0.8,-10,0)" /> > 61 </marker> > 62 <marker > 63 inkscape:stockid="Arrow1Lend" > 64 orient="auto" > 65 refY="0" > 66 refX="0" > 67 id="Arrow1Lend-4" > 68 style="overflow:visible"> > 69 <path > 70 inkscape:connector-curvature="0" > 71 id="path3777-8" > 72 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 73 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 74 transform="matrix(-0.8,0,0,-0.8,-10,0)" /> > 75 </marker> > 76 <marker > 77 inkscape:stockid="Arrow1Lend" > 78 orient="auto" > 79 refY="0" > 80 refX="0" > 81 id="Arrow1Lend-7" > 82 style="overflow:visible"> > 83 <path > 84 inkscape:connector-curvature="0" > 85 id="path3777-2" > 86 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 87 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 88 transform="matrix(-0.8,0,0,-0.8,-10,0)" /> > 89 </marker> > 90 <marker > 91 inkscape:stockid="Arrow1Lend" > 92 orient="auto" > 93 refY="0" > 94 refX="0" > 95 id="Arrow1Lend-2" > 96 style="overflow:visible"> > 97 <path > 98 inkscape:connector-curvature="0" > 99 id="path3777-26" > 100 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 101 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 102 transform="matrix(-0.8,0,0,-0.8,-10,0)" /> > 103 </marker> > 104 <marker > 105 inkscape:stockid="Arrow1Lend" > 106 orient="auto" > 107 refY="0" > 108 refX="0" > 109 id="Arrow1Lend-5" > 110 style="overflow:visible"> > 111 <path > 112 id="path3777-97" > 113 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 114 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 115 transform="matrix(-0.8,0,0,-0.8,-10,0)" > 116 inkscape:connector-curvature="0" /> > 117 </marker> > 118 <marker > 119 inkscape:stockid="Arrow1Lend" > 120 orient="auto" > 121 refY="0" > 122 refX="0" > 123 id="Arrow1Lend-88" > 124 style="overflow:visible"> > 125 <path > 126 id="path3777-50" > 127 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 128 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 129 transform="matrix(-0.8,0,0,-0.8,-10,0)" > 130 inkscape:connector-curvature="0" /> > 131 </marker> > 132 <marker > 133 inkscape:stockid="Arrow1Lend" > 134 orient="auto" > 135 refY="0" > 136 refX="0" > 137 id="Arrow1Lend-85" > 138 style="overflow:visible"> > 139 <path > 140 id="path3777-6" > 141 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 142 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 143 transform="matrix(-0.8,0,0,-0.8,-10,0)" > 144 inkscape:connector-curvature="0" /> > 145 </marker> > 146 <marker > 147 inkscape:stockid="Arrow1Lend" > 148 orient="auto" > 149 refY="0" > 150 refX="0" > 151 id="Arrow1Lend-44" > 152 style="overflow:visible"> > 153 <path > 154 id="path3777-7" > 155 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 156 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 157 transform="matrix(-0.8,0,0,-0.8,-10,0)" > 158 inkscape:connector-curvature="0" /> > 159 </marker> > 160 <marker > 161 inkscape:stockid="Arrow1Lend" > 162 orient="auto" > 163 refY="0" > 164 refX="0" > 165 id="Arrow1Lend-75" > 166 style="overflow:visible"> > 167 <path > 168 id="path3777-96" > 169 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 170 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 171 transform="matrix(-0.8,0,0,-0.8,-10,0)" > 172 inkscape:connector-curvature="0" /> > 173 </marker> > 174 <marker > 175 inkscape:stockid="Arrow1Lend" > 176 orient="auto" > 177 refY="0" > 178 refX="0" > 179 id="Arrow1Lend-57" > 180 style="overflow:visible"> > 181 <path > 182 id="path3777-4" > 183 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 184 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 185 transform="matrix(-0.8,0,0,-0.8,-10,0)" > 186 inkscape:connector-curvature="0" /> > 187 </marker> > 188 <marker > 189 inkscape:stockid="Arrow1Lend" > 190 orient="auto" > 191 refY="0" > 192 refX="0" > 193 id="Arrow1Lend-59" > 194 style="overflow:visible"> > 195 <path > 196 id="path3777-75" > 197 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 198 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 199 transform="matrix(-0.8,0,0,-0.8,-10,0)" > 200 inkscape:connector-curvature="0" /> > 201 </marker> > 202 <marker > 203 inkscape:stockid="Arrow1Lend" > 204 orient="auto" > 205 refY="0" > 206 refX="0" > 207 id="Arrow1Lend-0" > 208 style="overflow:visible"> > 209 <path > 210 id="path3777-48" > 211 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 212 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 213 transform="matrix(-0.8,0,0,-0.8,-10,0)" > 214 inkscape:connector-curvature="0" /> > 215 </marker> > 216 <marker > 217 inkscape:stockid="Arrow1Lend" > 218 orient="auto" > 219 refY="0" > 220 refX="0" > 221 id="Arrow1Lend-89" > 222 style="overflow:visible"> > 223 <path > 224 id="path3777-77" > 225 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" > 226 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:n > 227 transform="matrix(-0.8,0,0,-0.8,-10,0)" > 228 inkscape:connector-curvature="0" /> > 229 </marker> > 230 </defs> > 231 <sodipodi:namedview > 232 id="base" > 233 pagecolor="#ffffff" > 234 bordercolor="#666666" > 235 borderopacity="1.0" > 236 inkscape:pageopacity="0.0" > 237 inkscape:pageshadow="2" > 238 inkscape:zoom="1.4481878" > 239 inkscape:cx="234.81903" > 240 inkscape:cy="169.96344" > 241 inkscape:document-units="px" > 242 inkscape:current-layer="layer1" > 243 showgrid="false" > 244 inkscape:window-width="973" > 245 inkscape:window-height="687" > 246 inkscape:window-x="272" > 247 inkscape:window-y="30" > 248 inkscape:window-maximized="0" > 249 fit-margin-top="0" > 250 fit-margin-left="0" > 251 fit-margin-right="0" > 252 fit-margin-bottom="0" /> > 253 <metadata > 254 id="metadata7"> > 255 <rdf:RDF> > 256 <cc:Work > 257 rdf:about=""> > 258 <dc:format>image/svg+xml</dc:format> > 259 <dc:type > 260 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> > 261 <dc:title /> > 262 </cc:Work> > 263 </rdf:RDF> > 264 </metadata> > 265 <g > 266 inkscape:label="Layer 1" > 267 inkscape:groupmode="layer" > 268 id="layer1" > 269 transform="translate(-88.36515,-238.40424)"> > 270 <text > 271 xml:space="preserve" > 272 style="font-size:8.85538006px;font-style:normal;font-weight:normal;line-h > 273 x="135.60928" > 274 y="298.95386" > 275 id="text2985" > 276 sodipodi:linespacing="125%" > 277 transform="scale(1.0060888,0.99394803)"><tspan > 278 sodipodi:role="line" > 279 id="tspan2987" > 280 x="135.60928" > 281 y="298.95386">get test</tspan></text> > 282 <path > 283 style="fill:none;stroke:#000000;stroke-width:0.6175037px;stroke-linecap:b > 284 d="m 176.36623,295.35828 c 59.16525,-0.58879 77.47792,18.54001 82.13592,3 > 285 id="path3001" > 286 inkscape:connector-curvature="0" > 287 sodipodi:nodetypes="cc" /> > 288 <rect > 289 style="opacity:0.17254902;fill:none;stroke:#000000;stroke-width:1;stroke- > 290 id="rect4335" > 291 width="381.82721" > 292 height="333.97675" > 293 x="88.86515" > 294 y="238.90424" /> > 295 <text > 296 xml:space="preserve" > 297 style="font-size:8.85538006px;font-style:normal;font-weight:normal;line-h > 298 x="126.26069" > 299 y="288.2449" > 300 id="text2985-7" > 301 sodipodi:linespacing="125%" > 302 transform="scale(1.0060888,0.99394804)"><tspan > 303 sodipodi:role="line" > 304 id="tspan2987-2" > 305 x="126.26069" > 306 y="288.2449">(Tests list)</tspan></text> > 307 <text > 308 xml:space="preserve" > 309 style="font-size:8.85538006px;font-style:normal;font-weight:normal;line-h > 310 x="234.48593" > 311 y="344.24658" > 312 id="text2985-0" > 313 sodipodi:linespacing="125%" > 314 transform="scale(1.0060888,0.99394804)"><tspan > 315 sodipodi:role="line" > 316 id="tspan2987-6" > 317 x="234.48593" > 318 y="344.24658">items list?</tspan></text> > 319 <text > 320 xml:space="preserve" > 321 style="font-size:8.85538006px;font-style:normal;font-weight:normal;line-h > 322 x="230.46114" > 323 y="357.51541" > 324 id="text2985-5" > 325 sodipodi:linespacing="125%" > 326 transform="scale(1.0060888,0.99394804)"><tspan > 327 sodipodi:role="line" > 328 id="tspan2987-9" > 329 x="230.46114" > 330 y="357.51541">string</tspan></text> > 331 <text > 332 xml:space="preserve" > 333 style="font-size:8.85538006px;font-style:normal;font-weight:normal;line-h > 334 x="268.80106" > 335 y="357.02417" > 336 id="text2985-4" > 337 sodipodi:linespacing="125%" > 338 transform="scale(1.0060888,0.99394804)"><tspan > 339 sodipodi:role="line" > 340 id="tspan2987-90" > 341 x="268.80106" > 342 y="357.02417">proc</tspan></text> > 343 <text > 344 xml:space="preserve" > 345 style="font-size:8.85538006px;font-style:normal;font-weight:normal;line-h > 346 x="303.25842" > 347 y="356.04172" > 348 id="text2985-9" > 349 sodipodi:linespacing="125%" > 350 transform="scale(1.0060888,0.99394804)"><tspan > 351 sodipodi:role="line" > 352 id="tspan2987-1" > 353 x="303.25842" > 354 y="356.04172">list</tspan></text> > 355 <text > 356 xml:space="preserve" > 357 style="font-size:8.85538006px;font-style:normal;font-weight:normal;line-h > 358 x="199.40099" > 359 y="357.0242" > 360 id="text2985-77" > 361 sodipodi:linespacing="125%" > 362 transform="scale(1.0060888,0.99394804)"><tspan > 363 sodipodi:role="line" > 364 x="199.40099" > 365 y="357.0242" > 366 id="tspan3116">#f</tspan></text> > 367 <path > 368 style="fill:none;stroke:#000000;stroke-width:0.6175037px;stroke-linecap:b > 369 d="m 208.18134,362.26964 c 5.9438,28.21915 -7.96935,38.07082 -9.1706,63.8 > 370 id="path3001-7" > 371 inkscape:connector-curvature="0" > 372 sodipodi:nodetypes="cc" /> > 373 <text > 374 xml:space="preserve" > 375 style="font-size:8.85538006px;font-style:normal;font-weight:normal;line-h > 376 x="157.41812" > 377 y="439.9064" > 378 id="text2985-4-6" > 379 sodipodi:linespacing="125%" > 380 transform="scale(1.0060888,0.99394804)"><tspan > 381 sodipodi:role="line" > 382 id="tspan2987-90-7" > 383 x="157.41812" > 384 y="439.9064">all prerequisites met?</tspan></text> > 385 <text > 386 xml:space="preserve" > 387 style="font-size:8.85538006px;font-style:normal;font-weight:normal;line-h > 388 x="171.97758" > 389 y="451.69623" > 390 id="text2985-4-2" > 391 sodipodi:linespacing="125%" > 392 transform="scale(1.0060888,0.99394804)"><tspan > 393 sodipodi:role="line" > 394 id="tspan2987-90-9" > 395 x="171.97758" > 396 y="451.69623">no</tspan></text> > 397 <text > 398 xml:space="preserve" > 399 style="font-size:8.85538006px;font-style:normal;font-weight:normal;line-h > 400 x="208.86153" > 401 y="451.20499" > 402 id="text2985-4-3" > 403 sodipodi:linespacing="125%" > 404 transform="scale(1.0060888,0.99394804)"><tspan > 405 sodipodi:role="line" > 406 id="tspan2987-90-90" > 407 x="208.86153" > 408 y="451.20499">yes</tspan></text> > 409 <path > 410 style="fill:none;stroke:#000000;stroke-width:0.6175037px;stroke-linecap:b > 411 d="m 171.17455,448.19855 c -60.9492,14.05932 -70.95619,-114.75772 -41.396 > 412 id="path3001-7-9" > 413 inkscape:connector-curvature="0" > 414 sodipodi:nodetypes="cc" /> > 415 <text > 416 xml:space="preserve" > 417 style="font-size:8.85538006px;font-style:normal;font-weight:normal;line-h > 418 x="199.94124" > 419 y="535.69879" > 420 id="text2985-4-3-6" > 421 sodipodi:linespacing="125%" > 422 transform="scale(1.0060888,0.99394804)"><tspan > 423 sodipodi:role="line" > 424 id="tspan2987-90-90-3" > 425 x="199.94124" > 426 y="535.69879">launch and drop test record</tspan></text> > 427 <path > 428 style="fill:none;stroke:#000000;stroke-width:0.6175037px;stroke-linecap:b > 429 d="m 218.04848,453.08125 c -0.40371,25.28953 25.23302,35.62947 27.93793,6 > 430 id="path3001-7-1" > 431 inkscape:connector-curvature="0" > 432 sodipodi:nodetypes="cc" /> > 433 <path > 434 style="fill:none;stroke:#000000;stroke-width:0.6175037px;stroke-linecap:b > 435 d="m 314.05701,358.60098 c 10.33823,35.05494 42.32247,37.09428 50.88663,2 > 436 id="path3001-7-1-6" > 437 inkscape:connector-curvature="0" > 438 sodipodi:nodetypes="cc" /> > 439 <text > 440 xml:space="preserve" > 441 style="font-size:8.85538006px;font-style:normal;font-weight:normal;line-h > 442 x="331.94305" > 443 y="344.87405" > 444 id="text2985-4-3-6-3" > 445 sodipodi:linespacing="125%" > 446 transform="scale(1.0060888,0.99394804)"><tspan > 447 sodipodi:role="line" > 448 id="tspan2987-90-90-3-1" > 449 x="331.94305" > 450 y="344.87405">create records</tspan><tspan > 451 sodipodi:role="line" > 452 x="331.94305" > 453 y="355.94327" > 454 id="tspan3297">and add to tests list</tspan></text> > 455 <path > 456 style="fill:none;stroke:#000000;stroke-width:0.6175037px;stroke-linecap:b > 457 d="M 362.32596,330.83471 C 348.25067,277.51275 294.29939,275.64594 178.84 > 458 id="path3001-7-9-2" > 459 inkscape:connector-curvature="0" > 460 sodipodi:nodetypes="cc" /> > 461 <path > 462 style="fill:none;stroke:#000000;stroke-width:0.6175037px;stroke-linecap:b > 463 d="m 245.87987,358.35685 c 4.16667,48.51677 -23.10149,23.92638 -29.18967, > 464 id="path3001-7-18" > 465 inkscape:connector-curvature="0" > 466 sodipodi:nodetypes="cc" /> > 467 <path > 468 style="fill:none;stroke:#000000;stroke-width:0.6175037px;stroke-linecap:b > 469 d="m 282.50013,359.82166 c 3.50245,39.44937 26.69783,25.86407 26.96139,65 > 470 id="path3001-7-3" > 471 inkscape:connector-curvature="0" > 472 sodipodi:nodetypes="cc" /> > 473 <text > 474 xml:space="preserve" > 475 style="font-size:8.85538006px;font-style:normal;font-weight:normal;line-h > 476 x="281.47418" > 477 y="439.41516" > 478 id="text2985-4-3-8" > 479 sodipodi:linespacing="125%" > 480 transform="scale(1.0060888,0.99394804)"><tspan > 481 sodipodi:role="line" > 482 x="281.47418" > 483 y="439.41516" > 484 id="tspan3392">waiton prerequites met?</tspan><tspan > 485 sodipodi:role="line" > 486 x="281.47418" > 487 y="447.63828" > 488 id="tspan3396" > 489 style="font-size:6px">(waitonbyitem prerequisites</tspan><tspan > 490 sodipodi:role="line" > 491 x="281.47418" > 492 y="455.13828" > 493 id="tspan3398" > 494 style="font-size:6px">do not have to be met)</tspan></text> > 495 <text > 496 xml:space="preserve" > 497 style="font-size:8.85538006px;font-style:normal;font-weight:normal;line-h > 498 x="281.47418" > 499 y="467.41602" > 500 id="text2985-4-3-3" > 501 sodipodi:linespacing="125%" > 502 transform="scale(1.0060888,0.99394804)"><tspan > 503 sodipodi:role="line" > 504 id="tspan2987-90-90-33" > 505 x="281.47418" > 506 y="467.41602">yes</tspan></text> > 507 <text > 508 xml:space="preserve" > 509 style="font-size:8.85538006px;font-style:normal;font-weight:normal;line-h > 510 x="333.83432" > 511 y="467.78305" > 512 id="text2985-4-2-8" > 513 sodipodi:linespacing="125%" > 514 transform="scale(1.0060888,0.99394804)"><tspan > 515 sodipodi:role="line" > 516 id="tspan2987-90-9-6" > 517 x="333.83432" > 518 y="467.78305">no</tspan></text> > 519 <rect > 520 style="opacity:0.17254902;fill:none;stroke:#000000;stroke-width:1;stroke- > 521 id="rect3442" > 522 width="133.29773" > 523 height="13.183292" > 524 x="191.19385" > 525 y="343.89999" /> > 526 <rect > 527 style="opacity:0.17254902;fill:none;stroke:#000000;stroke-width:1;stroke- > 528 id="rect3444" > 529 width="68.357811" > 530 height="14.648103" > 531 x="163.85072" > 532 y="438.13614" /> > 533 <rect > 534 style="opacity:0.17254902;fill:none;stroke:#000000;stroke-width:1;stroke- > 535 id="rect3446" > 536 width="79.588028" > 537 height="14.648103" > 538 x="276.64111" > 539 y="455.22559" /> > 540 <path > 541 style="fill:none;stroke:#000000;stroke-width:0.6175037px;stroke-linecap:b > 542 d="m 291.59658,468.46176 c -0.40371,25.28953 -41.65998,22.44618 -38.95507 > 543 id="path3001-7-1-8" > 544 inkscape:connector-curvature="0" > 545 sodipodi:nodetypes="cc" /> > 546 <path > 547 style="fill:none;stroke:#000000;stroke-width:0.6175037px;stroke-linecap:b > 548 d="M 352.59293,462.5344 C 463.88305,449.42673 457.66893,360.39971 423.602 > 549 id="path3001-7-1-6-6" > 550 inkscape:connector-curvature="0" > 551 sodipodi:nodetypes="csc" /> > 552 </g> > 553 </svg>
Modified items.scm from [efcc75596f0f06d5] to [d370c880ec95b9d4].
115 (set! res (append res (list item))) 115 (set! res (append res (list item))) 116 (loop (+ indx 1) 116 (loop (+ indx 1) 117 '() 117 '() 118 #f))) 118 #f))) 119 res))) 119 res))) 120 ;; Nope, not now, return null as of 6/6/2011 120 ;; Nope, not now, return null as of 6/6/2011 121 121 > 122 (define (check-valid-items class item) > 123 (let ((valid-values (let ((s (config-lookup *configdat* "validvalues" class))) > 124 (if s (string-split s) #f)))) > 125 (if valid-values > 126 (if (member item valid-values) > 127 item #f) > 128 item))) > 129 > 130 (define (items:get-items-from-config tconfig) > 131 (let* (;; db is always at *toppath*/db/megatest.db > 132 (items (hash-table-ref/default tconfig "items" '())) > 133 (itemstable (hash-table-ref/default tconfig "itemstable" '()))) > 134 (debug:print 5 "items: " items " itemstable: " itemstable) > 135 (set! items (map (lambda (item) > 136 (if (procedure? (cadr item)) > 137 (list (car item)((cadr item))) > 138 item)) > 139 items)) > 140 (set! itemstable (map (lambda (item) > 141 (if (procedure? (cadr item)) > 142 (list (car item)((cadr item))) > 143 item)) > 144 itemstable)) > 145 (if (or (not (null? items))(not (null? itemstable))) > 146 (append (item-assoc->item-list items) > 147 (item-table->item-list itemstable)) > 148 '(())))) 122 149 123 ;; (pp (item-assoc->item-list itemdat)) 150 ;; (pp (item-assoc->item-list itemdat)) 124 151 125 152 126 153
Modified key_records.scm from [46a3b150eaee7941] to [9216cfc5874e5085].
17 17 18 (define-inline (keys->key/field keys . additional) 18 (define-inline (keys->key/field keys . additional) 19 (string-join (map (lambda (k)(conc (key:get-fieldname k) " " 19 (string-join (map (lambda (k)(conc (key:get-fieldname k) " " 20 (key:get-fieldtype k))) 20 (key:get-fieldtype k))) 21 (append keys additional)) ",")) 21 (append keys additional)) ",")) 22 22 23 (define-inline (item-list->path itemdat) 23 (define-inline (item-list->path itemdat) > 24 (if (list? itemdat) 24 (string-intersperse (map cadr itemdat) "/")) | 25 (string-intersperse (map cadr itemdat) "/") > 26 "")) 25 27
Modified launch.scm from [1748d732463d7f78] to [a165297934aef0f4].
166 (logpro-used #f)) 166 (logpro-used #f)) 167 ;; NB// can safely assume we 167 ;; NB// can safely assume we 168 (debug:print 4 "ezsteps:\n st 168 (debug:print 4 "ezsteps:\n st 169 " stepparms: " s 169 " stepparms: " s 170 170 171 (if (file-exists? (conc stepn 171 (if (file-exists? (conc stepn 172 172 173 ;; first source the previous | 173 ;; ;; first source the previo 174 (let ((prev-env (conc ".ezste | 174 ;; (let ((prev-env (conc ".ez > 175 ;; 175 (if (and prevstep (file-exi | 176 ;; (if (and prevstep (file- 176 (set! script (conc scri | 177 ;; (set! script (conc s 177 178 178 ;; call the command using mt_ 179 ;; call the command using mt_ 179 (set! script (conc script ";m | 180 (set! script (conc "mt_ezstep 180 181 181 (debug:print 4 "script: " scr 182 (debug:print 4 "script: " scr 182 183 183 (teststep-set-status! db run- 184 (teststep-set-status! db run- 184 ;; now launch 185 ;; now launch 185 (let ((pid (process-run scrip 186 (let ((pid (process-run scrip 186 (let processloop ((i 0)) 187 (let processloop ((i 0)) ................................................................................................................................................................................ 214 ( 215 ( 215 (debug:print 4 "Exit valu 216 (debug:print 4 "Exit valu 216 " this-step- 217 " this-step- 217 " next-statu 218 " next-statu 218 (case next-status 219 (case next-status 219 ((warn) 220 ((warn) 220 (set! rollup-status 2) 221 (set! rollup-status 2) 221 (test-set-status! db r | 222 ;; (test-set-status! d > 223 (test-set-status! db r 222 (if 224 (if 223 #f)) 225 #f)) 224 ((pass) 226 ((pass) 225 (test-set-status! db r | 227 ;; (test-set-status! d > 228 (test-set-status! db r 226 (else ;; 'fail 229 (else ;; 'fail 227 (set! rollup-status 1) 230 (set! rollup-status 1) 228 (test-set-status! db r | 231 ;; (test-set-status! d > 232 (test-set-status! db r > 233 )))) 229 (if (and (steprun-good? logpr 234 (if (and (steprun-good? logpr 230 (not (null? tal))) 235 (not (null? tal))) 231 (loop (car tal) (cdr tal) 236 (loop (car tal) (cdr tal) 232 (debug:print 4 "WARNING: a prior st 237 (debug:print 4 "WARNING: a prior st 233 (monitorjob (lambda () 238 (monitorjob (lambda () 234 (let* ((start-seconds (current-seconds)) 239 (let* ((start-seconds (current-seconds)) 235 (calc-minutes (lambda () 240 (calc-minutes (lambda () ................................................................................................................................................................................ 372 (db:get-header run-info) 377 (db:get-header run-info) 373 "runname")) 378 "runname")) 374 (key-vals (get-key-vals db run-id)) 379 (key-vals (get-key-vals db run-id)) 375 (key-str (string-intersperse key-vals "/")) 380 (key-str (string-intersperse key-vals "/")) 376 (dfullp (conc disk-path "/" key-str "/" runname "/" testname 381 (dfullp (conc disk-path "/" key-str "/" runname "/" testname 377 item-path)) 382 item-path)) 378 (toptest-path (conc disk-path "/" key-str "/" runname "/" testname)) 383 (toptest-path (conc disk-path "/" key-str "/" runname "/" testname)) 379 (runsdir (config-lookup *configdat* "setup" "runsdir")) | 384 (linktree (let ((rd (config-lookup *configdat* "setup" "linktree"))) 380 (lnkpath (conc (if runsdir runsdir (conc *toppath* "/runs")) | 385 (if rd rd (conc *toppath* "/runs")))) 381 "/" key-str "/" runname item-path))) | 386 (lnkpath (conc linktree "/" key-str "/" runname item-path))) > 387 (if (not (file-exists? linktree)) > 388 (begin > 389 (debug:print 0 "WARNING: linktree did not exist! Creating it now at " > 390 (system (conc "mkdir -p " linktree)))) 382 ;; since this is an iterated test this is as good a place as any to 391 ;; since this is an iterated test this is as good a place as any to 383 ;; update the toptest record with its location rundir 392 ;; update the toptest record with its location rundir 384 (if (not (equal? item-path "")) 393 (if (not (equal? item-path "")) 385 (db:test-set-rundir! db run-id testname "" toptest-path)) 394 (db:test-set-rundir! db run-id testname "" toptest-path)) 386 (debug:print 2 "Setting up test run area") 395 (debug:print 2 "Setting up test run area") 387 (debug:print 2 " - creating run area in " dfullp) 396 (debug:print 2 " - creating run area in " dfullp) 388 (system (conc "mkdir -p " dfullp)) 397 (system (conc "mkdir -p " dfullp)) 389 (debug:print 2 " - creating link from " dfullp "/" testname " to " lnkpath) 398 (debug:print 2 " - creating link from " dfullp "/" testname " to " lnkpath) 390 (system (conc "mkdir -p " lnkpath)) 399 (system (conc "mkdir -p " lnkpath)) 391 400 392 ;; I suspect this section was deleting test directories under some | 401 ;; I suspect this section was deleting test directories under some 393 ;; wierd sitations | 402 ;; wierd sitations? This doesn't make sense - reenabling the rm -f 394 403 395 ;; (if (file-exists? (conc lnkpath "/" testname)) | 404 (if (file-exists? (conc lnkpath "/" testname)) 396 ;; (system (conc "rm -f " lnkpath "/" testname))) | 405 (system (conc "rm -f " lnkpath "/" testname))) 397 (system (conc "ln -sf " dfullp " " lnkpath "/" testname)) 406 (system (conc "ln -sf " dfullp " " lnkpath "/" testname)) 398 (if (directory? dfullp) 407 (if (directory? dfullp) 399 (begin 408 (begin 400 (let* ((cmd (conc "rsync -av" (if (> *verbosity* 1) "" "q") " " tes 409 (let* ((cmd (conc "rsync -av" (if (> *verbosity* 1) "" "q") " " tes 401 (status (system cmd))) 410 (status (system cmd))) 402 (if (not (eq? status 0)) 411 (if (not (eq? status 0)) 403 (debug:print 2 "ERROR: problem with running \"" cmd "\""))) 412 (debug:print 2 "ERROR: problem with running \"" cmd "\"")))
Deleted matrix.scm version [80b32addb509bfbd]
1 (require-library iup canvas-draw canvas-draw-iup) < 2 < 3 (module matrix-test < 4 (matrix-dialog) < 5 (import < 6 scheme chicken extras < 7 iup canvas-draw canvas-draw-iup < 8 (only canvas-draw-base pointer->canvas)) < 9 < 10 (define ncols 8) < 11 (define nlins 8) < 12 (define width 32) < 13 (define height 32) < 14 < 15 ;; (define (render-cell handle i j x-min x-max y-min y-max canvas) < 16 ;; (set! (canvas-foreground canvas) < 17 ;; (if (or (and (odd? i) (odd? j)) (and (even? i) (even? j))) < 18 ;; #xffffff < 19 ;; #x000000)) < 20 ;; (canvas-box! canvas x-min x-max y-min y-max)) < 21 < 22 (define matrix-dialog < 23 (dialog < 24 #:title "Matrix Test" < 25 (let ((mat (matrix < 26 ; #:expand "YES" < 27 ; #:scrollbar "YES" < 28 #:numcol ncols < 29 #:numlin nlins < 30 #:numcol-visible ncols < 31 #:numlin-visible nlins < 32 #:click-cb (lambda (obj lin col status) < 33 (print "obj: " obj " lin: " lin " col: " col " statu < 34 (attribute-set! mat "0:0" "Testing") < 35 mat))) < 36 < 37 ) ;; end module < 38 < 39 (import < 40 (only iup show main-loop) < 41 matrix-test) < 42 < 43 (show matrix-dialog) < 44 (main-loop) <
Modified megatest-version.scm from [c9e5e7d31e1201ff] to [27dcca54210e5a68].
1 ;; Always use two digit decimal 1 ;; Always use two digit decimal 2 ;; 1.01, 1.02...1.10,1.11 ... 1.99,2.00.. 2 ;; 1.01, 1.02...1.10,1.11 ... 1.99,2.00.. 3 3 4 (declare (unit megatest-version)) 4 (declare (unit megatest-version)) 5 5 6 (define megatest-version 1.34) | 6 (define megatest-version 1.36) 7 7
Modified megatest.scm from [1013e8e76b528b6b] to [5624d22f1c63648d].
89 -rollup : fill run (set by :runname) with latest test(s) from 89 -rollup : fill run (set by :runname) with latest test(s) from 90 prior runs with same keys 90 prior runs with same keys 91 -update-meta : update the tests metadata for all tests 91 -update-meta : update the tests metadata for all tests 92 -env2file fname : write the environment to fname.csh and fname.sh 92 -env2file fname : write the environment to fname.csh and fname.sh 93 -setvars VAR1=val1,VAR2=val2 : Add environment variables to a run NB// these a 93 -setvars VAR1=val1,VAR2=val2 : Add environment variables to a run NB// these a 94 overwritten by values set in config files. 94 overwritten by values set in config files. 95 Spreadsheet generation 95 Spreadsheet generation 96 -extract-ods : extract an open document spreadsheet from the databa | 96 -extract-ods fname.ods : extract an open document spreadsheet from the databa 97 -pathmod path : insert path, i.e. path/runame/itempath/logfile.html 97 -pathmod path : insert path, i.e. path/runame/itempath/logfile.html 98 will clear the field if no rundir/testname/itempath/ 98 will clear the field if no rundir/testname/itempath/ 99 if it contains forward slashes the path will be conv 99 if it contains forward slashes the path will be conv 100 to windows style 100 to windows style 101 101 102 Helpers 102 Helpers 103 -runstep stepname ... : take remaining params as comand and execute as stepn 103 -runstep stepname ... : take remaining params as comand and execute as stepn ................................................................................................................................................................................ 231 (args:get-arg ":runname") 231 (args:get-arg ":runname") 232 (args:get-arg "-testpatt") 232 (args:get-arg "-testpatt") 233 (args:get-arg "-itempatt"))) 233 (args:get-arg "-itempatt"))) 234 (sqlite3:finalize! db) 234 (sqlite3:finalize! db) 235 (set! *didsomething* #t))))) 235 (set! *didsomething* #t))))) 236 236 237 (if (args:get-arg "-remove-runs") 237 (if (args:get-arg "-remove-runs") > 238 (general-run-call > 239 "-remove-runs" > 240 "remove runs" > 241 (lambda (db target runname keys keynames keyvallst) 238 (remove-runs)) | 242 (remove-runs)))) 239 243 240 ;;====================================================================== 244 ;;====================================================================== 241 ;; Query runs 245 ;; Query runs 242 ;;====================================================================== 246 ;;====================================================================== 243 247 244 (if (args:get-arg "-list-runs") 248 (if (args:get-arg "-list-runs") 245 (let* ((db (begin 249 (let* ((db (begin ................................................................................................................................................................................ 322 ;; process deferred tasks per above steps 326 ;; process deferred tasks per above steps 323 327 324 ;; run all tests are are Not COMPLETED and PASS or CHECK 328 ;; run all tests are are Not COMPLETED and PASS or CHECK 325 (if (args:get-arg "-runall") 329 (if (args:get-arg "-runall") 326 (general-run-call 330 (general-run-call 327 "-runall" 331 "-runall" 328 "run all tests" 332 "run all tests" 329 (lambda (db keys keynames keyvallst) | 333 (lambda (db target runname keys keynames keyvallst) 330 (let* ((test-names (get-all-legal-tests))) ;; "PROD" is ignored for now | 334 (runs:run-tests db 331 (debug:print 1 "INFO: Attempting to start the following tests...") | 335 target 332 (debug:print 1 " " (string-intersperse test-names ",")) | 336 runname > 337 (args:get-arg "-testpatt") > 338 (args:get-arg "-itempatt") > 339 user > 340 (make-hash-table))))) > 341 > 342 ;;====================================================================== > 343 ;; run one test > 344 ;;====================================================================== > 345 > 346 ;; 1. find the config file > 347 ;; 2. change to the test directory > 348 ;; 3. update the db with "test started" status, set running host > 349 ;; 4. process launch the test > 350 ;; - monitor the process, update stats in the db every 2^n minutes > 351 ;; 5. as the test proceeds internally it calls megatest as each step is > 352 ;; started and completed > 353 ;; - step started, timestamp > 354 ;; - step completed, exit status, timestamp > 355 ;; 6. test phone home > 356 ;; - if test run time > allowed run time then kill job > 357 ;; - if cannot access db > allowed disconnect time then kill job > 358 > 359 (if (args:get-arg "-runtests") > 360 (general-run-call > 361 "-runtests" > 362 "run a test" > 363 (lambda (db target runname keys keynames keyvallst) 333 (run-tests db test-names))))) | 364 (runs:run-tests db > 365 target > 366 runname > 367 (args:get-arg "-runtests") > 368 (args:get-arg "-itempatt") > 369 user > 370 (make-hash-table))))) 334 371 335 ;;====================================================================== 372 ;;====================================================================== 336 ;; Rollup into a run 373 ;; Rollup into a run 337 ;;====================================================================== 374 ;;====================================================================== 338 (if (args:get-arg "-rollup") 375 (if (args:get-arg "-rollup") 339 (general-run-call 376 (general-run-call 340 "-rollup" 377 "-rollup" ................................................................................................................................................................................ 350 ;; Extract a spreadsheet from the runs database 387 ;; Extract a spreadsheet from the runs database 351 ;;====================================================================== 388 ;;====================================================================== 352 389 353 (if (args:get-arg "-extract-ods") 390 (if (args:get-arg "-extract-ods") 354 (general-run-call 391 (general-run-call 355 "-extract-ods" 392 "-extract-ods" 356 "Make ods spreadsheet" 393 "Make ods spreadsheet" 357 (lambda (db keys keynames keyvallst) | 394 (lambda (db target runname keys keynames keyvallst) 358 (let ((outputfile (args:get-arg "-extract-ods")) 395 (let ((outputfile (args:get-arg "-extract-ods")) 359 (runspatt (args:get-arg ":runname")) 396 (runspatt (args:get-arg ":runname")) 360 (pathmod (args:get-arg "-pathmod")) 397 (pathmod (args:get-arg "-pathmod")) 361 (keyvalalist (keys->alist keys "%"))) 398 (keyvalalist (keys->alist keys "%"))) > 399 (debug:print 2 "Extract ods, outputfile: " outputfile " runspatt: " run 362 (db:extract-ods-file db outputfile keyvalalist (if runspatt runspatt "% 400 (db:extract-ods-file db outputfile keyvalalist (if runspatt runspatt "% 363 401 364 ;;====================================================================== < 365 ;; run one test < 366 ;;====================================================================== < 367 < 368 ;; 1. find the config file < 369 ;; 2. change to the test directory < 370 ;; 3. update the db with "test started" status, set running host < 371 ;; 4. process launch the test < 372 ;; - monitor the process, update stats in the db every 2^n minutes < 373 ;; 5. as the test proceeds internally it calls megatest as each step is < 374 ;; started and completed < 375 ;; - step started, timestamp < 376 ;; - step completed, exit status, timestamp < 377 ;; 6. test phone home < 378 ;; - if test run time > allowed run time then kill job < 379 ;; - if cannot access db > allowed disconnect time then kill job < 380 < 381 (if (args:get-arg "-runtests") < 382 (general-run-call < 383 "-runtests" < 384 "run a test" < 385 (lambda (db keys keynames keyvallst) < 386 (let ((test-names (string-split (args:get-arg "-runtests") ","))) < 387 (run-tests db test-names))))) < 388 < 389 ;;====================================================================== 402 ;;====================================================================== 390 ;; execute the test 403 ;; execute the test 391 ;; - gets called on remote host 404 ;; - gets called on remote host 392 ;; - receives info from the -execute param 405 ;; - receives info from the -execute param 393 ;; - passes info to steps via MT_CMDINFO env var (future is to use a dot file 406 ;; - passes info to steps via MT_CMDINFO env var (future is to use a dot file 394 ;; - gathers host info and 407 ;; - gathers host info and 395 ;;====================================================================== 408 ;;======================================================================
Added monitor.scm version [6e7a5682b5e7ed80]
> 1 ;; Copyright 2006-2011, Matthew Welland. > 2 ;; > 3 ;; This program is made available under the GNU GPL version 2.0 or > 4 ;; greater. See the accompanying file COPYING for details. > 5 ;; > 6 ;; This program is distributed WITHOUT ANY WARRANTY; without even the > 7 ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR > 8 ;; PURPOSE. > 9 > 10 ;; strftime('%m/%d/%Y %H:%M:%S','now','localtime') > 11 > 12 (use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking) > 13 (import (prefix sqlite3 sqlite3:)) > 14 > 15 (declare (unit runs)) > 16 (declare (uses db)) > 17 (declare (uses common)) > 18 (declare (uses items)) > 19 (declare (uses runconfig)) > 20 > 21 (include "common_records.scm") > 22 (include "key_records.scm") > 23 (include "db_records.scm") > 24 (include "run_records.scm") > 25
Modified runs.scm from [1e2d7c663bc54155] to [6ee5dc7a4131aeb6].
14 (import (prefix sqlite3 sqlite3:)) 14 (import (prefix sqlite3 sqlite3:)) 15 15 16 (declare (unit runs)) 16 (declare (unit runs)) 17 (declare (uses db)) 17 (declare (uses db)) 18 (declare (uses common)) 18 (declare (uses common)) 19 (declare (uses items)) 19 (declare (uses items)) 20 (declare (uses runconfig)) 20 (declare (uses runconfig)) > 21 (declare (uses tests)) 21 22 22 (include "common_records.scm") 23 (include "common_records.scm") 23 (include "key_records.scm") 24 (include "key_records.scm") 24 (include "db_records.scm") 25 (include "db_records.scm") 25 (include "run_records.scm") 26 (include "run_records.scm") 26 < 27 ;; register a test run with the db < 28 (define (register-run db keys) ;; test-name) < 29 (let* ((keystr (keys->keystr keys)) < 30 (comma (if (> (length keys) 0) "," "")) < 31 (andstr (if (> (length keys) 0) " AND " "")) < 32 (valslots (keys->valslots keys)) ;; ?,?,? ... < 33 (keyvallst (keys->vallist keys)) ;; extracts the values from remainder < 34 (runname (get-with-default ":runname" #f)) < 35 (state (get-with-default ":state" "no")) < 36 (status (get-with-default ":status" "n/a")) < 37 (allvals (append (list runname state status user) keyvallst)) < 38 (qryvals (append (list runname) keyvallst)) < 39 (key=?str (string-intersperse (map (lambda (k)(conc (key:get-fieldname < 40 (debug:print 3 "keys: " keys " allvals: " allvals " keyvallst: " keyvallst) < 41 (debug:print 2 "NOTE: using key " (string-intersperse keyvallst "/") " for t < 42 (if (and runname (null? (filter (lambda (x)(not x)) keyvallst))) ;; there mu < 43 (let ((res #f)) < 44 (apply sqlite3:execute db (conc "INSERT OR IGNORE INTO runs (runname,s < 45 allvals) < 46 (apply sqlite3:for-each-row < 47 (lambda (id) < 48 (set! res id)) < 49 db < 50 (let ((qry (conc "SELECT id FROM runs WHERE (runname=? " andstr key=? < 51 ;(debug:print 4 "qry: " qry) < 52 qry) < 53 qryvals) < 54 (sqlite3:execute db "UPDATE runs SET state=?,status=? WHERE id=?;" sta < 55 res) < 56 (begin < 57 (debug:print 0 "ERROR: Called without all necessary keys") < 58 #f)))) < > 27 (include "test_records.scm") 59 28 60 ;; runs:get-runs-by-patt 29 ;; runs:get-runs-by-patt 61 ;; get runs by list of criteria 30 ;; get runs by list of criteria 62 ;; register a test run with the db 31 ;; register a test run with the db 63 ;; 32 ;; 64 ;; Use: (db-get-value-by-header (db:get-header runinfo)(db:get-row runinfo)) 33 ;; Use: (db-get-value-by-header (db:get-header runinfo)(db:get-row runinfo)) 65 ;; to extract info from the structure returned 34 ;; to extract info from the structure returned ................................................................................................................................................................................ 85 (lambda (a . r) 54 (lambda (a . r) 86 (set! res (cons (list->vector (cons a r)) res))) 55 (set! res (cons (list->vector (cons a r)) res))) 87 db 56 db 88 (conc "SELECT " keystr " FROM runs WHERE runname like ? " key-patt ";") 57 (conc "SELECT " keystr " FROM runs WHERE runname like ? " key-patt ";") 89 runnamepatt) 58 runnamepatt) 90 (vector header res))) 59 (vector header res))) 91 60 92 (define (register-test db run-id test-name item-path) < 93 (let ((item-paths (if (equal? item-path "") < 94 (list item-path) < 95 (list item-path "")))) < 96 (for-each < 97 (lambda (pth) < 98 (sqlite3:execute db "INSERT OR IGNORE INTO tests (run_id,testname,event_t < 99 run-id < 100 test-name < 101 pth < 102 ;; (conc "," (string-intersperse tags ",") ",") < 103 )) < 104 item-paths ))) < 105 < 106 ;; get the previous record for when this test was run where all keys match but r < 107 ;; returns #f if no such test found, returns a single test record if found < 108 (define (test:get-previous-test-run-record db run-id test-name item-path) < 109 (let* ((keys (db:get-keys db)) < 110 (selstr (string-intersperse (map (lambda (x)(vector-ref x 0)) keys) ", < 111 (qrystr (string-intersperse (map (lambda (x)(conc (vector-ref x 0) "=? < 112 (keyvals #f)) < 113 ;; first look up the key values from the run selected by run-id < 114 (sqlite3:for-each-row < 115 (lambda (a . b) < 116 (set! keyvals (cons a b))) < 117 db < 118 (conc "SELECT " selstr " FROM runs WHERE id=? ORDER BY event_time DESC;") r < 119 (if (not keyvals) < 120 #f < 121 (let ((prev-run-ids '())) < 122 (apply sqlite3:for-each-row < 123 (lambda (id) < 124 (set! prev-run-ids (cons id prev-run-ids))) < 125 db < 126 (conc "SELECT id FROM runs WHERE " qrystr " AND id != ?;") (app < 127 ;; for each run starting with the most recent look to see if there is < 128 ;; if found then return that matching test record < 129 (debug:print 4 "selstr: " selstr ", qrystr: " qrystr ", keyvals: " key < 130 (if (null? prev-run-ids) #f < 131 (let loop ((hed (car prev-run-ids)) < 132 (tal (cdr prev-run-ids))) < 133 (let ((results (db-get-tests-for-run db hed test-name item-path < 134 (debug:print 4 "Got tests for run-id " run-id ", test-name " t < 135 (if (and (null? results) < 136 (not (null? tal))) < 137 (loop (car tal)(cdr tal)) < 138 (if (null? results) #f < 139 (car results)))))))))) < 140 < 141 ;; get the previous records for when these tests were run where all keys match b < 142 ;; NB// Merge this with test:get-previous-test-run-records? This one looks for a < 143 ;; can use wildcards. < 144 (define (test:get-matching-previous-test-run-records db run-id test-name item-pa < 145 (let* ((keys (db:get-keys db)) < 146 (selstr (string-intersperse (map (lambda (x)(vector-ref x 0)) keys) ", < 147 (qrystr (string-intersperse (map (lambda (x)(conc (vector-ref x 0) "=? < 148 (keyvals #f) < 149 (tests-hash (make-hash-table))) < 150 ;; first look up the key values from the run selected by run-id < 151 (sqlite3:for-each-row < 152 (lambda (a . b) < 153 (set! keyvals (cons a b))) < 154 db < 155 (conc "SELECT " selstr " FROM runs WHERE id=? ORDER BY event_time DESC;") r < 156 (if (not keyvals) < 157 '() < 158 (let ((prev-run-ids '())) < 159 (apply sqlite3:for-each-row < 160 (lambda (id) < 161 (set! prev-run-ids (cons id prev-run-ids))) < 162 db < 163 (conc "SELECT id FROM runs WHERE " qrystr " AND id != ?;") (app < 164 ;; collect all matching tests for the runs then < 165 ;; extract the most recent test and return that. < 166 (debug:print 4 "selstr: " selstr ", qrystr: " qrystr ", keyvals: " key < 167 ", previous run ids found: " prev-run-ids) < 168 (if (null? prev-run-ids) '() ;; no previous runs? return null < 169 (let loop ((hed (car prev-run-ids)) < 170 (tal (cdr prev-run-ids))) < 171 (let ((results (db-get-tests-for-run db hed test-name item-path < 172 (debug:print 4 "Got tests for run-id " run-id ", test-name " t < 173 ", item-path " item-path " results: " (interspers < 174 ;; Keep only the youngest of any test/item combination < 175 (for-each < 176 (lambda (testdat) < 177 (let* ((full-testname (conc (db:test-get-testname testdat) < 178 (stored-test (hash-table-ref/default tests-hash fu < 179 (if (or (not stored-test) < 180 (and stored-test < 181 (> (db:test-get-event_time testdat)(db:test- < 182 ;; this test is younger, store it in the hash < 183 (hash-table-set! tests-hash full-testname testdat)))) < 184 results) < 185 (if (null? tal) < 186 (map cdr (hash-table->alist tests-hash)) ;; return a list < 187 (loop (car tal)(cdr tal)))))))))) < 188 < 189 (define (test-set-status! db run-id test-name state status itemdat-or-path comme < 190 (let* ((real-status status) < 191 (item-path (if (string? itemdat-or-path) itemdat-or-path (item-list-> < 192 (testdat (db:get-test-info db run-id test-name item-path)) < 193 (test-id (if testdat (db:test-get-id testdat) #f)) < 194 (otherdat (if dat dat (make-hash-table))) < 195 ;; before proceeding we must find out if the previous test (where all k < 196 ;; was WAIVED if this test is FAIL < 197 (waived (if (equal? status "FAIL") < 198 (let ((prev-test (test:get-previous-test-run-record db ru < 199 (if prev-test ;; true if we found a previous test in th < 200 (let ((prev-status (db:test-get-status prev-test) < 201 (prev-state (db:test-get-state prev-test) < 202 (prev-comment (db:test-get-comment prev-test) < 203 (debug:print 4 "prev-status " prev-status ", prev < 204 (if (and (equal? prev-state "COMPLETED") < 205 (equal? prev-status "WAIVED")) < 206 prev-comment ;; waived is either the comment < 207 #f)) < 208 #f)) < 209 #f))) < 210 (if waived (set! real-status "WAIVED")) < 211 (debug:print 4 "real-status " real-status ", waived " waived ", status " sta < 212 < 213 ;; update the primary record IF state AND status are defined < 214 (if (and state status) < 215 (sqlite3:execute db "UPDATE tests SET state=?,status=?,event_time=strfti < 216 state real-status run-id test-name item-path)) < 217 < 218 ;; if status is "AUTO" then call rollup < 219 (if (and test-id state status (or (equal? status "AUTO")(equal? status "AUTO < 220 (db:test-data-rollup db test-id status)) < 221 < 222 ;; add metadata (need to do this way to avoid SQL injection issues) < 223 < 224 ;; :first_err < 225 ;; (let ((val (hash-table-ref/default otherdat ":first_err" #f))) < 226 ;; (if val < 227 ;; (sqlite3:execute db "UPDATE tests SET first_err=? WHERE run_id=? AN < 228 ;; < 229 ;; ;; :first_warn < 230 ;; (let ((val (hash-table-ref/default otherdat ":first_warn" #f))) < 231 ;; (if val < 232 ;; (sqlite3:execute db "UPDATE tests SET first_warn=? WHERE run_id=? A < 233 < 234 (let ((category (hash-table-ref/default otherdat ":category" "")) < 235 (variable (hash-table-ref/default otherdat ":variable" "")) < 236 (value (hash-table-ref/default otherdat ":value" #f)) < 237 (expected (hash-table-ref/default otherdat ":expected" #f)) < 238 (tol (hash-table-ref/default otherdat ":tol" #f)) < 239 (units (hash-table-ref/default otherdat ":units" "")) < 240 (dcomment (hash-table-ref/default otherdat ":comment" ""))) < 241 (debug:print 4 < 242 "category: " category ", variable: " variable ", value: " val < 243 ", expected: " expected ", tol: " tol ", units: " units) < 244 (if (and value expected tol) ;; all three required < 245 (db:csv->test-data db test-id < 246 (conc category "," < 247 variable "," < 248 value "," < 249 expected "," < 250 tol "," < 251 units "," < 252 dcomment ",")))) < 253 < 254 ;; need to update the top test record if PASS or FAIL and this is a subtest < 255 (if (and (not (equal? item-path "")) < 256 (or (equal? status "PASS") < 257 (equal? status "WARN") < 258 (equal? status "FAIL") < 259 (equal? status "WAIVED") < 260 (equal? status "RUNNING"))) < 261 (begin < 262 (sqlite3:execute < 263 db < 264 "UPDATE tests < 265 SET fail_count=(SELECT count(id) FROM tests WHERE run_id=? AND test < 266 pass_count=(SELECT count(id) FROM tests WHERE run_id=? AND test < 267 WHERE run_id=? AND testname=? AND item_path='';" < 268 run-id test-name run-id test-name run-id test-name) < 269 (if (equal? status "RUNNING") ;; running takes priority over all other < 270 (sqlite3:execute db "UPDATE tests SET state=? WHERE run_id=? AND t < 271 (sqlite3:execute < 272 db < 273 "UPDATE tests < 274 SET state=CASE WHEN (SELECT count(id) FROM tests WHERE ru < 275 'RUNNING' < 276 ELSE 'COMPLETED' END, < 277 status=CASE WHEN fail_count > 0 THEN 'FAIL' WHEN pass_ < 278 WHERE run_id=? AND testname=? AND item_path='';" < 279 run-id test-name run-id test-name)))) < 280 (if (or (and (string? comment) < 281 (string-match (regexp "\\S+") comment)) < 282 waived) < 283 (sqlite3:execute db "UPDATE tests SET comment=? WHERE run_id=? AND testn < 284 (if waived waived comment) run-id test-name item-path)) < 285 )) < 286 < 287 (define (test-set-log! db run-id test-name itemdat logf) < 288 (let ((item-path (item-list->path itemdat))) < 289 (sqlite3:execute db "UPDATE tests SET final_logf=? WHERE run_id=? AND testna < 290 logf run-id test-name item-path))) < 291 < 292 (define (test-set-toplog! db run-id test-name logf) < 293 (sqlite3:execute db "UPDATE tests SET final_logf=? WHERE run_id=? AND testname < 294 logf run-id test-name)) < 295 < 296 (define (tests:summarize-items db run-id test-name force) < 297 ;; if not force then only update the record if one of these is true: < 298 ;; 1. logf is "log/final.log < 299 ;; 2. logf is same as outputfilename < 300 (let ((outputfilename (conc "megatest-rollup-" test-name ".html")) < 301 (orig-dir (current-directory)) < 302 (logf #f)) < 303 (sqlite3:for-each-row < 304 (lambda (path final_logf) < 305 (set! logf final_logf) < 306 (if (directory? path) < 307 (begin < 308 (print "Found path: " path) < 309 (change-directory path)) < 310 ;; (set! outputfilename (conc path "/" outputfilename))) < 311 (print "No such path: " path))) < 312 db < 313 "SELECT rundir,final_logf FROM tests WHERE run_id=? AND testname=? AND item < 314 run-id test-name) < 315 (print "summarize-items with logf " logf) < 316 (if (or (equal? logf "logs/final.log") < 317 (equal? logf outputfilename) < 318 force) < 319 (begin < 320 (if (obtain-dot-lock outputfilename 1 20 30) ;; retry every second for < 321 (print "Obtained lock for " outputfilename) < 322 (print "Failed to obtain lock for " outputfilename)) < 323 (let ((oup (open-output-file outputfilename)) < 324 (counts (make-hash-table)) < 325 (statecounts (make-hash-table)) < 326 (outtxt "") < 327 (tot 0)) < 328 (with-output-to-port < 329 oup < 330 (lambda () < 331 (set! outtxt (conc outtxt "<html><title>Summary: " test-name < 332 "</title><body><h2>Summary for " test-name "< < 333 (sqlite3:for-each-row < 334 (lambda (id itempath state status run_duration logf comment) < 335 (hash-table-set! counts status (+ 1 (hash-table-ref/default c < 336 (hash-table-set! statecounts state (+ 1 (hash-table-ref/defau < 337 (set! outtxt (conc outtxt "<tr>" < 338 "<td><a href=\"" itempath "/" logf "\"> " < 339 "<td>" state "</td>" < 340 "<td><font color=" (common:get-color-from- < 341 ">" status "</font></td>" < 342 "<td>" (if (equal? comment "") < 343 " " < 344 comment) "</td>" < 345 "</tr>"))) < 346 db < 347 "SELECT id,item_path,state,status,run_duration,final_logf,comme < 348 run-id test-name) < 349 < 350 (print "<table><tr><td valign=\"top\">") < 351 ;; Print out stats for status < 352 (set! tot 0) < 353 (print "<table cellspacing=\"0\" border=\"1\"><tr><td colspan=\" < 354 (for-each (lambda (state) < 355 (set! tot (+ tot (hash-table-ref statecounts state)) < 356 (print "<tr><td>" state "</td><td>" (hash-table-ref < 357 (hash-table-keys statecounts)) < 358 (print "<tr><td>Total</td><td>" tot "</td></tr></table>") < 359 (print "</td><td valign=\"top\">") < 360 ;; Print out stats for state < 361 (set! tot 0) < 362 (print "<table cellspacing=\"0\" border=\"1\"><tr><td colspan=\" < 363 (for-each (lambda (status) < 364 (set! tot (+ tot (hash-table-ref counts status))) < 365 (print "<tr><td><font color=\"" (common:get-color-fr < 366 "</font></td><td>" (hash-table-ref counts sta < 367 (hash-table-keys counts)) < 368 (print "<tr><td>Total</td><td>" tot "</td></tr></table>") < 369 (print "</td></td></tr></table>") < 370 < 371 (print "<table cellspacing=\"0\" border=\"1\">" < 372 "<tr><td>Item</td><td>State</td><td>Status</td><td>Commen < 373 outtxt "</table></body></html>") < 374 (release-dot-lock outputfilename))) < 375 (close-output-port oup) < 376 (change-directory orig-dir) < 377 (test-set-toplog! db run-id test-name outputfilename) < 378 ))))) < 379 < 380 ;; ;; TODO: Converge this with db:get-test-info 61 ;; ;; TODO: Converge this with db:get-test-info 381 ;; (define (runs:get-test-info db run-id test-name item-path) 62 ;; (define (runs:get-test-info db run-id test-name item-path) 382 ;; (let ((res #f)) ;; (vector #f #f #f #f #f #f))) 63 ;; (let ((res #f)) ;; (vector #f #f #f #f #f #f))) 383 ;; (sqlite3:for-each-row 64 ;; (sqlite3:for-each-row 384 ;; (lambda (id run-id test-name state status) 65 ;; (lambda (id run-id test-name state status) 385 ;; (set! res (vector id run-id test-name state status item-path))) 66 ;; (set! res (vector id run-id test-name state status item-path))) 386 ;; db "SELECT id,run_id,testname,state,status FROM tests WHERE run_id=? AND 67 ;; db "SELECT id,run_id,testname,state,status FROM tests WHERE run_id=? AND ................................................................................................................................................................................ 388 ;; res)) 69 ;; res)) 389 70 390 (define (runs:test-get-full-path test) 71 (define (runs:test-get-full-path test) 391 (let* ((testname (db:test-get-testname test)) 72 (let* ((testname (db:test-get-testname test)) 392 (itempath (db:test-get-item-path test))) 73 (itempath (db:test-get-item-path test))) 393 (conc testname (if (equal? itempath "") "" (conc "(" itempath ")"))))) 74 (conc testname (if (equal? itempath "") "" (conc "(" itempath ")"))))) 394 75 395 (define (check-valid-items class item) < 396 (let ((valid-values (let ((s (config-lookup *configdat* "validvalues" class))) < 397 (if s (string-split s) #f)))) < 398 (if valid-values < 399 (if (member item valid-values) < 400 item #f) < 401 item))) < 402 < 403 (define (teststep-set-status! db run-id test-name teststep-name state-in status- < 404 (debug:print 4 "run-id: " run-id " test-name: " test-name) < 405 (let* ((state (check-valid-items "state" state-in)) < 406 (status (check-valid-items "status" status-in)) < 407 (item-path (item-list->path itemdat)) < 408 (testdat (db:get-test-info db run-id test-name item-path))) < 409 (debug:print 5 "testdat: " testdat) < 410 (if (and testdat ;; if the section exists then force specification BUG, I do < 411 (or (not state)(not status))) < 412 (debug:print 0 "WARNING: Invalid " (if status "status" "state") < 413 " value \"" (if status state-in status-in) "\", update your valid < 414 (if testdat < 415 (let ((test-id (test:get-id testdat))) < 416 ;; FIXME - this should not update the logfile unless it is specified. < 417 (sqlite3:execute db < 418 "INSERT OR REPLACE into test_steps (test_id,stepname,sta < 419 test-id teststep-name state-in status-in (if comment com < 420 (debug:print 0 "ERROR: Can't update " test-name " for run " run-id " -> < 421 < 422 (define (test-get-kill-request db run-id test-name itemdat) < 423 (let* ((item-path (item-list->path itemdat)) < 424 (testdat (db:get-test-info db run-id test-name item-path))) < 425 (equal? (test:get-state testdat) "KILLREQ"))) < 426 < 427 (define (test-set-meta-info db run-id testname itemdat) < 428 (let ((item-path (item-list->path itemdat)) < 429 (cpuload (get-cpu-load)) < 430 (hostname (get-host-name)) < 431 (diskfree (get-df (current-directory))) < 432 (uname (get-uname "-srvpio")) < 433 (runpath (current-directory))) < 434 (sqlite3:execute db "UPDATE tests SET host=?,cpuload=?,diskfree=?,uname=?,ru < 435 hostname < 436 cpuload < 437 diskfree < 438 uname < 439 runpath < 440 run-id < 441 testname < 442 item-path))) < 443 < 444 (define (test-update-meta-info db run-id testname itemdat minutes cpuload diskfr < 445 (let ((item-path (item-list->path itemdat))) < 446 (if (not item-path)(begin (debug:print 0 "WARNING: ITEMPATH not set.") (se < 447 ;; (let ((testinfo (db:get-test-info db run-id testname item-path))) < 448 ;; (if (and (not (equal? (db:test-get-status testinfo) "COMPLETED")) < 449 ;; (not (equal? (db:test-get-status testinfo) "KILLREQ")) < 450 (sqlite3:execute < 451 db < 452 "UPDATE tests SET cpuload=?,diskfree=?,run_duration=?,state='RUNNING' WHERE < 453 cpuload < 454 diskfree < 455 minutes < 456 run-id < 457 testname < 458 item-path))) < 459 76 460 (define (set-megatest-env-vars db run-id) 77 (define (set-megatest-env-vars db run-id) 461 (let ((keys (db-get-keys db))) 78 (let ((keys (db-get-keys db))) 462 (for-each (lambda (key) 79 (for-each (lambda (key) 463 (sqlite3:for-each-row 80 (sqlite3:for-each-row 464 (lambda (val) 81 (lambda (val) 465 (debug:print 2 "setenv " (key:get-fieldname key) " " val) 82 (debug:print 2 "setenv " (key:get-fieldname key) " " val) 466 (setenv (key:get-fieldname key) val)) 83 (setenv (key:get-fieldname key) val)) 467 db 84 db 468 (conc "SELECT " (key:get-fieldname key) " FROM runs WHERE id=?; 85 (conc "SELECT " (key:get-fieldname key) " FROM runs WHERE id=?; 469 run-id)) 86 run-id)) 470 keys))) | 87 keys) > 88 ;; Lets use this as an opportunity to put MT_RUNNAME in the environment > 89 (sqlite3:for-each-row > 90 (lambda (runname) > 91 (setenv "MT_RUNNAME" runname)) > 92 db > 93 "SELECT runname FROM runs WHERE id=?;" > 94 run-id) > 95 )) 471 96 472 (define (set-item-env-vars itemdat) 97 (define (set-item-env-vars itemdat) 473 (for-each (lambda (item) 98 (for-each (lambda (item) 474 (debug:print 2 "setenv " (car item) " " (cadr item)) 99 (debug:print 2 "setenv " (car item) " " (cadr item)) 475 (setenv (car item) (cadr item))) 100 (setenv (car item) (cadr item))) 476 itemdat)) 101 itemdat)) 477 102 478 (define (get-all-legal-tests) < 479 (let* ((tests (glob (conc *toppath* "/tests/*"))) < 480 (res '())) < 481 (debug:print 4 "INFO: Looking at tests " (string-intersperse tests ",")) < 482 (for-each (lambda (testpath) < 483 (if (file-exists? (conc testpath "/testconfig")) < 484 (set! res (cons (last (string-split testpath "/")) res)))) < 485 tests) < 486 res)) < 487 < 488 (define (runs:can-run-more-tests db) | 103 (define (runs:can-run-more-tests db test-record) > 104 (let* ((tconfig (tests:testqueue-get-testconfig test-record)) > 105 (jobgroup (config-lookup tconfig "requirements" "jobgrou 489 (let ((num-running (db:get-count-tests-running db)) | 106 (num-running (db:get-count-tests-running db)) > 107 (num-running-in-jobgroup (db:get-count-tests-running-in-jobgroup db job 490 (max-concurrent-jobs (config-lookup *configdat* "setup" "max_concurrent_ | 108 (max-concurrent-jobs (config-lookup *configdat* "setup" "max_co > 109 (job-group-limit (config-lookup *configdat* "jobgroups" jobgrou 491 (debug:print 2 "max-concurrent-jobs: " max-concurrent-jobs ", num-running: " 110 (debug:print 2 "max-concurrent-jobs: " max-concurrent-jobs ", num-running: " 492 (if (not (eq? 0 *globalexitstatus*)) 111 (if (not (eq? 0 *globalexitstatus*)) 493 #f 112 #f > 113 (let ((can-not-run-more (cond 494 (if (or (not max-concurrent-jobs) | 114 ;; if max-concurrent-jobs is set and the number > 115 ;; than it than cannot run more jobs 495 (and max-concurrent-jobs | 116 ((and max-concurrent-jobs 496 (string->number max-concurrent-jobs) | 117 (string->number max-concurrent-jobs) 497 (not (>= num-running (string->number max-concurrent-jobs))) | 118 (>= num-running (string->number max-concu 498 #t < 499 (begin < 500 (debug:print 0 "WARNING: Max running jobs exceeded, current number | 119 (debug:print 0 "WARNING: Max running jobs exce 501 ", max_concurrent_jobs: " max-concurrent-jobs) | 120 ", max_concurrent_jobs: " max-con 502 #f))))) | 121 #t) 503 < > 122 ;; if job-group-limit is set and number of jobs 504 (define (test:get-testconfig test-name system-allowed) | 123 ;; than the limit then cannot run more jobs of 505 (let* ((test-path (conc *toppath* "/tests/" test-name)) | 124 ((and job-group-limit 506 (test-configf (conc test-path "/testconfig")) | 125 (>= num-running-in-jobgroup job-group-lim 507 (testexists (and (file-exists? test-configf)(file-read-access? test-c < 508 (if testexists < 509 (read-config test-configf #f system-allowed environ-patt: (if system-all < 510 "pre-launc < 511 #f)) < 512 #f))) < 513 < 514 ;; sort tests by priority and waiton < 515 ;; Move test specific stuff to a test unit FIXME one of these days < 516 (define (tests:sort-by-priority-and-waiton test-names) < 517 (let ((testdetails (make-hash-table)) < 518 (mungepriority (lambda (priority) < 519 (if priority < 520 (let ((tmp (any->number priority))) < 521 (if tmp tmp (begin (debug:print 0 "ERROR: bad pri < 522 0)))) < 523 (for-each (lambda (test-name) < 524 (let ((test-config (test:get-testconfig test-name #f))) < 525 (if test-config (hash-table-set! testdetails test-name test-co < 526 test-names) < 527 (sort < 528 (hash-table-keys testdetails) ;; avoid dealing with deleted tests, look at < 529 (lambda (a b) < 530 (let* ((tconf-a (hash-table-ref testdetails a)) < 531 (tconf-b (hash-table-ref testdetails b)) < 532 (a-waiton (config-lookup tconf-a "requirements" "waiton")) < 533 (b-waiton (config-lookup tconf-b "requirements" "waiton")) < 534 (a-priority (mungepriority (config-lookup tconf-a "requirements" " < 535 (b-priority (mungepriority (config-lookup tconf-b "requirements" " < 536 (if (and a-waiton (equal? a-waiton b)) < 537 #f ;; cannot have a which is waiting on b happening before b < 538 (if (and b-waiton (equal? b-waiton a)) < 539 #t ;; this is the correct order, b is waiting on a and b is bef < 540 (if (> a-priority b-priority) < 541 #t ;; if a is a higher priority than b then we are good to < 542 #f)))))))) < 543 < 544 ;; This is original run-tests, this routine is deprecated and we will transition < 545 ;; < 546 (define (run-tests db test-names) < 547 (let* ((keys (db-get-keys db)) < 548 (keyvallst (keys->vallist keys #t)) < 549 (run-id (register-run db keys)) ;; test-name))) < 550 (deferred '()) ;; delay running these since they have a waiton claus < 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 "requirem < 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 < 578 ;; on the first pass or call to run-tests set FAILS to NOT_STARTED if < 579 ;; -keepgoing is specified < 580 < 581 (set-megatest-env-vars db run-id) ;; these may be needed by the launching pr < 582 < 583 (if (file-exists? runconfigf) < 584 (setup-env-defaults db runconfigf run-id *already-seen-runconfig-info* e < 585 (debug:print 0 "WARNING: You do not have a run config file: " runconfigf < 586 < 587 (if (and (eq? *passnum* 0) < 588 (args:get-arg "-keepgoing")) < 589 (begin < 590 ;; have to delete test records where NOT_STARTED since they can cause < 591 ;; get stuck due to becoming inaccessible from a failed test. I.e. if < 592 ;; on test A but test B reached the point on being registered as NOT_S < 593 ;; A failed for some reason then on re-run using -keepgoing the run ca < 594 (db:delete-tests-in-state db run-id "NOT_STARTED") < 595 (db:set-tests-state-status db run-id test-names #f "FAIL" "NOT_STARTED < 596 (set! *passnum* (+ *passnum* 1)) < 597 (let loop ((numtimes 0)) < 598 (for-each < 599 (lambda (test-name) < 600 (if (runs:can-run-more-tests db) < 601 (run-one-test db run-id test-name keyvallst) < 602 ;; add some delay < 603 ;(sleep 2) < 604 )) < 605 (tests:sort-by-priority-and-waiton test-names)) < 606 ;; (run-waiting-tests db) < 607 (if (args:get-arg "-keepgoing") < 608 (let ((estrem (db:estimated-tests-remaining db run-id))) < 609 (if (and (> estrem 0) < 610 (eq? *globalexitstatus* 0)) < 611 (begin < 612 (debug:print 1 "Keep going, estimated " estrem " tests remaini < 613 (thread-sleep! 3) < 614 (run-waiting-tests db) < 615 (loop (+ numtimes 1))))))))) < 616 < 617 ;; VERY INEFFICIENT! Move stuff that should be done once up to calling proc < 618 (define (run-one-test db run-id test-name keyvallst) < 619 (debug:print 1 "Launching test " test-name) < 620 ;; All these vars might be referenced by the testconfig file reader < 621 (setenv "MT_TEST_NAME" test-name) ;; < 622 (setenv "MT_RUNNAME" (args:get-arg ":runname")) < 623 < 624 ;; (set-megatest-env-vars db run-id) ;; these may be needed by the launching p < 625 < 626 (change-directory *toppath*) < 627 (let* ((test-path (conc *toppath* "/tests/" test-name)) ;; could use test:g < 628 (test-configf (conc test-path "/testconfig")) < 629 (testexists (and (file-exists? test-configf)(file-read-access? test-c < 630 (test-conf (if testexists (read-config test-configf #f #t) (make-has < 631 (waiton (let ((w (config-lookup test-conf "requirements" "waiton" < 632 (if (string? w)(string-split w)'()))) < 633 (tags (let ((t (config-lookup test-conf "setup" "tags"))) < 634 ;; we want our tags to be separated by commas and fully < 635 ;; so that queries with "like" can tie to the commas at < 636 ;; while also allowing the end user to freely use space < 637 (if (string? t)(string-substitute (regexp "[,\\s]+") ", < 638 '())))) < 639 (if (not testexists) < 640 (begin < 641 (debug:print 0 "ERROR: Can't find config file " test-configf) < 642 (exit 2)) < 643 ;; put top vars into convenient variables and open the db < 644 (let* (;; db is always at *toppath*/db/megatest.db < 645 (items (hash-table-ref/default test-conf "items" '())) < 646 (itemstable (hash-table-ref/default test-conf "itemstable" '())) < 647 (allitems (if (or (not (null? items))(not (null? itemstable))) < 648 (append (item-assoc->item-list items) < 649 (item-table->item-list itemstable)) < 650 '(())))) ;; a list with one null list is a test < 651 ;; (runconfigf (conc *toppath* "/runconfigs.config"))) < 652 (debug:print 1 "items: ") | 126 (debug:print 1 "WARNING: number of jobs " num- 653 (if (>= *verbosity* 1)(pp allitems)) < 654 (if (>= *verbosity* 5) < 655 (begin < 656 (print "items: ")(pp (item-assoc->item-list items)) < 657 (print "itestable: ")(pp (item-table->item-list itemstable)))) < 658 (if (args:get-arg "-m") < 659 (db:set-comment-for-run db run-id (args:get-arg "-m"))) < 660 < 661 ;; Here is where the test_meta table is best updated < 662 (runs:update-test_meta db test-name test-conf) < 663 < 664 ;; braindead work-around for poorly specified allitems list BUG!!! FIX < 665 (if (null? allitems)(set! allitems '(()))) < 666 (let loop ((itemdat (car allitems)) < 667 (tal (cdr allitems))) < 668 ;; (lambda (itemdat) ;;; ((ripeness "overripe") (temperature "cool") < 669 ;; Handle lists of items < 670 (let* ((item-path (item-list->path itemdat)) ;; (string-interspe < 671 (new-test-path (string-intersperse (cons test-path (map cadr < 672 (new-test-name (if (equal? item-path "") test-name (conc test < 673 (testdat #f) < 674 (num-running (db:get-count-tests-running db)) < 675 (max-concurrent-jobs (config-lookup *configdat* "setup" "max_ < 676 (parent-test (and (not (null? items))(equal? item-path ""))) < 677 (single-test (and (null? items) (equal? item-path ""))) < 678 (item-test (not (equal? item-path ""))) < 679 (item-patt (args:get-arg "-itempatt")) < 680 (patt-match (if item-patt < 681 (string-search (glob->regexp < 682 (string-translate item-patt " < 683 item-path) < > 127 " in " jobgroup " exceeded, will 684 #t))) | 128 #t) 685 (debug:print 3 "max-concurrent-jobs: " max-concurrent-jobs ", num- < 686 (if (and patt-match (runs:can-run-more-tests db)) < 687 (begin < 688 (let loop2 ((ts (db:get-test-info db run-id test-name item-p < 689 (ct 0)) < 690 (if (and (not ts) < 691 (< ct 10)) < 692 (begin < 693 (register-test db run-id test-name item-path) < 694 (db:test-set-comment db run-id test-name item-path " < 695 (loop2 (db:get-test-info db run-id test-name item-pa < 696 (+ ct 1))) < 697 (if ts < 698 (set! testdat ts) < 699 (begin < 700 (debug:print 0 "WARNING: Couldn't register test < 701 (if (not (null? tal)) < 702 (loop (car tal)(cdr tal))))))) < 703 (change-directory test-path) < 704 ;; this block is here only to inform the user early on < 705 < 706 ;; NB// Moving the setting of runconfig.config vars to *befo < 707 ;; the calling of each test. < 708 ;; (if (file-exists? runconfigf) < 709 ;; (setup-env-defaults db runconfigf run-id *already-see < 710 ;; (debug:print 0 "WARNING: You do not have a run config < 711 (debug:print 4 "run-id: " run-id " test-name: " test-name " < 712 (case (if (args:get-arg "-force") < 713 'NOT_STARTED < 714 (if testdat < 715 (string->symbol (test:get-state testdat)) < 716 'failed-to-insert)) < 717 ((failed-to-insert) < 718 (debug:print 0 "ERROR: Failed to insert the record into t < 719 ((NOT_STARTED COMPLETED) < 720 (debug:print 6 "Got here, " (test:get-state testdat)) < 721 (let ((runflag #f)) < 722 (cond < 723 ;; i.e. this is the parent test to a suite of items, n < 724 (parent-test < 725 (set! runflag #f)) < 726 ;; -force, run no matter what < 727 ((args:get-arg "-force")(set! runflag #t)) < 728 ;; NOT_STARTED, run no matter what < 729 ((equal? (test:get-state testdat) "NOT_STARTED")(set! < 730 ;; not -rerun and PASS, WARN or CHECK, do no run < 731 ((and (or (not (args:get-arg "-rerun")) < 732 (args:get-arg "-keepgoing")) < 733 (member (test:get-status testdat) '("PASS" "WARN < 734 (set! runflag #f)) < 735 ;; -rerun and status is one of the specifed, run it < 736 ((and (args:get-arg "-rerun") < 737 (let ((rerunlst (string-split (args:get-arg "-re < 738 (member (test:get-status testdat) rerunlst))) < 739 (set! runflag #t)) < 740 ;; -keepgoing, do not rerun FAIL < 741 ((and (args:get-arg "-keepgoing") < 742 (member (test:get-status testdat) '("FAIL"))) < 743 (set! runflag #f)) < 744 ((and (not (args:get-arg "-rerun")) < 745 (member (test:get-status testdat) '("FAIL" "n/a" < 746 (set! runflag #t)) < 747 (else (set! runflag #f))) < 748 (debug:print 6 "RUNNING => runflag: " runflag " STATE: < 749 (if (not runflag) < 750 (if (not parent-test) < 751 (debug:print 1 "NOTE: Not starting test " new-t < 752 (let* ((get-prereqs-cmd (lambda () < 753 (db-get-prereqs-not-met d < 754 (launch-cmd (lambda () < 755 (launch-test db run-id (a < 756 (testrundat (list get-prereqs-cmd launc < 757 (if (or (args:get-arg "-force") < 758 (let ((preqs-not-yet-met ((car testrundat < 759 (debug:print 2 "Preqrequesites for " te < 760 (null? preqs-not-yet-met))) ;; are ther < 761 (if (not ((cadr testrundat))) ;; this is the < 762 (begin < 763 (print "ERROR: Failed to launch the tes < 764 (set! *globalexitstatus* 1) ;; < 765 (process-signal (current-process-id) si < 766 ;(exit 1) < 767 )) < 768 (if (not (args:get-arg "-keepgoing")) < 769 (hash-table-set! *waiting-queue* new-test < 770 ((KILLED) < 771 (debug:print 1 "NOTE: " new-test-name " is already runnin < 772 ((LAUNCHED REMOTEHOSTSTART RUNNING) < 773 (if (> (- (current-seconds)(+ (db:test-get-event_time tes < 774 (db:test-get-run_duration t < 775 100) ;; i.e. no update for more than 100 seconds < 776 (begin < 777 (debug:print 0 "WARNING: Test " test-name " appears < 778 (test-set-status! db run-id test-name "INCOMPLETE" < 779 (debug:print 2 "NOTE: " test-name " is already runnin < 780 (else (debug:print 0 "ERROR: Failed to launch test " < 781 (if (not (null? tal)) < 782 (loop (car tal)(cdr tal))))))))) < 783 < 784 (define (run-waiting-tests db) < 785 (let ((numtries 0) < 786 (last-try-time (current-seconds)) < 787 (times (list 1))) ;; minutes to wait before trying again to < 788 ;; BUG this hack of brute force retrying works quite well for many cases but < 789 ;; what is needed is to check the db for tests that have failed less tha < 790 ;; N times or never been started and kick them off again < 791 (let loop ((waiting-test-names (hash-table-keys *waiting-queue*))) < 792 (cond < 793 ((not (runs:can-run-more-tests db)) < 794 (thread-sleep! 2) < 795 (loop waiting-test-names)) < 796 ((null? waiting-test-names) < 797 (debug:print 1 "All tests launched")) < 798 (else | 129 (else #f)))) 799 (set! numtries (+ numtries 1)) < 800 (for-each (lambda (testname) < 801 (if (runs:can-run-more-tests db) < 802 (let* ((testdat (hash-table-ref *waiting-queue* testname < 803 (prereqs ((car testdat))) < 804 (ldb (if db db (open-db)))) < 805 (debug:print 2 "prereqs remaining: " prereqs) < 806 (if (null? prereqs) < 807 (begin < 808 (debug:print 2 "Prerequisites met, launching " t < 809 ((cadr testdat)) < 810 (hash-table-delete! *waiting-queue* testname))) < 811 (if (not db) < 812 (sqlite3:finalize! ldb))))) < 813 waiting-test-names) < 814 ;; (sleep 10) ;; no point in rushing things at this stage? < 815 (loop (hash-table-keys *waiting-queue*))))))) < > 130 (not can-not-run-more))))) 816 131 817 ;;====================================================================== 132 ;;====================================================================== 818 ;; New methodology. These routines will replace the above in time. For 133 ;; New methodology. These routines will replace the above in time. For 819 ;; now the code is duplicated. This stuff is initially used in the monitor 134 ;; now the code is duplicated. This stuff is initially used in the monitor 820 ;; based code. 135 ;; based code. 821 ;;====================================================================== 136 ;;====================================================================== 822 137 ................................................................................................................................................................................ 854 ;; This is a duplicate of run-tests (which has been deprecated). Use this one in 169 ;; This is a duplicate of run-tests (which has been deprecated). Use this one in 855 ;; keyvals 170 ;; keyvals 856 (define (runs:run-tests db target runname test-patts item-patts user flags) 171 (define (runs:run-tests db target runname test-patts item-patts user flags) 857 (let* ((keys (db-get-keys db)) 172 (let* ((keys (db-get-keys db)) 858 (keyvallst (keys:target->keyval keys target)) 173 (keyvallst (keys:target->keyval keys target)) 859 (run-id (runs:register-run db keys keyvallst runname "new" "n/a" u 174 (run-id (runs:register-run db keys keyvallst runname "new" "n/a" u 860 (deferred '()) ;; delay running these since they have a waiton claus 175 (deferred '()) ;; delay running these since they have a waiton claus > 176 ;; keepgoing is the defacto modality now, will add hit-n-run a bit late 861 (keepgoing (hash-table-ref/default flags "-keepgoing" #f)) | 177 ;; (keepgoing (hash-table-ref/default flags "-keepgoing" #f)) 862 (test-names '()) 178 (test-names '()) 863 (runconfigf (conc *toppath* "/runconfigs.config")) 179 (runconfigf (conc *toppath* "/runconfigs.config")) 864 (required-tests '())) | 180 (required-tests '()) > 181 (test-records (make-hash-table))) 865 182 866 (set-megatest-env-vars db run-id) ;; these may be needed by the launching pr 183 (set-megatest-env-vars db run-id) ;; these may be needed by the launching pr 867 184 868 (if (file-exists? runconfigf) 185 (if (file-exists? runconfigf) 869 (setup-env-defaults db runconfigf run-id *already-seen-runconfig-info* " 186 (setup-env-defaults db runconfigf run-id *already-seen-runconfig-info* " 870 (debug:print 0 "WARNING: You do not have a run config file: " runconfigf 187 (debug:print 0 "WARNING: You do not have a run config file: " runconfigf 871 188 ................................................................................................................................................................................ 875 (lambda (patt) 192 (lambda (patt) 876 (let ((tests (glob (conc *toppath* "/tests/" (string-translate patt "%" " 193 (let ((tests (glob (conc *toppath* "/tests/" (string-translate patt "%" " 877 (set! tests (filter (lambda (test)(file-exists? (conc test "/testconfig 194 (set! tests (filter (lambda (test)(file-exists? (conc test "/testconfig 878 (set! test-names (append test-names 195 (set! test-names (append test-names 879 (map (lambda (testp) 196 (map (lambda (testp) 880 (last (string-split testp "/"))) 197 (last (string-split testp "/"))) 881 tests))))) 198 tests))))) 882 (string-split test-patts ",")) | 199 (if test-patts (string-split test-patts ",")(list "%"))) 883 200 884 ;; now remove duplicates 201 ;; now remove duplicates 885 (set! test-names (delete-duplicates test-names)) 202 (set! test-names (delete-duplicates test-names)) 886 203 887 (debug:print 0 "INFO: test names " test-names) 204 (debug:print 0 "INFO: test names " test-names) 888 205 889 ;; now add non-directly referenced dependencies (i.e. waiton) < 890 ;; could cache all these since they need to be read again ... < 891 ;; FIXME SOMEDAY < 892 (if (not (null? test-names)) < 893 (let loop ((hed (car test-names)) < 894 (tal (cdr test-names))) < 895 (let* ((config (test:get-testconfig hed #f)) < 896 (waitons (string-split (let ((w (config-lookup config "requirem < 897 (if w w ""))))) < 898 (for-each < 899 (lambda (waiton) < 900 (if (and waiton (not (member waiton test-names))) < 901 (begin < 902 (set! required-tests (cons waiton required-tests)) < 903 (set! test-names (append test-names (list waiton)))))) < 904 waitons) < 905 (let ((remtests (delete-duplicates (append waitons tal)))) < 906 (if (not (null? remtests)) < 907 (loop (car remtests)(cdr remtests))))))) < 908 < 909 (if (not (null? required-tests)) < 910 (debug:print 1 "INFO: Adding " required-tests " to the run queue")) < 911 < 912 ;; on the first pass or call to run-tests set FAILS to NOT_STARTED if 206 ;; on the first pass or call to run-tests set FAILS to NOT_STARTED if 913 ;; -keepgoing is specified 207 ;; -keepgoing is specified 914 (if (and (eq? *passnum* 0) | 208 (if (eq? *passnum* 0) 915 keepgoing) < 916 (begin 209 (begin 917 ;; have to delete test records where NOT_STARTED since they can cause 210 ;; have to delete test records where NOT_STARTED since they can cause 918 ;; get stuck due to becoming inaccessible from a failed test. I.e. if 211 ;; get stuck due to becoming inaccessible from a failed test. I.e. if 919 ;; on test A but test B reached the point on being registered as NOT_S 212 ;; on test A but test B reached the point on being registered as NOT_S 920 ;; A failed for some reason then on re-run using -keepgoing the run ca 213 ;; A failed for some reason then on re-run using -keepgoing the run ca 921 (db:delete-tests-in-state db run-id "NOT_STARTED") 214 (db:delete-tests-in-state db run-id "NOT_STARTED") 922 (db:set-tests-state-status db run-id test-names #f "FAIL" "NOT_STARTED 215 (db:set-tests-state-status db run-id test-names #f "FAIL" "NOT_STARTED 923 (set! *passnum* (+ *passnum* 1)) < > 216 > 217 ;; now add non-directly referenced dependencies (i.e. waiton) > 218 (if (not (null? test-names)) 924 (let loop ((numtimes 0)) | 219 (let loop ((hed (car test-names)) > 220 (tal (cdr test-names))) ;; 'return-procs tells the co > 221 (let* ((config (test:get-testconfig hed 'return-procs)) > 222 (waitons (string-split (let ((w (config-lookup config "requirem > 223 (if w w ""))))) > 224 ;; (items (items:get-items-from-config config))) > 225 (if (not (hash-table-ref/default test-records hed #f)) > 226 (hash-table-set! test-records > 227 hed (vector hed ;; 0 > 228 config ;; 1 > 229 waitons ;; 2 > 230 (config-lookup config "requirements > 231 (let ((items (hash-table-ref/d > 232 (itemstable (hash-table-ref/d > 233 ;; if either items or items table > 234 ;; process can know to call items > 235 ;; if either is a list and none i > 236 ;; otherwise return #f - this is > 237 (cond > 238 ((procedure? items) > 239 (debug:print 4 "INFO: items is > 240 items) ;; calc later > 241 ((procedure? itemstable)