Difference From d940f569936770e8 To root:d940f569936770e8
2011-08-24
| ||
07:27 | Removing junk file Closed-Leaf check-in: d14b97e156 user: mrwellan tags: rollup-runs | |
2011-08-23
| ||
12:53 | Fixes to support full rollup of values check-in: d940f56993 user: mrwellan tags: rollup-runs | |
2011-08-11
| ||
18:42 | Added reporting script. Made systems during config file loading switchable check-in: f31ee1bcb7 user: mrwellan tags: rollup-runs | |
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-08
| ||
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 Makefile from [1861fd6a83] to [6bee1e6a16].
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | - + - + - + | FILES=$(glob *.scm) megatest: common.scm configf.scm db.scm keys.scm launch.scm megatest.scm process.scm runs.scm gui.scm csc megatest.scm |
Modified configf.scm from [ed3f434b69] to [50f8f33c26].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | - - + + - + - + - + - + - - + - - - - + + - - - + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - + - - - - + - - - + - + - + | (list path fullpath configname) (let ((remcwd (take dir (- (length dir) 1)))) (if (null? remcwd) (list #f #f #f) ;; #f #f) (loop remcwd)))))))) (define (config:assoc-safe-add alist key val) |
Modified dashboard-tests.scm from [8ad286d847] to [aeb4fe9dfc].
︙ | |||
56 57 58 59 60 61 62 | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | (lambda (testdat) (db:test-get-comment testdat))) (store-label "testid" (iup:label "TestId " #:expand "HORIZONTAL") (lambda (testdat) (db:test-get-id testdat)))))))) |
︙ | |||
237 238 239 240 241 242 243 | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | - - - - - | (runname (if testdat (db:get-value-by-header (db:get-row rundat) (db:get-header rundat) "runname") #f)) ;(teststeps (if testdat (db:get-steps-for-test db test-id) #f)) (logfile "/this/dir/better/not/exist") (rundir logfile) (testfullname (if testdat (db:test-get-fullname testdat) "Gathering data ...")) |
︙ | |||
270 271 272 273 274 275 276 | 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | - - - - - - - - - - - - - | (set! rundir (db:test-get-rundir testdat)) (set! testfullname (db:test-get-fullname testdat)) ;(mutex-unlock! mx1) ) (begin (db:test-set-testname! testdat "DEAD OR DELETED TEST")))))) (widgets (make-hash-table)) |
︙ | |||
309 310 311 312 313 314 315 | 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 | - + - | (set! self ; (iup:dialog #:close_cb (lambda (a)(exit)) ; #:expand "YES" #:title testfullname (iup:vbox ; #:expand "YES" ;; The run and test info (iup:hbox ; #:expand "YES" (run-info-panel keydat testdat runname) |
︙ |
Modified db.scm from [1b862e72a2] to [603c4ba3d8].
︙ | |||
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 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 114 115 116 117 118 119 120 | + - + - + - - + - - - - + + + + - - - - + - - - - - - - - - - - - - - - - - - - - + - - | final_logf TEXT DEFAULT 'logs/final.log', logdat BLOB, run_duration INTEGER DEFAULT 0, comment TEXT DEFAULT '', event_time TIMESTAMP, fail_count INTEGER DEFAULT 0, pass_count INTEGER DEFAULT 0, tags TEXT DEFAULT '', CONSTRAINT testsconstraint UNIQUE (run_id, testname, item_path) );") (sqlite3:execute db "CREATE INDEX tests_index ON tests (run_id, testname);") (sqlite3:execute db "CREATE VIEW runs_tests AS SELECT * FROM runs INNER JOIN tests ON runs.id=tests.run_id;") (sqlite3:execute db "CREATE TABLE test_steps (id INTEGER PRIMARY KEY, test_id INTEGER, stepname TEXT, state TEXT DEFAULT 'NOT_STARTED', status TEXT DEFAULT 'n/a',event_time TIMESTAMP, comment TEXT DEFAULT '', CONSTRAINT test_steps_constraint UNIQUE (test_id,stepname,state));") (sqlite3:execute db "CREATE TABLE extradat (id INTEGER PRIMARY KEY, run_id INTEGER, key TEXT, val TEXT);") (sqlite3:execute db "CREATE TABLE metadat (id INTEGER PRIMARY KEY, var TEXT, val TEXT, CONSTRAINT metadat_constraint UNIQUE (id,var));") (db:set-var db "MEGATEST_VERSION" megatest-version) |
︙ | |||
207 208 209 210 211 212 213 | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | - - - - - - - - - - - - - - - - - - - - - | (conc " LIMIT " (car count)) "") (if (and (> (length count) 1) (number? (cadr count))) (conc " OFFSET " (cadr count)) "")) runpatt) |
︙ | |||
341 342 343 344 345 346 347 | 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | - - + + | ;; done with run when: ;; 0 tests in LAUNCHED, NOT_STARTED, REMOTEHOSTSTART, RUNNING (define (db:estimated-tests-remaining db run-id) (let ((res 0)) (sqlite3:for-each-row (lambda (count) (set! res count)) |
︙ | |||
381 382 383 384 385 386 387 | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ;; (define (db:test-set-rundir! db run-id testname item-path rundir) (sqlite3:execute db "UPDATE tests SET rundir=? WHERE run_id=? AND testname=? AND item_path=?;" rundir run-id testname item-path)) |
︙ | |||
455 456 457 458 459 460 461 | 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + | (lambda (id test-id stepname state status event-time) (set! res (cons (vector id test-id stepname state status event-time) res))) db "SELECT id,test_id,stepname,state,status,event_time FROM test_steps WHERE test_id=? ORDER BY id ASC;" ;; event_time DESC,id ASC; test-id) (reverse res))) |
︙ | |||
497 498 499 500 501 502 503 | 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 | - + + + + + + + + + + + + + + + + + + + | (if (not (and (equal? (db:test-get-state test) "COMPLETED") (member (db:test-get-status test) '("PASS" "WARN" "CHECK")))) (set! result (cons waitontest-name result)))))) tests) (if (not ever-seen)(set! result (cons waitontest-name result))))) waiton) (delete-duplicates result)))) |
Modified launch.scm from [f0e35ea73c] to [aadffc4da1].
︙ | |||
143 144 145 146 147 148 149 | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | - + | (set! fullcmd (append launcher (car hosts)(list remote-megatest "-execute" cmdparms)))) (launcher (set! fullcmd (append launcher (list remote-megatest "-execute" cmdparms)))) (else (set! fullcmd (list remote-megatest "-execute" cmdparms)))) (if (args:get-arg "-xterm")(set! fullcmd (append fullcmd (list "-xterm")))) (debug:print 1 "Launching megatest for test " test-name " in " work-area" ...") |
︙ |
Modified megatest-version.scm from [9a855b99f9] to [c09e9a5825].
| 1 | - - - + |
|
Modified megatest.scm from [3218809c9e] to [fdec59eebf].
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | - - - - - - - - - - - - | -m comment : insert a comment for this test Run data :runname : required, name for this particular test run :state : required if updating step state; e.g. start, end, completed :status : required if updating step status; e.g. pass, fail, n/a |
︙ | |||
98 99 100 101 102 103 104 | 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" |
︙ | |||
281 282 283 284 285 286 287 | 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 332 333 | - - - + + + + + + + + + + + + + + - - - - - - + + + + + - - - - - - - + - - - + + - - - - + + + + + + + + + + + + + - - - + + + + + + + + + + + | ;; 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") |
︙ | |||
374 375 376 377 378 379 380 | 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | - + | (set-run-config-vars db run-id) ;; environment overrides are done *before* the remaining critical envars. (alist->env-vars env-ovrd) (set-megatest-env-vars db run-id) (set-item-env-vars itemdat) (save-environment-as-files "megatest") (test-set-meta-info db run-id test-name itemdat) |
︙ | |||
462 463 464 465 466 467 468 | 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 | - + | ;; (test-set-status! db run-id test-name "KILLED" "FAIL" ;; itemdat (args:get-arg "-m")) ;; (sqlite3:finalize! db) ;; (exit 1))))) (begin (debug:print 0 "WARNING: Request received to kill job but problem with process, attempting to kill manager process") (test-set-status! db run-id test-name "KILLED" "FAIL" |
︙ | |||
506 507 508 509 510 511 512 | 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 | - + - - + | (test-set-status! db run-id test-name (if kill-job? "KILLED" "COMPLETED") (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") |
︙ | |||
554 555 556 557 558 559 560 | 548 549 550 551 552 553 554 555 556 557 558 559 560 561 | - | (exit 6))) (sqlite3:finalize! db) (set! *didsomething* #t)))) (if (or (args:get-arg "-setlog") ;; since setting up is so costly lets piggyback on -test-status (args:get-arg "-set-toplog") (args:get-arg "-test-status") |
︙ | |||
633 634 635 636 637 638 639 | 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 | - + - - - - - + + + - - - - + - - - - + - - - - - - + + + + - | (teststep-set-status! db run-id test-name stepname "end" exitstat itemdat (args:get-arg "-m")) (sqlite3:finalize! db) (if (not (eq? exitstat 0)) (exit 254)) ;; (exit exitstat) doesn't work?!? ;; open the db ;; mark the end of the test ))) |
︙ | |||
692 693 694 695 696 697 698 | 674 675 676 677 678 679 680 681 682 683 684 685 686 687 | - - - - - - - - - - - - - - - - | (begin (debug:print 0 "Failed to setup, exiting") (exit 1))) ;; now can find our db (set! db (open-db)) (patch-db db) (sqlite3:finalize! db) |
︙ |
Deleted mkcsv.sh version [6c39fb52a9].
| - - - - - - - - - - - - - - - - - - - - - |
|
Modified runconfig.scm from [4dece87b4e] to [1140c67c42].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | - + | ;;====================================================================== ;; read a config file, loading only the section pertinent ;; to this run field1val/field2val/field3val ... ;;====================================================================== (define (setup-env-defaults db fname run-id . already-seen) (let* ((keys (get-keys db)) (keyvals (get-key-vals db run-id)) (thekey (string-intersperse (map (lambda (x)(if x x "-na-")) keyvals) "/")) |
︙ |
Modified runs.scm from [0a86a73c3e] to [80fea350e5].
︙ | |||
71 72 73 74 75 76 77 | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 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 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | - + - + - + - - - + + - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + + - + - | (lambda (a . r) (set! res (cons (list->vector (cons a r)) res))) db (conc "SELECT " keystr " FROM runs WHERE runname like ? " key-patt ";") runnamepatt) (vector header res))) |
︙ | |||
430 431 432 433 434 435 436 | 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | - + - - - - + - | (setenv "MT_TEST_NAME" test-name) ;; (setenv "MT_RUNNAME" (args:get-arg ":runname")) (set-megatest-env-vars db run-id) ;; these may be needed by the launching process (change-directory *toppath*) (let* ((test-path (conc *toppath* "/tests/" test-name)) (test-configf (conc test-path "/testconfig")) (testexists (and (file-exists? test-configf)(file-read-access? test-configf))) |
︙ | |||
460 461 462 463 464 465 466 | 424 425 426 427 428 429 430 431 432 433 434 435 436 437 | - - - - | (if (>= *verbosity* 1)(pp allitems)) (if (>= *verbosity* 5) (begin (print "items: ")(pp (item-assoc->item-list items)) (print "itestable: ")(pp (item-table->item-list itemstable)))) (if (args:get-arg "-m") (db:set-comment-for-run db run-id (args:get-arg "-m"))) |
︙ | |||
487 488 489 490 491 492 493 | 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 | - + | (if (runs:can-run-more-tests db) (begin (let loop2 ((ts (db:get-test-info db run-id test-name item-path)) ;; #f) (ct 0)) (if (and (not ts) (< ct 10)) (begin |
︙ | |||
671 672 673 674 675 676 677 | 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))) |
Modified tests/test.config from [5ec648d029] to [50c4aca439].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 | - - - - - - - - - - | [include a file that doesn't exist] blah nada # now inlcude a file tha tdoes exist [include megatest.config] |
Modified tests/tests.scm from [197f496658] to [51a14a8524].
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - - + + - + - | (include "../process.scm") (include "../launch.scm") (include "../items.scm") (include "../runs.scm") (include "../megatest-version.scm") (define conffile #f) |
︙ | |||
59 60 61 62 63 64 65 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - + | (and (file-exists? "nada.sh") (file-exists? "nada.csh")))) (test "get all legal tests" (list "runfirst" "runwithfirst" "singletest" "singletest2" "sqlitespeed") (sort (get-all-legal-tests) string<=?)) (test "register-test, test info" "NOT_STARTED" (begin |
︙ |
Modified tests/tests/runfirst/main.sh from [b033ad6b4d] to [f575e06d2a].
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 | - + | #!/bin/bash # megatest -step wasting_time :state start :status n/a -m "This is a test step comment" # sleep 20 # megatest -step wasting_time :state end :status $? touch ../I_was_here $MT_MEGATEST -runstep wasting_time -logpro wasting_time.logpro "sleep 8;echo all done eh?" -m "This is a test step comment" |
Modified tests/tests/runfirst/testconfig from [f0b52bc3c6] to [9a8e30b98e].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 | - - - - - - - - | [items] SEASON summer winter fall spring [itemstable] BLOCK a b TOCK 1 2 |
Modified tests/tests/singletest/main.sh from [e63ffb76fa] to [c23e537bd9].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 | - + | #!/bin/bash # megatest -step wasting_time :state start :status n/a -m "This is a test step comment" # sleep 20 # megatest -step wasting_time :state end :status $? $MT_MEGATEST -runstep wasting_time -logpro wasting_time.logpro "sleep 5;echo all done eh?" -m "This is a test step comment" |
Modified tests/tests/singletest2/main.sh from [54d3e4ef49] to [c23e537bd9].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 | - + | #!/bin/bash # megatest -step wasting_time :state start :status n/a -m "This is a test step comment" # sleep 20 # megatest -step wasting_time :state end :status $? $MT_MEGATEST -runstep wasting_time -logpro wasting_time.logpro "sleep 5;echo all done eh?" -m "This is a test step comment" |