Difference From f8f7968767e4adce To root:f8f7968767e4adce
2011-08-11
| ||
01:45 | Merged in rollup runs to trunk. Actual rollup of runs not completed yet check-in: d7ffcddcac user: matt tags: trunk, v1.20 | |
2011-08-10
| ||
21:57 | Rollup runs, clean up tests check-in: 3e4d4b9027 user: mrwellan tags: rollup-runs | |
2011-08-08
| ||
23:24 | Minor refactoring of run code. check-in: f8f7968767 user: mrwellan tags: rollup-runs | |
14:45 | Rollup runs from past N days to new runname, started implementation check-in: 8757213827 user: mrwellan tags: rollup-runs | |
2011-08-06
| ||
23:42 | Added debugging statements, regenerated docs check-in: 6b1fa57fcf user: matt tags: trunk | |
2011-08-04
| ||
09:56 | Added support for using the shell when launching a command (vs. directly kicking off the process) check-in: dc5aae878a user: mrwellan tags: trunk | |
Modified db.scm from [6e2b657ab8] to [603c4ba3d8].
︙ | ︙ | |||
427 428 429 430 431 432 433 | ;; tests) ;; (filter (lambda (x) ;; (not (hash-table-ref/default non-completed (db:test-get-testname x) #f))) ;; tests))) ;; (pre-dep-names (map db:test-get-testname completed-tests)) ;; (result (lset-difference string=? waiton pre-dep-names))) ;; (print "pre-dep-names: " pre-dep-names " waiton: " waiton " result: " result) | < | 427 428 429 430 431 432 433 | ;; tests) ;; (filter (lambda (x) ;; (not (hash-table-ref/default non-completed (db:test-get-testname x) #f))) ;; tests))) ;; (pre-dep-names (map db:test-get-testname completed-tests)) ;; (result (lset-difference string=? waiton pre-dep-names))) ;; (print "pre-dep-names: " pre-dep-names " waiton: " waiton " result: " result) |
Modified megatest.scm from [8ae7c5dabf] to [fdec59eebf].
︙ | ︙ | |||
52 53 54 55 56 57 58 | and :runname ,-testpatt and -itempatt and -testpatt -keepgoing : continue running until no jobs are \"LAUNCHED\" or \"NOT_STARTED\" -rerun FAIL,WARN... : re-run if called on a test that previously ran (nullified if -keepgoing is also specified) -rebuild-db : bring the database schema up to date | < < < | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | and :runname ,-testpatt and -itempatt and -testpatt -keepgoing : continue running until no jobs are \"LAUNCHED\" or \"NOT_STARTED\" -rerun FAIL,WARN... : re-run if called on a test that previously ran (nullified if -keepgoing is also specified) -rebuild-db : bring the database schema up to date Helpers -runstep stepname ... : take remaining params as comand and execute as stepname log will be in stepname.log. Best to put command in quotes -logpro file : with -exec apply logpro file to stepname.log, creates stepname.html and sets log to same If using make use stepname_logpro.log as your target |
︙ | ︙ | |||
89 90 91 92 93 94 95 | "-itempatt" "-setlog" "-set-toplog" "-runstep" "-logpro" "-m" "-rerun" | < < < < | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | "-itempatt" "-setlog" "-set-toplog" "-runstep" "-logpro" "-m" "-rerun" "-debug" ;; for *verbosity* > 2 ) (list "-h" "-force" "-xterm" "-showkeys" "-test-status" "-summarize-items" "-gui" "-runall" ;; run all tests "-remove-runs" "-keepgoing" "-usequeue" "-rebuild-db" "-v" ;; verbose 2, more than normal (normal is 1) "-q" ;; quiet 0, errors/warnings only ) args:arg-hash 0)) (if (args:get-arg "-h") |
︙ | ︙ | |||
263 264 265 266 267 268 269 | ;; else ;; put task in deferred queue ;; if still ok to run tasks ;; process deferred tasks per above steps ;; run all tests are are Not COMPLETED and PASS or CHECK (if (args:get-arg "-runall") | | > > > | > > > > > > > > | < | | | | | < < < < < < | < < | < > | > > > | | > > | > > > > > | | > > > > | | 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | ;; else ;; put task in deferred queue ;; if still ok to run tasks ;; process deferred tasks per above steps ;; run all tests are are Not COMPLETED and PASS or CHECK (if (args:get-arg "-runall") (if (not (args:get-arg ":runname")) (begin (debug:print 0 "ERROR: Missing required parameter for -runtests, you must specify the run name with :runname runname") (exit 2)) (let* ((db (if (setup-for-run) (open-db) (begin (debug:print 0 "Failed to setup, exiting") (exit 1))))) (if (not (car *configinfo*)) (begin (debug:print 0 "ERROR: Attempted to run a test but run area config file not found") (exit 1)) ;; put test parameters into convenient variables (let* ((test-names (get-all-legal-tests))) ;; "PROD" is ignored for now (debug:print 1 "INFO: Attempting to start the following tests...") (debug:print 1 " " (string-intersperse test-names ",")) (run-tests db test-names))) ;; (run-waiting-tests db) (sqlite3:finalize! db) (set! *didsomething* #t)))) ;;====================================================================== ;; run one test ;;====================================================================== ;; 1. find the config file ;; 2. change to the test directory ;; 3. update the db with "test started" status, set running host ;; 4. process launch the test ;; - monitor the process, update stats in the db every 2^n minutes ;; 5. as the test proceeds internally it calls megatest as each step is ;; started and completed ;; - step started, timestamp ;; - step completed, exit status, timestamp ;; 6. test phone home ;; - if test run time > allowed run time then kill job ;; - if cannot access db > allowed disconnect time then kill job (define (runtests) (if (not (args:get-arg ":runname")) (begin (debug:print 0 "ERROR: Missing required parameter for -runtests, you must specify the run name with :runname runname") (exit 2)) (let ((db #f)) (if (not (setup-for-run)) (begin (debug:print 0 "Failed to setup, exiting") (exit 1))) (set! db (open-db)) (if (not (car *configinfo*)) (begin (debug:print 0 "ERROR: Attempted to run a test but run area config file not found") (exit 1)) ;; put test parameters into convenient variables (let* ((test-names (string-split (args:get-arg "-runtests") ","))) (run-tests db test-names))) ;; run-waiting-tests db) (sqlite3:finalize! db) ;; (run-waiting-tests #f) (set! *didsomething* #t)))) (if (args:get-arg "-runtests") (runtests)) ;;====================================================================== ;; execute the test ;; - gets called on remote host ;; - receives info from the -execute param |
︙ | ︙ | |||
494 495 496 497 498 499 500 | (if (vector-ref exit-info 1) ;; look at the exit-status (if (and (not kill-job?) (eq? (vector-ref exit-info 2) 0)) "PASS" "FAIL") "FAIL") itemdat (args:get-arg "-m")))) ;; for automated creation of the rollup html file this is a good place... | < | | 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 | (if (vector-ref exit-info 1) ;; look at the exit-status (if (and (not kill-job?) (eq? (vector-ref exit-info 2) 0)) "PASS" "FAIL") "FAIL") itemdat (args:get-arg "-m")))) ;; for automated creation of the rollup html file this is a good place... (tests:summarize-items db run-id test-name #f) ;; don't force - just update if no ) (mutex-unlock! m) ;; (exec-results (cmd-run->list fullrunscript)) ;; (list ">" (conc test-name "-run.log")))) ;; (success exec-results)) ;; (eq? (cadr exec-results) 0))) (debug:print 2 "Output from running " fullrunscript ", pid " (vector-ref exit-info 0) " in work area " work-area ":\n====\n exit code " (vector-ref exit-info 2) "\n" "====\n") (sqlite3:finalize! db) |
︙ | ︙ |
Modified runs.scm from [b9d0916f14] to [80fea350e5].
︙ | ︙ | |||
631 632 633 634 635 636 637 | ;; (if (null? (glob (conc runpath "/*"))) ;; (begin ;; (debug:print 1 "Removing run dir " runpath) ;; (system (conc "rmdir -p " runpath)))) )))) )) runs))) | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 631 632 633 634 635 636 637 | ;; (if (null? (glob (conc runpath "/*"))) ;; (begin ;; (debug:print 1 "Removing run dir " runpath) ;; (system (conc "rmdir -p " runpath)))) )))) )) runs))) |