Overview
| SHA1 Hash: | cf78fcded0ade20647c94873330c532ec7ff5857 |
|---|---|
| Date: | 2011-05-04 08:22:29 |
| User: | matt |
| Comment: | Placeholder for remove-runs |
| Timelines: | family | ancestors | descendants | both | trunk |
| Downloads: | Tarball | ZIP archive |
| Other Links: | files | file ages | manifest |
Tags And Properties
- branch=trunk inherited from [d673a9367e]
- sym-trunk inherited from [d673a9367e]
Changes
Modified megatest.scm from [c2c2ba6e88bbfe63] to [af51a420cc6e010d].
4 ;; greater. See the accompanying file COPYING for details. 4 ;; greater. See the accompanying file COPYING for details. 5 ;; 5 ;; 6 ;; This program is distributed WITHOUT ANY WARRANTY; without even the 6 ;; This program is distributed WITHOUT ANY WARRANTY; without even the 7 ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 7 ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 8 ;; PURPOSE. 8 ;; PURPOSE. 9 9 10 (include "common.scm") 10 (include "common.scm") 11 (define megatest-version 1.0.1) | 11 (define megatest-version 1.01) 12 12 13 (define help (conc " 13 (define help (conc " 14 Megatest, documentation at http://www.kiatoa.com/fossils/opensrc 14 Megatest, documentation at http://www.kiatoa.com/fossils/opensrc 15 version " megatest-version " 15 version " megatest-version " 16 license GPL, Copyright Matt Welland 2006-2011 16 license GPL, Copyright Matt Welland 2006-2011 17 17 18 Usage: megatest [options] 18 Usage: megatest [options] 19 -h : this help 19 -h : this help 20 20 21 Process and test running 21 Process and test running 22 -runall : run all tests that are not state COMPLETED and statu | 22 -runall : run all tests that are not state COMPLETED and statu > 23 CHECK or KILLED 23 -runtests tst1,tst2 ... : run tests 24 -runtests tst1,tst2 ... : run tests 24 25 25 Run status updates (these require that you are in a test directory 26 Run status updates (these require that you are in a test directory 26 and you have sourced the \"megatest.csh\" | 27 and you have sourced the \"megatest.csh\" or 27 \"megatest.sh\" file.) 28 \"megatest.sh\" file.) 28 -step stepname 29 -step stepname 29 -test-status : set the state and status of a test (use :state and : 30 -test-status : set the state and status of a test (use :state and : 30 -setlog logfname : set the path/filename to the final log relative to t 31 -setlog logfname : set the path/filename to the final log relative to t 31 directory. may be used with -test-status 32 directory. may be used with -test-status 32 -m comment : insert a comment for this test 33 -m comment : insert a comment for this test 33 34 34 Run data: | 35 Run data 35 < 36 :runname : required, name for this particular test run 36 :runname : required, name for this particular test run 37 :state : required if updating step state; e.g. start, end, co 37 :state : required if updating step state; e.g. start, end, co 38 :status : required if updating step status; e.g. pass, fail, n 38 :status : required if updating step status; e.g. pass, fail, n 39 39 40 Queries 40 Queries 41 -list-runs patt : list runs matching pattern \"patt\", % is the wildca 41 -list-runs patt : list runs matching pattern \"patt\", % is the wildca 42 -showkeys : show the keys used in this megatest setup 42 -showkeys : show the keys used in this megatest setup 43 43 44 Misc 44 Misc 45 -force : override some checks 45 -force : override some checks 46 -xterm : start an xterm instead of launching the test 46 -xterm : start an xterm instead of launching the test 47 47 48 Helpers 48 Helpers 49 < 50 -runstep stepname ... : take leftover params as comand and execute as stepna 49 -runstep stepname ... : take leftover params as comand and execute as stepna 51 log will be in stepname.log 50 log will be in stepname.log 52 -logpro file : with -exec apply logpro file to stepname.log, create 51 -logpro file : with -exec apply logpro file to stepname.log, create 53 stepname.html and sets log to same 52 stepname.html and sets log to same 54 53 55 Called as " (string-intersperse (argv) " "))) 54 Called as " (string-intersperse (argv) " "))) 56 55 ................................................................................................................................................................................ 69 ":runname" 68 ":runname" 70 ":state" 69 ":state" 71 ":status" 70 ":status" 72 "-list-runs" 71 "-list-runs" 73 "-setlog" 72 "-setlog" 74 "-runstep" 73 "-runstep" 75 "-logpro" 74 "-logpro" > 75 "-remove-run" 76 ) 76 ) 77 (list "-h" 77 (list "-h" 78 "-force" 78 "-force" 79 "-xterm" 79 "-xterm" 80 "-showkeys" 80 "-showkeys" 81 "-test-status" 81 "-test-status" 82 "-gui" 82 "-gui" ................................................................................................................................................................................ 244 (print "ERROR: Attempted to run a test but run area config file no 244 (print "ERROR: Attempted to run a test but run area config file no 245 (exit 1)) 245 (exit 1)) 246 ;; put test parameters into convenient variables 246 ;; put test parameters into convenient variables 247 (let* ((test-names (string-split (args:get-arg "-runtests") ","))) 247 (let* ((test-names (string-split (args:get-arg "-runtests") ","))) 248 (run-tests db test-names))) 248 (run-tests db test-names))) 249 ;; run-waiting-tests db) 249 ;; run-waiting-tests db) 250 (sqlite3:finalize! db) 250 (sqlite3:finalize! db) > 251 (run-waiting-tests #f) > 252 (set! *didsomething* #t)))) > 253 > 254 (if (args:get-arg "-runtests") > 255 (runtests)) > 256 > 257 ;;====================================================================== > 258 ;; Remove old run(s) > 259 ;;====================================================================== > 260 > 261 (define (remove-runs) > 262 (if (not (args:get-arg ":runname")) > 263 (begin > 264 (print "ERROR: Missing required parameter for -remove-run, you must spec > 265 (exit 2)) > 266 (let ((db #f)) > 267 (if (not (setup-for-run)) > 268 (begin > 269 (print "Failed to setup, exiting") > 270 (exit 1))) > 271 (set! db (open-db)) > 272 (if (not (car *configinfo*)) > 273 (begin > 274 (print "ERROR: Attempted to remove a test but run area config file > 275 (exit 1)) > 276 ;; put test parameters into convenient variables > 277 (let* ((test-names (string-split (args:get-arg "-remove-tests") ", > 278 (run-tests db test-names))) > 279 ;; run-waiting-tests db) > 280 (sqlite3:finalize! db) 251 (run-waiting-tests #f) 281 (run-waiting-tests #f) 252 (set! *didsomething* #t)))) 282 (set! *didsomething* #t)))) 253 283 254 (if (args:get-arg "-runtests") 284 (if (args:get-arg "-runtests") 255 (runtests)) 285 (runtests)) 256 286 257 ;;====================================================================== 287 ;;======================================================================